forked from prajwals420/Mumbai-Local-Train-Ticket-Booking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbusbookings.php
102 lines (80 loc) · 2.27 KB
/
busbookings.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
<?php
include 'connect.php' ;
session_start();
if ($_SESSION['log'] == '')
{
header("location:sindex.php");
}
include 'header.php';
?>
<div>
</div>
<style>
table#database_table {
font-size:16px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
border-spacing: 0;
}
#database_table td, #database_table th {
border: 1px solid #ddd;
text-align: left;
padding: 8px;
}
#database_table tr:nth-child(even){background-color: #f2f2f2}
#database_table th {
padding-top: 11px;
padding-bottom: 11px;
background-color: black;
color: white;
}
</style>
<head>
<title>M-TICKET DATABASE</title>
</head>
<body >
<div class="container">
<h2><center><b><img src="https://img.icons8.com/nolan/64/database.png"/>USER'S BUS BOOKINGS <img src="https://img.icons8.com/ultraviolet/50/000000/bus.png"/></center></b></h1>
<br />
<table id="database_table" class="table table-striped table-bordered">
<thead>
<tr>
<th>Date & Time</th>
<th>Booking ID </th>
<th>Name</th>
<th>Source</th>
<th>Destination</th>
<th>Bus Number</th>
<th>Amount Paid</th>
<th>Download</th>
</tr>
</thead>
<tbody>
<?php
$sql_transactions="SELECT * FROM `bustransactions` WHERE `email`='".$_SESSION['email']."' " ;
$result = $connect->query($sql_transactions);
while($row = $result->fetch_assoc()){
echo'<tr class="class="table table-striped table-bordered"">
<td>'.$row["Date"].'</td>
<td>'.$row["T_No."].'</td>
<td>'.$row["Name"].'</td>
<td>'.$row["source"].'</td>
<td>'.$row["dest"].'</td>
<td>'.$row["Bus_No"].'</td>
<td>₹  '.$row["Amt"].'</td>
<td><a href="busprint.php?pid='.$row["T_No."].' " target="_blank">Click Here</a></td>
';
}
?>
</tbody>
</table>
</div>
<script>
$(document).ready(function() {
$('#database_table').DataTable( {
"order": [[ 1, "desc" ]]
} );
} );
</script>
<?php include 'footer.php';
?>