forked from ankit071105/Ticket-Booking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_sell.html
153 lines (117 loc) · 4.25 KB
/
train_sell.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sell Train Ticket</title>
<link rel="shortcut icon" href="images/4.jpeg" type="image/x-icon">
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* code for bottom to top nav */
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color:#1fb899;
color: white;
cursor: pointer;
padding: 10px 6px;
border-radius: 4px;
width: 40px !important;
height: 40px !important;
}
#myBtn:hover {
background-color: #4cc6ad;
}
/* code for bottom to top nav */
#logo-href{
text-decoration: none;
}
</style>
</head>
<body>
<button onclick="topFunction()" width="40px" height="40px" id="myBtn" title="Go to top"><i class="fa fa-arrow-up" aria-hidden="true"></i></button>
<!-- Navbar -->
<nav class="navbar">
<div class="logo"><img src="images/4.jpeg" alt="Ticket Booking Logo" class="logo-image">Ticket Marketplace</div>
<a href="./index.html" id="logo-href"><div class="logo">Ticket Marketplace</div></a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="bus_sell.html">Sell Bus Ticket</a></li>
<li><a href="train_sell.html">Sell Train Ticket</a></li>
<li><a href="buy.html">Buy Ticket</a></li>
</ul>
</nav>
<!-- Sell Train Ticket Form -->
<section class="sell-ticket">
<h1>Sell Train Ticket</h1>
<form id="trainTicketForm">
<label for="name">Your Name:</label>
<input type="text" id="name" required>
<label for="phone">Phone Number:</label>
<input type="text" id="phone" required>
<label for="email">Email:</label>
<input type="email" id="email" required>
<label for="ticketNumber">Ticket Number:</label>
<input type="text" id="ticketNumber" required>
<label for="trainNumber">Train Number:</label>
<input type="text" id="trainNumber" required>
<label for="departureLocation">Departure Location:</label>
<input type="text" id="departureLocation" required>
<label for="arrivalLocation">Arrival Location:</label>
<input type="text" id="arrivalLocation" required>
<label for="departureTime">Departure Time:</label>
<input type="time" id="departureTime" required>
<label for="date">Date:</label>
<input type="date" id="date" required>
<label for="coachType">Coach Type:</label>
<select id="coachType" required>
<option value="Sleeper">Sleeper</option>
<option value="Non-AC">Non-AC</option>
<option value="AC">AC</option>
</select>
<label for="acClass">AC Class (If applicable):</label>
<select id="acClass">
<option value="">--Select AC Class--</option>
<option value="First">First</option>
<option value="Second">Second</option>
<option value="Third">Third</option>
<option value="Economy">Economy</option>
</select>
<label for="seatNumber">Seat Number:</label>
<input type="text" id="seatNumber" required>
<label for="price">Original Price:</label>
<input type="number" id="price" required>
<button type="submit" class="btn">Submit Ticket</button>
</form>
<p id="sellerMessage"></p>
</section>
<!-- Footer -->
<footer class="footer">
<p>© 2024 Ticket Marketplace | All rights reserved.</p>
</footer>
<script src="app.js"> </script>
<script>
let mybutton = document.getElementById("myBtn");
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
</body>
</html>