-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreservations.php
219 lines (193 loc) · 10.9 KB
/
reservations.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!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.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<link rel="stylesheet" href="fonts/stylesheet.css">
<link rel="stylesheet" href="styles/submenu.css">
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<title>MyHotel | Reservations</title>
<link rel="shortcut icon" type="image/png" href="gambar/icon.png"/>
</head>
<body>
<section id="wrapper">
<?php
include_once 'conn.php';
session_start();
if(!isset($_SESSION['id']) == FALSE){
$sql = "SELECT id, name, address, phone, email, password FROM users WHERE id = '$_SESSION[id]'";
} else{
$sql = "SELECT id, name, address, phone, email, password FROM users";
}
$result = $conn->query($sql);
$row = $result -> fetch_assoc();
$room = "SELECT id, name, price FROM room";
$hasil = $conn -> query($room);
$row2 = $hasil->fetch_assoc();
?>
<!-- Navigation bar-->
<nav class="navbar navbar-expand-md navbar-light px-6 bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="home.php">
<img src="gambar/logo.svg" width="150">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse px-5 justify-content-end" id="navbarNav">
<ul class="navbar-nav navbar-dark">
<li class="nav-item mx-5">
<a class="nav-link hover-custom" href="home.php">Home</a>
</li>
<li class="nav-item mx-5">
<a class="nav-link hover-custom" href="facilities.php">Facilities</a>
</li>
<li class="nav-item mx-5">
<a class="nav-link active hover-custom" href="reservations.php">Reservations</a>
</li>
<li class="nav-item mx-5">
<a class="nav-link hover-custom" href="contact.php">Contact</a>
</li>
<div class="btn-group nav-item mx-4 hover-custom">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
<i class="fas fa-user-circle"></i>
</button>
<ul class="dropdown-menu dropdown-menu-lg-end ">
<?php if(isset($_SESSION['role']) && $_SESSION['role'] == "user") {
?>
<?php
echo "<li><a class='dropdown-item' href='profile.php?id=$row[id]'>Profile</a></li>
<li><a class='dropdown-item' href='logout.php'>Logout</a></li>";
?>
<?php }else { ?>
<li><a class="dropdown-item" href="login.php">Login</a></li>
<li><a class="dropdown-item" href="register.php">Register</a></li>
<?php } ?>
<!-- <li><a class="dropdown-item" href="login.php">Login</a></li>
<li><a class="dropdown-item" href="register.php">Register</a></li> -->
</ul>
</div>
</ul>
</div>
</div>
</nav>
<!--End-->
<!--banner-->
<section id="banner">
<div class="banner-reserv">
<img src="gambar/banner1.png" alt="" width="90%" class="rounded-1">
<div class="top-left">
<img src="gambar/logo-putih.png" alt="" >
<div class="">
<h1 class="display-1 text-light">Welcome To <u><span class="fw-bold">MyHotel</span></u></h1>
</div>
<p class="text-start px-4 py-5"><i>Book your stay and enjoy Luxury<br>
redefined at the most affordable rates.</i>
</p>
</div>
<div class="centered">
<a href="#reservation-room">
<button type="button" class="btn btn-ligt bg-light px-5 rounded-3" id="book-now-button">Book Now <br><i class="fas fa-arrow-down text-dark"></i></button></a>
</a>
</div>
</div>
</section>
<!--end-->
<!--Choose Room-->
<section id="reservation-room">
<div class="container my-5 py-5 mt-5r">
<div class="row text-center" data-aos="fade-up">
<h1 class="display-2">Choose Your Room</h1>
<p>Each of our bright, light-flooded rooms come with everything you could possibly need for a comfortable stay. And yes,
comfort isn’t our only objective, we also value good design, sleek contemporary furnishing complemented
by the rich tones of nature’s palette as visible from our rooms’ sea-view windows and terraces. </p>
</div>
<div class="row mt-5 mx-5">
<div class="card" data-aos="fade-zoom-in">
<img src="gambar/double-bed.png" class="img-thumbnail card-img-top">
<div class="card-body">
<ul class="list-group list-group-flush text-center">
<li class="list-group-item display-3 ">Twin Bed</li>
</ul>
<div class="row">
<div class="col-6">
<button type="button" id="tombol" class="btn btn-block"><i class="fas fa-plus-circle"></i> View More Detail</button>
</div>
<div class="col-6 text-end">
<?php
echo "<button type='button' id='tombol' class='btn btn-primary btn-block'> <a href='booking.php?id=1' class='text-decoration-none text-light'>Booking Now $95 / Night</a> </button>"
?>
</div>
</div>
</div>
</div>
<div class="card mt-5" data-aos="fade-zoom-in">
<img src="gambar/single-bed.jpg" class="img-thumbnail card-img-top">
<div class="card-body">
<ul class="list-group list-group-flush text-center">
<li class="list-group-item display-3 ">Single Bed</li>
</ul>
<div class="row">
<div class="col-6">
<button type="button" id="tombol" class="btn btn-block"><i class="fas fa-plus-circle"></i> View More Detail</button>
</div>
<div class="col-6 text-end">
<?php
echo "<button type='button' id='tombol' class='btn btn-primary btn-block'> <a href='booking.php?id=2' class='text-decoration-none text-light'>Booking Now $90 / Night</a> </button>"
?>
</div>
</div>
</div>
</div>
<div class="card mt-5" data-aos="fade-zoom-in">
<img src="gambar/double-bed2.jpg" class="img-thumbnail card-img-top">
<div class="card-body">
<ul class="list-group list-group-flush text-center">
<li class="list-group-item display-3 ">Double Bed</li>
</ul>
<div class="row">
<div class="col-6">
<button type="button" id="tombol" class="btn btn-block"><i class="fas fa-plus-circle"></i> View More Detail</button>
</div>
<div class="col-6 text-end">
<?php
echo "<button type='button' id='tombol' class='btn btn-primary btn-block'> <a href='booking.php?id=3' class='text-decoration-none text-light'>Booking Now $90 / Night</a> </button>"
?>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!--end-->
<!--Footer-->
<section id="footers">
<div class="footer row py-2 bg-light" >
<div class="col-4">
<a class="navbar-brand" href="#">
<img src="gambar/logo.svg" width="150" href="#" alt="">
</a>
</div>
<div class="col-4">
<p class="fw-bold text-dark text-center mt-5">© Copyright 2022. MyHotel (Kelompok 2)</p>
</div>
<div class="col-4 px-4 py-2">
<a class="text-decoration-none text-dark text-center" href=""><p><i class="fab fa-instagram"></i> Instagram</p> </a>
<a class="text-decoration-none text-dark text-center" href=""><p><i class="fab fa-twitter-square"></i> Twitter</p> </a>
</div>
</div>
</section>
<button onclick="topFunction()" id="myBtn" title="Go to top"><i class="far fa-arrow-alt-circle-up"></i></button>
</section>
</body>
<script src="script.js"></script>
<script>
AOS.init();
</script>
</html>