-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
116 lines (102 loc) · 2.66 KB
/
view.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
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include 'dbconfig.php';
$sql = "SELECT * FROM booking";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html>
<head>
<title>View Bookings</title>
<style>
table {
font-family: Arial, sans-serif;
border-collapse: collapse;
width: 100%;
margin-top: 50px
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
th {
background-color: #3C486B;
color: white;
}
#updatebtn{
margin-top: 60px;display: inline-block;
padding: 20px 30px;
background-color: #3C486B;
color: #fff;
border-radius: 4px;
margin-right: 25px
}
#deletebtn{
margin-top: 60px;display: inline-block;
padding: 20px 30px;
background-color: #3C486B;
color: #fff;
border-radius: 4px;
margin-left: 25px
}
#logoutbtn{
margin-top: 60px;display: inline-block;
padding: 20px 30px;
background-color: #3C486B;
color: #fff;
border-radius: 4px;
margin-left: 50px
}
</style>
</head>
<body>
<table>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Number of Pax</th>
<th>Package</th>
<th>Date From</th>
<th>Date To</th>
<th>Country</th>
<th>Contact Number</th>
<th>Email</th>
<th>Message</th>
<th>Tour ID</th>
<th>Status</th>
<th>Guide ID</th>
<th>Guide Status</th>
</tr>
<?php while($row = $result->fetch_assoc()): ?>
<tr>
<td><?php echo $row['tour_id']; ?></td>
<td><?php echo $row['first_name']; ?></td>
<td><?php echo $row['last_name']; ?></td>
<td><?php echo $row['no_of_pax']; ?></td>
<td><?php echo $row['package']; ?></td>
<td><?php echo $row['date_from']; ?></td>
<td><?php echo $row['date_to']; ?></td>
<td><?php echo $row['country']; ?></td>
<td><?php echo $row['tp']; ?></td>
<td><?php echo $row['email']; ?></td>
<td><?php echo $row['message']; ?></td>
<td><?php echo $row['tour_id']; ?></td>
<td><?php echo $row['status']; ?></td>
<td><?php echo $row['guide_id']; ?></td>
<td><?php echo $row['guide_status']; ?></td>
</tr>
<?php endwhile; ?>
</table>
<center>
<button id="updatebtn" onclick="location.href='update.php'">Update Data</button>
<button id="deletebtn" onclick="location.href='delete.php'">Delete Data</button>
<button id="logoutbtn" onclick="location.href='home.html'">Log out</button>
</center>
</body>
</html>