-
Notifications
You must be signed in to change notification settings - Fork 1
/
pass-all-available-trains.php
103 lines (98 loc) · 3.76 KB
/
pass-all-available-trains.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
<!--Server side scripting code to hold user session-->
<?php
session_start();
include('assets/inc/config.php');
include('assets/inc/checklogin.php');
check_login();
$aid=$_SESSION['pass_id'];
?>
<!--End server side code-->
<!DOCTYPE html>
<html lang="en">
<!--Head-->
<?php include('assets/inc/head.php');?>
<!--End Head-->
<body>
<div class="be-wrapper be-fixed-sidebar">
<!--Navbar-->
<?php include("assets/inc/navbar.php");?>
<!--End Navbar-->
<!--Navbar-->
<?php include('assets/inc/sidebar.php');?>
<!--End Sidebar-->
<div class="be-content">
<div class="page-head">
<h2 class="page-head-title">Trains</h2>
<nav aria-label="breadcrumb" role="navigation">
<ol class="breadcrumb page-head-nav">
<li class="breadcrumb-item"><a href="pass-dashboard.php">Dashboard</a></li>
<li class="breadcrumb-item"><a href="#">Trains</a></li>
<li class="breadcrumb-item active">Available Trains</li>
</ol>
</nav>
</div>
<div class="main-content container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card card-table">
<div class="card-header">Available Trains
</div>
<div class="card-body">
<table class="table table-striped table-bordered table-hover">
<tr>
<th>#</th>
<th>Train Number</th>
<th>Train</th>
<th>Route</th>
<th>Departure</th>
<th>Arrival</th>
<th>Dep.Time</th>
<th>Fare</th>
<th>Total Passengers</th>
</tr>
<tbody>
<?php
$ret="SELECT * FROM RailwayReservationSystem_train ";
$stmt= $mysqli->prepare($ret) ;
$stmt->execute() ;//ok
$res=$stmt->get_result();
$cnt=1;
while($row=$res->fetch_object())
{
?>
<tr class="odd gradeX even gradeC odd gradeA ">
<td><?php echo $cnt;?></td>
<td><?php echo $row->number;?></td>
<td><?php echo $row->name;?></td>
<td><?php echo $row->route;?></td>
<td><?php echo $row->current;?></td>
<td><?php echo $row->destination;?></td>
<td><?php echo $row->time;?></td>
<td>$<?php echo $row->fare;?></td>
<td><?php echo $row->passengers;?><td>
</tr>
<?php $cnt = $cnt+1; }?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Footer-->
<?php include('assets/inc/footer.php');?>
<!--End Footer-->
</div>
<script src="assets/lib/jquery/jquery.min.js" type="text/javascript"></script>
<script src="assets/lib/perfect-scrollbar/js/perfect-scrollbar.min.js" type="text/javascript"></script>
<script src="assets/lib/bootstrap/dist/js/bootstrap.bundle.min.js" type="text/javascript"></script>
<script src="assets/js/app.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
//-initialize the javascript
App.init();
});
</script>
</body>
</html>