-
Notifications
You must be signed in to change notification settings - Fork 0
/
kamar_detail - versi asli baca tabel kategori.php
233 lines (185 loc) · 6.31 KB
/
kamar_detail - versi asli baca tabel kategori.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?php include('header.php'); ?>
<?php
$id_kamar = mysqli_real_escape_string($koneksi, $_GET['id']);
$data = mysqli_query($koneksi,"select * from kamar,kategori where kategori_id=kamar_kategori and kamar_id='$id_kamar'");
while($d=mysqli_fetch_array($data)){
?>
<!-- Shop Details Section Begin -->
<section class="shop-details">
<div class="product__details__pic">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-3">
<ul class="nav nav-tabs" role="tablist">
<?php if($d['kamar_foto1'] == ""){ ?>
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tabs-1" role="tab">
<div class="product__thumb__pic set-bg" data-setbg="gambar/sistem/kamar.png"></div>
</a>
</li>
<?php }else{ ?>
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tabs-1" role="tab">
<div class="product__thumb__pic set-bg" data-setbg="gambar/kamar/<?php echo $d['kamar_foto1'] ?>"></div>
</a>
</li>
<?php } ?>
</ul>
</div>
<div class="col-lg-6 col-md-9">
<div class="tab-content">
<?php if($d['kamar_foto1'] == ""){ ?>
<div class="tab-pane active" id="tabs-1" role="tabpanel">
<div class="product__details__pic__item">
<img src="gambar/sistem/kamar.png" alt="">
</div>
</div>
<?php }else{ ?>
<div class="tab-pane active" id="tabs-1" role="tabpanel">
<div class="product__details__pic__item">
<img src="gambar/kamar/<?php echo $d['kamar_foto1'] ?>" alt="">
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<div class="product__details__content">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="col-lg-8">
<div class="product__details__text">
<h2 class="font-weight-bold"><?php echo $d['kamar_nama']; ?></h2>
<br>
<h4><?php echo "Rp. ".number_format($d['kamar_harga']).",-"; ?> / Malam </h4>
<br>
<p class="mb-0">Pelayanan kamar terbaik untuk menemani waktu liburanmu bersama keluarga, kerabat atau orang-orang tersayang. jangan lewatkan, segera booking sekarang!</p>
<br>
<p class="mb-0">Fasilitas :</p>
<div class="shop__sidebar__tags mb-5">
<a class="btn-default">AC</a>
<a class="btn-default">TV</a>
<a class="btn-default">Lemari</a>
</div>
<?php
$jumlahkamar = $d['kamar_jumlah'];
$qcek = mysqli_query($koneksi,"select count(*) N from terima where kamar_id='$id_kamar'");
$dtcek=mysqli_fetch_object($qcek);
$kamardipesan = $dtcek->N;
?>
<div class="product__details__cart__option">
<a href="booking.php?id=<?php echo $d['kamar_id'] ?>" class="primary-btn">Booking Kamar ( Sisa <?= ($jumlahkamar - $kamardipesan) ?>)</a>
</div>
<div class="product__details__last__option">
<ul>
<li><span>Ukuran Kamar:</span> <?php echo $d['kamar_ukuran'] ?> m2</li>
<li><span>Ranjang:</span> <?php echo $d['kamar_ranjang'] ?></li>
<li><span>Kategori:</span> <?php echo $d['kategori_nama'] ?></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Shop Details Section End -->
<?php
}
?>
<br>
<br>
<div class="container">
<hr>
</div>
<br>
<br>
<!-- Related Section Begin -->
<section class="related spad">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h3 class="related-title">Rekomendasi Kamar Lainnya</h3>
</div>
</div>
<div class="row">
<?php
$data = mysqli_query($koneksi,"select * from kamar,kategori where kategori_id=kamar_kategori order by rand() limit 4");
while($d = mysqli_fetch_array($data)){
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-sm-6">
<div class="product__item">
<?php if($d['kamar_foto1'] == ""){ ?>
<ul class="product__hover">
<li>
<a href="kamar_detail.php?id=<?php echo $d['kamar_id']; ?>">
<img src="gambar/sistem/kamar.png">
</a>
</li>
</ul>
<?php }else{ ?>
<ul class="product__hover">
<li>
<a href="kamar_detail.php?id=<?php echo $d['kamar_id']; ?>">
<img src="gambar/kamar/<?php echo $d['kamar_foto1'] ?>">
</a>
</li>
</ul>
<?php } ?>
<div class="product__item__text">
<h6><?php echo $d['kamar_nama'] ?></h6>
<a href="kamar_detail.php?id=<?php echo $d['kamar_id']; ?>" class="add-cart"><i class="fa fa-eye"></i> Lihat kamar</a>
<small class="text-muted"><?php echo $d['kategori_nama'] ?></small>
<div class="rating">
<?php
$rata = bintang($d['kamar_id']);
?>
<?php if($rata >= 1){ ?>
<i class="fa fa-star text-warning"></i>
<?php }else{ ?>
<i class="fa fa-star-o"></i>
<?php } ?>
<?php if($rata >= 2){ ?>
<i class="fa fa-star text-warning"></i>
<?php }else{ ?>
<i class="fa fa-star-o"></i>
<?php } ?>
<?php if($rata >= 3){ ?>
<i class="fa fa-star text-warning"></i>
<?php }else{ ?>
<i class="fa fa-star-o"></i>
<?php } ?>
<?php if($rata >= 4){ ?>
<i class="fa fa-star text-warning"></i>
<?php }else{ ?>
<i class="fa fa-star-o"></i>
<?php } ?>
<?php if($rata >= 5){ ?>
<i class="fa fa-star text-warning"></i>
<?php }else{ ?>
<i class="fa fa-star-o"></i>
<?php } ?>
</div>
<h5><?php echo "Rp. ".number_format($d['kamar_harga']).",-"; ?></h5>
<div class="product__color__select">
<small class="text-muted"><?php echo $d['kategori_nama'] ?></small>
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</section>
<!-- Related Section End -->
<?php include('footer.php'); ?>