-
Notifications
You must be signed in to change notification settings - Fork 1
/
routes_display.php
87 lines (81 loc) · 3.15 KB
/
routes_display.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
<?php
include 'connect.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css' rel='stylesheet'>
<link rel="shortcut icon" href="https://cdn-icons-png.flaticon.com/512/6469/6469034.png" type="image/x-icon">
<link rel="stylesheet" href="style1.css">
<title>Bus Ticket Booking</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="index.php"><strong><img src="https://cdn-icons.flaticon.com/png/512/3066/premium/3066259.png?token=exp=1643485325~hmac=761a3a37424b1bb74ee71f64a4e63f98" width="35px">Bus Ticket Booking</strong></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link" aria-current="page" href="display.php">Bus</a>
<a class="nav-link" href="emp_display.php">Employee</a>
<a class="nav-link active" href="routes_display.php">Routes</a>
<a class="nav-link" href="cust_display.php">Customers</a>
<a class="nav-link" href="ticket_display.php">Ticket</a>
</div>
</div>
</div>
</nav>
<div class="container">
<button class='btn btn-primary my-5'><a href="routes_insert.php" class="text-light">Add route</a></button>
<table class="table table-dark table-striped">
<thead>
<tr>
<th scope="col">ROUTE ID</th>
<th scope="col">BUS ID</th>
<th scope="col">SOURCE</th>
<th scope="col">DESTINATION</th>
<th scope="col">PRICE</th>
<th scope="col">NUMBER OF SEATS LEFT</th>
<th scope="col">TIMINGS</th>
<th scope="col">OPERATIONS</th>
</tr>
</thead>
<tbody>
<?php
$sql="Select * from `routes`";
$result=mysqli_query($con,$sql);
if($result){
while($row=mysqli_fetch_assoc($result)){
$ROUTE_ID=$row['ROUTE_ID'];
$BUS_ID=$row['BUS_ID'];
$SOURCE=$row['SOURCE'];
$DESTINATION=$row['DESTINATION'];
$PRICE=$row['PRICE'];
$SEATS_LEFT=$row['SEATS_LEFT'];
$TIMINGS=$row['TIMINGS'];
echo '<tr>
<th scope="row">'.$ROUTE_ID.'</th>
<td>'.$BUS_ID.'</td>
<td>'.$SOURCE.'</td>
<td>'.$DESTINATION.'</td>
<td>'.$PRICE.'</td>
<td>'.$SEATS_LEFT.'</td>
<td>'.$TIMINGS.'</td>
<td>
<button class="btn btn-primary"><a href="routes_update.php?updateid='.$ROUTE_ID.'" class="text-light">Update</a></button>
<button class="btn btn-danger"><a href="routes_delete.php?deleteid='.$ROUTE_ID.'" class="text-light">Delete</a></button>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</body>
</html>