-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtampil.php
233 lines (217 loc) · 10.6 KB
/
tampil.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 "config.php";
include "fungsiFasilitas.php";
$sqlTampil = "SELECT * FROM dataKost dk INNER JOIN kapasitasKost kk ON dk.id = kk.id_kost
INNER JOIN fotoKost fk ON dk.id = fk.id
INNER JOIN kontakKost ko ON dk.id = ko.id
INNER JOIN spesifikasiKost sk ON dk.id = sk.id
WHERE dk.id='$_GET[id]'";
$data = mysql_query($sqlTampil);
$z = mysql_fetch_array($data);
$title = strtoupper($z['nama']);
include "atas.php";
?>
<div class="w3-bar w3-xlarge w3-margin-bottom" style="letter-spacing:4px;">
</div>
<div class="w3-hide-small">
<div id="header360" style="height:400px;width:100%"></div>
</div>
<div class="w3-bar w3-xxlarge w3-padding w3-border">
<b><?=strtoupper($z['nama'])?></b>
</div>
<?php
$moh = mysql_query("SELECT COUNT(*) AS jumlahReview FROM reviewKost WHERE idKost = $_GET[id]");
$jkl = mysql_fetch_array($moh);
?>
<div class="w3-row">
<div class="w3-col l8 m12 s12">
<div class="w3-container">
<div class="w3-hide-large w3-margin-bottom w3-margin-top">
<?php
if($z['kapasitas'] > 0) {
?>
<div class="w3-bar w3-theme w3-margin-bottom w3-padding">
<div class="w3-xlarge w3-center">Tersedia <?=$z['kapasitas']?> Kamar</div>
</div>
<?php
} else {
?>
<div class="w3-bar w3-flat-pomegranate w3-margin-bottom w3-padding">
<div class="w3-xlarge w3-center">Kapasitas penuh</div>
</div>
<?php
}
?>
<div class="w3-padding-small w3-medium w3-border">
<div class="w3-center"><b>
<div class="w3-padding">
Rp. <?=number_format($z['harga'],0,",",".")?>,-/bulan
</div>
<div class="w3-padding">
Rp. <?=number_format((($z['harga']*12)-((2/100)*($z['harga']*12))),0,",",".")?>,-/tahun
</div>
</b></div>
</div>
</div>
<div class="w3-panel w3-medium w3-border-bottom w3-border-theme">
<button class="w3-bar-item w3-button tablink w3-theme" onclick="openCity(event,'awal')">Detail kost</button>
<button class="w3-bar-item w3-button tablink" onclick="openCity(event,'fasilitas')">Review (<?=$jkl['jumlahReview']?>)</button>
</div>
<div id="awal" class="tab">
<?php include "tampilUtama.php"; ?>
<?php //include "review/tampilReview.php"; ?>
</div>
<div id="fasilitas" class="tab" style="display:none">
<?php include "review/tampilReview.php"; ?>
</div>
</div>
</div>
<!-- konten sebelah kanan -->
<div class="w3-col l4 m12 s12">
<div class="w3-container w3-margin-top w3-margin-bottom">
<div class="w3-hide-small w3-hide-medium w3-margin-bottom">
<?php
if($z['kapasitas'] > 0) {
?>
<div class="w3-bar w3-theme w3-margin-bottom w3-padding">
<div class="w3-xlarge w3-center">Tersedia <?=$z['kapasitas']?> Kamar</div>
</div>
<?php
} else {
?>
<div class="w3-bar w3-flat-pomegranate w3-margin-bottom w3-padding">
<div class="w3-xlarge w3-center">Kapasitas penuh</div>
</div>
<?php
}
?>
<div class="w3-padding-small w3-large w3-border">
<div class="w3-center"><b>
<div class="w3-padding">
Rp. <?=number_format($z['harga'],0,",",".")?>,-/bulan
</div>
<div class="w3-padding">
Rp. <?=number_format((($z['harga']*12)-((2/100)*($z['harga']*12))),0,",",".")?>,-/tahun
</div>
</b></div>
</div>
</div>
<div class="w3-display-container w3-light-grey
<?php
$ytr = mysql_query("SELECT COUNT(*) AS jumlah FROM fotoFoto WHERE id = $_GET[id]");
$hyc = mysql_fetch_array($ytr);
if($hyc['jumlah'] == 0) {
echo "w3-col l12 m12 s12";
} else {
echo "w3-col l12 m8 s8";
}
?>
">
<div style="width:100%;height:300px;overflow:hidden;">
<center>
<img src="<?=$z['fotoKT']?>" class="w3-margin-bottom" height="300px"/>
</center>
</div>
<div class="w3-display-bottomright">
<button type="button" class="w3-button w3-theme-dark w3-hover-theme w3-xlarge" onClick="alert('No telpon: <?=$z['phone']?>')">
<i class="fa fa-phone" aria-hidden="true"></i>
</button>
<button type="button" class="w3-button w3-theme-dark w3-hover-theme w3-xlarge" onClick="location.href='mailto:<?=$z['email']?>'">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="w3-padding w3-hide-small w3-hide-medium"> </div>
<?php
$sqlpp = mysql_query("SELECT * FROM fotoFoto WHERE id = $_GET[id]");
$xyz = 0;
while ($iii = mysql_fetch_array($sqlpp)) { $xyz++; $fgh = "id" . $xyz;
if($iii['jenis'] == "360") { ?>
<div onclick="document.getElementById('<?=$fgh?>').style.display='block'" class="w3-col l6 m4 s4 w3-hover-opacity w3-display-container">
<div style="width:100%;height:150px;overflow:hidden;">
<div id="panorama<?=$xyz?>" style="width: 100%; height: 150px;"></div>
<script type="text/javascript">
// Create viewer
viewer = pannellum.viewer('panorama<?=$xyz?>', {
"panorama": "<?=$iii['namaFoto']?>",
"autoLoad": true,
"showControls": false,
"mouseZoom": false
});
</script>
</div>
<div class="w3-display-middle w3-xxlarge w3-padding-small w3-circle w3-opacity">360°</div>
</div>
<div id="<?=$fgh?>" class="w3-modal w3-black">
<span onclick="document.getElementById('<?=$fgh?>').style.display='none'" class="w3-xxlarge w3-button w3-display-topright">
<i class="fa fa-times" aria-hidden="true"></i>
</span>
<div class="w3-modal-content w3-round-medium w3-black">
<div class="w3-container w3-padding-16">
<iframe width="100%" height="500px" style="border-style:none;" src="htm/pannellum.htm?panorama=http://localhost/kost/<?=$iii['namaFoto']?>&autoLoad=true"></iframe>
<div class="w3-center w3-margin-top w3-large">FOTO <?=strtoupper($z['nama'])?> <?=$xyz?></div>
</div>
</div>
</div>
<?
} else { ?>
<div onclick="document.getElementById('<?=$fgh?>').style.display='block'" class="w3-col l6 m4 s4">
<div style="width:100%;height:150px;overflow:hidden;">
<img style="width: 100%; height: 150px;" class="w3-hover-opacity" src="<?=$iii['namaFoto']?>"/>
</div>
</div>
<div id="<?=$fgh?>" class="w3-modal w3-black">
<span onclick="document.getElementById('<?=$fgh?>').style.display='none'" class="w3-xxlarge w3-button w3-display-topright">
<i class="fa fa-times" aria-hidden="true"></i>
</span>
<div class="w3-modal-content w3-round-medium w3-black">
<div class="w3-container w3-center">
<img height="500px" src="<?=$iii['namaFoto']?>">
<div class="w3-center w3-margin-top w3-large">FOTO KOST <?=$xyz?></div>
</div>
</div>
</div>
<?
}
}
?>
</div>
</div>
</div>
<?php
if(!isset($_GET['page']) || $_GET['page'] == null) {
//include "tampilUtama.php";
} elseif($_GET['page'] == 'review') {
include "tampilReview.php";
}
?>
<input type="text" name="foto360" id="foto360" value="" hidden/>
<script type="text/javascript">
var lokasi = document.getElementById('foto360').value;
// Create viewer
viewer = pannellum.viewer('header360', {
"panorama": "<?=$z['fotoKM']?>",
"autoLoad": true,
"showControls": false,
"mouseZoom": false,
"autoRotate": 2
});
function openCity(evt, cityName) {
var i, x, tablinks;
x = document.getElementsByClassName("tab");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablink");
for (i = 0; i < x.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" w3-theme", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " w3-theme";
}
</script>
<?php
include "tampil_map.php";
include "bawah.php";
?>