-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
209 lines (189 loc) · 9.78 KB
/
index.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
<?php require "includes/header.php"; ?>
<?php require "config/config.php";?>
<?php
//hotels
$hotels = $conn->query("SELECT * FROM hotels WHERE status =1");
$hotels->execute();
$allHotels=$hotels->fetchAll(PDO::FETCH_OBJ);
//rooms
$rooms = $conn->query("SELECT * FROM rooms WHERE status =1");
$rooms->execute();
$allRooms=$rooms->fetchAll(PDO::FETCH_OBJ);
?>
<div class="hero-wrap js-fullheight" style="background-image: url('images/image_12.jpg');" data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-start" data-scrollax-parent="true">
<div class="col-md-7 ftco-animate">
<h2 class="subheading">Welcome to HOTEL SHERATON</h2>
<h1 class="mb-4">Rent an appartment for your vacation</h1>
<p><a href="<?php echo APPURL;?>/about.php" class="btn btn-primary">Learn more</a> <a href="<?php echo APPURL;?>/contact.php" class="btn btn-white">Contact us</a></p>
</div>
</div>
</div>
</div>
<section class="ftco-section ftco-services">
<div class="container">
<div class="row">
<?php foreach($allHotels as $hotel): ?>
<div class="col-md-4 d-flex services align-self-stretch px-4 ftco-animate">
<div class="d-block services-wrap text-center">
<div class="img" style="background-image: url(images/<?php echo $hotel->image;?>);"></div>
<div class="media-body py-4 px-3">
<h3 class="heading"><?php echo $hotel->name;?></h3>
<p><?php echo $hotel->description;?></p>
<p>Location: <?php echo $hotel->location;?></p>
<p><a href="rooms.php?id=<?php echo $hotel->id; ?>" class="btn btn-primary">View rooms</a></p>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</section>
<section class="ftco-section bg-light">
<div class="container-fluid px-md-0">
<div class="row no-gutters justify-content-center pb-5 mb-3">
<div class="col-md-7 heading-section text-center ftco-animate">
<h2>Apartment Room</h2>
</div>
</div>
<div class="row no-gutters">
<?php foreach($allRooms as $room):?>
<div class="col-lg-12">
<div class="room-wrap d-md-flex">
<a href="#" class="img" style="background-image: url(images/<?php echo $room->image; ?>);"></a>
<div class="half left-arrow d-flex align-items-center">
<div class="text p-4 p-xl-5 text-center">
<p class="star mb-0"><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span></p>
<!-- <p class="mb-0"><span class="price mr-1">$120.00</span> <span class="per">per night</span></p> -->
<h3 class="mb-3"><a href="<?php echo APPURL;?>/rooms/room-single.php?id=<?php echo $room->id; ?>"><?php echo $room->name; ?></a></h3>
<ul class="list-accomodation">
<li><span>Max:</span><?php echo $room->num_persons; ?> Persons</li>
<li><span>Size:</span> <?php echo $room->size; ?> m2</li>
<li><span>View:</span> <?php echo $room->view; ?></li>
<li><span>Bed:</span> <?php echo $room->num_beds; ?></li>
<li><span>Price per Night:</span> <?php echo $room->price; ?><?php echo "$"; ?></li>
</ul>
<?php if(empty($_SESSION['email'])):?>
<p class="pt-1"><a href="<?php echo APPURL;?>/rooms/room-single.php?id=<?php echo $room->id;?>" class="btn-custom px-3 py-2">Book Room<span class="icon-long-arrow-right"></span></a></p>
<?php else:?>
<p class="pt-1"><a href="<?php echo APPURL;?>" class="btn-custom px-3 py-2">Book Room<span class="icon-long-arrow-right"></span></a></p>
<?php endif;?>
</div>
</div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
</section>
<section class="ftco-section bg-light">
<div class="container">
<div class="row no-gutters">
<div class="col-md-6 wrap-about">
<div class="img img-2 mb-4" style="background-image: url(images/image_11.jpg);">
</div>
<h2>The most recommended hotel sheraton</h2>
<p>A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div class="col-md-6 wrap-about ftco-animate">
<div class="heading-section">
<div class="pl-md-5">
<h2 class="mb-2">What we offer</h2>
</div>
</div>
<div class="pl-md-5">
<p>A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.</p>
<div class="row">
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-diet"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Tea Coffee</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-workout"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Hot Showers</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-diet-1"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Laundry</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-first"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Air Conditioning</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-first"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Free Wifi</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-first"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Kitchen</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-first"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Ironing</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
<div class="services-2 col-lg-6 d-flex w-100">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-first"></span>
</div>
<div class="media-body pl-3">
<h3 class="heading">Lovkers</h3>
<p>A small river named Duden flows by their place and supplies it with the necessary</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="ftco-intro" style="background-image: url(images/image_9.jpg);" data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-9 text-center">
<h2>Ready to get started</h2>
<p class="mb-4">It’s safe to book online with us! Get your dream stay in clicks or drop us a line with your questions.</p>
<p class="mb-0"><a href="<?php echo APPURL;?>/about.php" class="btn btn-primary px-4 py-3">Learn More</a> <a href="<?php echo APPURL;?>/contact.php" class="btn btn-white px-4 py-3">Contact us</a></p>
</div>
</div>
</div>
</section>
<?php require "includes/footer.php"; ?>