-
Notifications
You must be signed in to change notification settings - Fork 0
/
details.php
86 lines (79 loc) · 2.2 KB
/
details.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
<?php
$id_kos=$_GET["id_kos"];
session_start();
;
if(!isset($_SESSION["login"])){
header("Location: login.php");
exit;
}
require 'functions.php';
$kosdetails = query("SELECT `id_kos`, `name`, `title`, `price`, (`price`*12) AS `yearly_price`, `description`, `id_location`, `no_hp` FROM `kos` INNER JOIN `pemilik_kos` USING (`id_pemilik_kos`) WHERE `id_kos`=$id_kos")[0];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include("header.php");
?>
</head>
<body>
<!-- Navigation -->
<?php
include("template/navbar.php")
?>
<!-- Page Content -->
<div class="page-content page-details">
<?php
include("template/_kos-breadcrumb.php");
include("template/_kos-gallery.php");
?>
<div class="store-details-container" data-aos="fade-up">
<?php
include("template/_kos-heading.php");
include("template/_kos-description.php");
?>
</div>
</div>
<footer>
<?php
include("footer.php")
?>
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.slim.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
<script>
AOS.init();
</script>
<script src="vendor/vue/vue.js"></script>
<script>
var gallery = new Vue({
el: "#gallery",
mounted() {
AOS.init();
},
data: {
activePhoto: 0,
photos: [
<?php $kosimages = query("SELECT `picture` FROM `kos_galleries` WHERE `id_kos`=$id_kos ORDER BY `id_picture` DESC LIMIT 4 ");?>
<?php $i = 1; ?>
<?php foreach ($kosimages as $rowimages) : ?>
{
id: <?php echo $i;?>,
url: "images/kos/<?php echo $rowimages['picture'];?>",
},
<?php $i++; ?>
<?php endforeach; ?>
],
},
methods: {
changeActive(id) {
this.activePhoto = id;
},
},
});
</script>
<script src="script/navbar-scroll.js"></script>
</body>
</html>