-
Notifications
You must be signed in to change notification settings - Fork 0
/
room.php
137 lines (87 loc) · 3.09 KB
/
room.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
include_once 'admin/include/class.user.php';
$user=new User();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hotel Booking</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<style>
.well {
background: rgba(0, 0, 0, 0.7);
border: none;
height: 200px;
}
body {
/* background-image: url('images/back1.jpg'); */
background-repeat: no-repeat;
background-attachment: fixed;
}
h4 {
color: #ffcc00;
}
h5
{
color: #bfbfbf;
font-family: monospace;
}
</style>
</head>
<body>
<div class="container">
<img class="img-responsive" src="images/New.jpg">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<ul class="nav navbar-nav">
<li><a href="index.php">Home</a></li>
<li class="active"><a href="room.php">Room Booking</a></li>
</ul>
</div>
</nav>
<?php
$sql="SELECT * FROM `room` WHERE `id` NOT IN (SELECT `room_id` FROM `reservation` WHERE 1)";
$result = mysqli_query($user->db, $sql);
if($result)
{
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
echo "
<table class='table table-striped'>
</thead>
<tbody>
<tr>
<td><p class='text-info'>Room Type:</p>".$row['type']."</td>
<td><p class='text-info'>Beds:</p>".$row['bedtype']."</td>
<td><p class='text-info'>Price:</p>".$row['price']."</td>
<td><a href='./booknow.php?type=".$row['type']."&id=".$row['id']."&amount=".$row['price']."'><button class='btn btn-warning'>Book Now</button> </a></td>
</tr>
</tbody>
</table>
";
}
}
else
{
echo "NO Data Exist";
}
}
else
{
echo "Cannot connect to server".$result;
}
?>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>