-
Notifications
You must be signed in to change notification settings - Fork 52
/
admin_view.php
119 lines (117 loc) · 2.69 KB
/
admin_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
117
118
119
<!DOCTYPE html>
<html>
<head>
<title>Admin</title>
</head>
<style>
body {
margin: 0;
background: #f2f2f2;
}
table {
font-size: 22px;
}
td {
text-align: center;
}
#td1
{
background-color: rgba(09,41,98,0.9);
color: white;
border: 10px;
margin-top: -10px;
padding: 10px;
}
.basic_box {
border: 1px solid #ccc;
border-radius: 15px;
margin: auto;
width: 600px;
padding: 50px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19);
}
th {
font-weight: bold;
padding-left: 15px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 22%;
font-size: 24px;
background-color: rgba(09,41,98,0.9);
text-decoration: none;
position: fixed;
height: 100%;
overflow: auto;
}
li {
color: white;
}
li a {
display: block;
color: white;
padding: 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #e6b800;
color: white;
}
li a:hover:not(.active) {
background-color: #e6b800;
color: white;
text-decoration: underline;
}
</style>
<body>
<table style="width: 100%;">
<tr>
<td id="td1" style="padding: 10px; font-size: 48px;">THE <p style="color: #e6b800; display: inline;">DELUXE</p> HOTEL</td>
</tr>
</table>
<ul>
<li><a href="admin_view.php" class="active">Rooms Info</a></li>
<li><a href="add_room_admin.php">Add Room</a></li>
<li><a href="remove_room_admin.php">Remove Rooms</a></li>
<li><a href="admin_room_status.php">Booking Requests</a></li>
<li><a href="confirmed_bookings.php">Confirmed Bookings</a></li>
<li><a href="booking_history.php">Booking History</a></li>
<li><a href="index.php">Logout</a></li>
</ul>
<div style="margin-left:25%;padding:1px 16px;height:1000px;">
<p style="margin-left: 10%; margin-top: 5%; font-size: 28px;"></p>
<?php
$conn = new mysqli("localhost","root","", "iwp");
if($conn->connect_error)
{
die("Connection failed: ".$conn->connect_error);
}
$sql = "SELECT * from rooms_count";
$result=mysqli_query($conn,$sql); ?>
<table class="basic_box">
<tr>
<th colspan="4"><p style="font-size: 28px; text-align: center; text-decoration: underline;">Rooms Info</p></th>
</tr>
<tr>
<th>Room Type</th>
<th>Available Rooms</th>
<th>Occupied Rooms</th>
<th>Price</th>
</tr>
<?php
while ($row=mysqli_fetch_row($result))
{ ?>
<tr>
<td><?php echo $row[0]; ?></td>
<td><?php echo $row[1]; ?></td>
<td><?php echo $row[2]; ?></td>
<td><?php echo $row[3];
} ?></td>
</tr>
<tr><td></td></tr><tr><td></td></tr>
</table>
</div>
</body>
</html>