-
Notifications
You must be signed in to change notification settings - Fork 0
/
pemilik-dashboard.php
131 lines (128 loc) · 4.29 KB
/
pemilik-dashboard.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
<?php
require 'functions.php';
session_start();
$id_pemilik_kos = $_COOKIE['id_pemilik'];
if(!isset($_SESSION["login"])){
header("Location: pemilik-login.php");
exit;
}
$dashboard = query("SELECT COUNT(k.id_kos) AS jumlah_kos, COALESCE(MAX(k.price), 0) AS max_price, COALESCE(MIN(k.price), 0) AS min_price FROM `kos` AS k RIGHT JOIN `pemilik_kos` AS pk USING (id_pemilik_kos) GROUP BY id_pemilik_kos HAVING id_pemilik_kos=$id_pemilik_kos")[0];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include("header.php");
?>
</head>
<body>
<div class="page-dashboard">
<div class="d-flex" id="wrapper" data-aos="fade-right">
<!-- Sidebar -->
<div class="border-right" id="sidebar-wrapper">
<div class="sidebar-heading text-center">
<img src="images/logo.png" alt="" class="my-4" />
</div>
<div class="list-group list-group-flush">
<a
href="pemilik-dashboard.php"
class="list-group-item list-group-item-action active"
>Dashboard</a
>
<a
href="pemilik-iklan.php"
class="list-group-item list-group-item-action"
>List Kos</a
>
<a
href="buat-iklan.php"
class="list-group-item list-group-item-action"
>Buat Iklan</a
>
<a
href="pemilik-account.php"
class="list-group-item list-group-item-action"
>My Account</a
>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<?php
include('template/_navbar-pemilik.php');
?>
<div
class="section-content section-dashboard-home"
data-aos="fade-up"
>
<div class="container-fluid">
<div class="dashboard-heading">
<h2 class="dashboard-title">Dashboard</h2>
<p class="dashboard-subtitle">
Ringkasan data kos-kosan anda
</p>
</div>
<div class="dashboard-content">
<div class="row">
<div class="col-md-4">
<div class="card mb-2">
<div class="card-body">
<div class="dashboard-card-title">
Jumlah Kos
</div>
<div class="dashboard-card-subtitle">
<?= $dashboard["jumlah_kos"] ?>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-2">
<div class="card-body">
<div class="dashboard-card-title">
Harga Kos Termurah
</div>
<div class="dashboard-card-subtitle">
<?= $dashboard["min_price"] ?>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-2">
<div class="card-body">
<div class="dashboard-card-title">
Harga Kos Termahal
</div>
<div class="dashboard-card-subtitle">
<?= $dashboard["max_price"] ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
</div>
<!-- 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>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function (e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
</body>
</html>