-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewBus.php
309 lines (219 loc) · 5.78 KB
/
viewBus.php
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<?php
session_start();
include("connection.php");
include("function.php");
$user_data = check_login($conn);
?>
<?php include("connection.php")?>
<!--
<!DOCTYPE html>
<html>
<head>
<title>admin Panel suraksha</title>
</head>
<body>
<?php// echo "welcome:". $_SESSION['id']; ?>
<a href="adminLogout.php"><button class="btnHome">logout</button></a>
</body>
</html>
-->
<!DOCTYPE html>
<html>
<head>
<title>user view packages Suraksha</title>
<!--cdn icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="cssfile/sidebar.css">
<style type="text/css">
body{
background-image: url("image/1.jpg");
background-position: center;
background-size: cover;
height: 700px;
background-repeat: no-repeat;
background-attachment: fixed;
}
.adminTopic{
text-align: center;
color: #fff;
}
table
{
width:99%;
border-collapse: separate !important;
margin:auto;
/*/table-layout:fixed;/*/
text-align:center;
margin-top:50px;
background-color: rgb(255, 255, 255);
border-radius: 10px 10px 0px 0px;
}
table th
{
border-bottom:2px solid rgb(187, 187, 187);
padding:10px 0px 10px 0px;
font-family: "balsamiq_sansitalic" !important;
}
table tr td
{
border-right: 2px solid rgb(187, 187, 187);
height: 58px;
padding: 22px 0px 0px 0px;
font-family: "monospace;" !important;
border-bottom: 2px solid rgb(187, 187, 187);
font-size: 20px;
}
table tr td a
{
/*background-color: rgb(255, 196, 0);*/
color: white;
border-radius: 5px;
padding: 6px;
text-decoration: none;
margin: 10px;
font-weight: 700;
}
table tr td button:hover
{
/*
background: rgb(255, 255, 255);
text-decoration:underline;
color:tomato;
padding: 4px;
border:2px solid tomato;
transition:background-color 0.2s;*/
padding: 5px 5px 5px 5px;
border: 2px solid yellow;
border-radius: 7px;
background-color: red;
color: white;
cursor: pointer;
}
button
{
padding: 5px 5px 5px 5x;
}
.btnPolicy{
padding: 5px 5px 5px 5px;
border: 2px solid yellow;
border-radius: 7px;
background-color: red;
color: white;
margin-left: 20px;
}
.btnPolicy:hover{
background:red;
padding: 7px 7px 7px 7px;
cursor: pointer;
}
</style>
</head>
<body>
<input type="checkbox" id="check">
<label for="check">
<i class="fa fa-bars" id="btn"></i>
<i class="fa fa-times" id="cancle"></i>
</label>
<div class="sidebar">
<header><img src="image/Re.png">
<p><?php echo $user_data['username'];?></p>
</header>
<ul>
<li><a href="viewBus.php">Ticket Booking</a></li>
<li><a href="profile.php">Profile</a></li>
<li><a href="logout.php">logout</a></li>
<!-- <li><a href="#">Event</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Service</a></li>
<li><a href="#">Contact</a></li>-->
</ul>
<!-- <li>
<div class="social-links">
<a href="#" class="twitter"><i class="fa fa-twitter"></i></a>
<a href="#" class="facebook"><i class="fa fa-facebook"></i></a>
<a href="#" class="instagram"><i class="fa fa-instagram"></i></a>
<a href="#" class="google-plus"><i class="fa fa-youtube"></i></a>
</div>
</li>-->
</div>
<div class="sidebar2">
<h1 class="adminTopic">Booking Your Ticket...</h1>
<?php
/*
$sqlget="SELECT * FROM bus";
$sqldata=mysqli_query($conn,$sqlget) or die('error getting');
echo "<table>";
echo "<tr>
<th>ID</th>
<th>Bus Name</th>
<th>Tel</th>
<th>Book Now</th>
</tr>";
while ($row=mysqli_fetch_array($sqldata,MYSQLI_ASSOC))
{
echo "<tr><td>";
echo $row['id'];
echo "</td><td>";
echo $row['Bus_Name'];
echo "</td><td>";
echo $row['Tel'];
echo "</td>";
?>
<td>
<button style="border:2px solid yellow; border-radius:7px; background-color:red;color:white;">
<a href="Viewbooking.php">
Book Now
</a>
</button>
</td></tr>
<?php
}
echo "</table>";
*/
?>
<?php
$sqlget="SELECT * FROM route";
$sqldata=mysqli_query($conn,$sqlget) or die('error getting');
echo "<table>";
echo "<tr>
<th>ID</th>
<th>Via City</th>
<th>Destination</th>
<th>Bus Name</th>
<th>Departure Date</th>
<th>Departure Time</th>
<th>Cost</th>
<th>Booking</th>
</tr>";
while ($row=mysqli_fetch_array($sqldata,MYSQLI_ASSOC))
{
echo "<tr><td>";
echo $row['id'];
echo "</td><td>";
echo $row['via_city'];
echo "</td><td>";
echo $row['destination'];
echo "</td><td>";
echo $row['bus_name'];
echo "</td><td>";
echo $row['departure_date'];
echo "</td><td>";
echo $row['departure_time'];
echo "</td><td>";
echo $row['cost'];
echo "</td>";
?>
<td>
<button style="border:2px solid yellow; border-radius:7px; background-color:red;color:white;">
<a href="AddBooking.php?id=<?php echo $row['id'];?>">
Book Now
</a>
</button>
</td></tr>
<?php
}
echo "</table>";
?>
</div>
</body>
</html>