-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathview_bookings.php
executable file
·52 lines (42 loc) · 1005 Bytes
/
view_bookings.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
<?php
include 'header.php';
echo '<div class="container">
<h1>
View Last 10 bookings
</h1>
<br>
<br><br>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">User</th>
<th scope="col">Driver</th>
<th scope="col">Amt</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>';
include_once 'mysqli.php';
if(!isset($mysqli)) $mysqli = new mysqli($server, $user, $pass, $db);
$query = "SELECT * FROM `booking` ";
$result = mysqli_query($mysqli, $query);
while($row=mysqli_fetch_assoc($result))
{
echo '<tr>
<th scope="row">'.$row['booking_id'].'</th>
<td>'.get_fullname($row['user_id']).'</td>
<td>'.get_fullname($row['driver_id']).'</td>
<td>100 LKR</td>
<td>
<div class="btn-group" role="group">
<a href="status_booking.php?id='.$row['booking_id'].'" class="btn btn-secondary btn-info">Trip Report</a>
</div>
</td>
</tr>';
}
echo '</tbody>
</table>
</div>';
include 'footer.php';
?>