/
daftar_kendaraan.php
196 lines (180 loc) · 9.25 KB
/
daftar_kendaraan.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>E-Parking</title>
<!-- start: Css -->
<link rel="stylesheet" type="text/css" href="asset/css/bootstrap.min.css">
<script type="text/javascript" src="asset/js/jquery.min.js"></script>
<script type="text/javascript" src="asset/js/bootstrap.min.js"></script>
<!-- plugins -->
<link rel="stylesheet" type="text/css" href="asset/css/plugins/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/animate.min.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/nouislider.min.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/select2.min.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/ionrangeslider/ion.rangeSlider.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/ionrangeslider/ion.rangeSlider.skinFlat.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/bootstrap-material-datetimepicker.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/simple-line-icons.css"/>
<link rel="stylesheet" type="text/css" href="asset/css/plugins/mediaelementplayer.css"/>
<link href="asset/css/style.css" rel="stylesheet">
<!-- end: Css -->
<link rel="shortcut icon" href="asset/img/logo.png">
</head>
<?php
include "config/koneksi.php";
$username = $_GET['nama'];
$cek_isi = mysqli_num_rows(mysqli_query($con, "SELECT * FROM tb_daftar_parkir"));
$cek_mobil = mysqli_num_rows(mysqli_query($con, "SELECT * FROM tb_daftar_parkir WHERE jenis ='Mobil'"));
$cek_motor = mysqli_num_rows(mysqli_query($con, "SELECT * FROM tb_daftar_parkir WHERE jenis ='Motor'"));
$cek_lainnya = mysqli_num_rows(mysqli_query($con, "SELECT * FROM tb_daftar_parkir WHERE jenis ='Truk/Bus/Lainnya'"));
?>
<body class="dashboard topnav">
<!-- start: Header -->
<nav class="navbar navbar-default header navbar-fixed-top bg-teal">
<div class="col-md-12 nav-wrapper">
<div class="navbar-header" style="width:100%;">
<div class="navbar-brand" style="margin-left: -10px;" name="home_logo">
<img src="asset/img/logo.png" class="img-circle" alt="logo" style="float: left;margin-top: -10px;" width="45px"/>
<b style="float: left;margin-left: 4px;">E-Parking</b>
</div>
<ul class="nav navbar-nav search-nav" style="margin-left: 7%">
<li><a href="home.php?nama=<?= $username ?>"><span style="font-size: 18pt">Home</a></span></li>
<li class="active"><a style="font-size: 18pt">Daftar Kendaraan</a></li>
</ul>
<ul class="nav navbar-nav navbar-right user-nav">
<li class="user-name"><span><?php echo $username ?></span></li>
<li class="dropdown avatar-dropdown">
<img src="asset/img/petugas.png" class="img-circle avatar" alt="username" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="cursor: pointer;" />
<ul class="dropdown-menu user-dropdown">
<li>
<ul>
<a href="?logout">
<li style="float: left;"><span class="fa fa-power-off "></span></li>
<li style="color: black; float: left;margin-left: 10px">Log Out</li>
</a>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- end: Header -->
<!-- Content -->
<div id="content">
<!-- Jumlah Kendaraan -->
<div class="col-md-4 col-sm-4 col-xs-12" style="margin-top: 30px;">
<div class="col-md-12 panel">
<div class="col-md-12 panel-heading bg-teal">
<h4 style="color: white;font-size: 20pt;">Jumlah Motor</h4>
</div>
<div class="panel-body" style="text-align: center;font-size: 64pt;">
<?= $cek_motor ?>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12" style="margin-top: 30px;">
<div class="col-md-12 panel">
<div class="col-md-12 panel-heading bg-teal">
<h4 style="color: white;font-size: 20pt;">Jumlah Mobil</h4>
</div>
<div class="panel-body" style="text-align: center;font-size: 64pt;">
<?= $cek_mobil ?>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12" style="margin-top: 30px;">
<div class="col-md-12 panel">
<div class="col-md-12 panel-heading bg-teal">
<h4 style="color: white;font-size: 20pt;">Jumlah Truk/Bus/Lainnya</h4>
</div>
<div class="panel-body" style="text-align: center;font-size: 64pt;">
<?= $cek_lainnya ?>
</div>
</div>
</div>
<!-- End: Jumlah Kendaraan -->
<!-- Daftar Kendaraan Yang Parkir -->
<div class="col-md-6 col-sm-12 col-xs-12" style="margin-top: 10px;">
<div class="col-md-12 panel">
<div class="col-md-12 panel-heading bg-teal">
<h4 style="color: white;font-size: 20pt;">Daftar Kendaraan <span class="right" style="color : #9B2335; font-weight: bold; text-align: right; padding-right: 10px;">Terisi : <?= $cek_isi ?></span></h4>
</div>
<div class="panel-body">
<div class="table-responsive col-md-12 col-sm-12 col-xs-12">
<table class="table table-hover" width="100%" cellspacing="0">
<thead>
<tr style="font-size: 13pt">
<th style="max-width: 120px;">Kode</th>
<th style="max-width: 250px;">Plat Nomor</th>
<th>Jenis</th>
<th>Merk</th>
<th style="max-width: 200px;">Jam Masuk</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tb_daftar_parkir WHERE status = '1'";
$query = mysqli_query($con, $sql);
while ($data = mysqli_fetch_array($query)) {?>
<tr style="font-size: 11pt">
<td><?php echo $data['kode'] ?></td>
<td><?php echo $data['plat_nomor'] ?></td>
<td><?php echo $data['jenis'] ?></td>
<td><?php echo $data['merk'] ?></td>
<td><?php echo $data['jam_masuk'] . " WIB" ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- end:Daftar Kendaraan Yang Parkir -->
<!-- History Kendaraan -->
<div class="col-md-6 col-sm-12 col-xs-12" style="margin-top: 10px;">
<div class="col-md-12 panel">
<div class="col-md-12 panel-heading bg-teal">
<h4 style="color: white;font-size: 20pt;">History</h4>
</div>
<div class="panel-body">
<div class="table-responsive col-md-12 col-sm-12 col-xs-12">
<table class="table" width="100%" cellspacing="0">
<thead>
<tr style="font-size: 13pt">
<th style="max-width: 120px;">Kode</th>
<th style="max-width: 250px;">Plat Nomor</th>
<th>Jenis</th>
<th>Merk</th>
<th style="max-width: 200px;">Jam Masuk</th>
<th style="max-width: 200px;">Jam Keluar</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tb_daftar_parkir WHERE status = '2'";
$query = mysqli_query($con, $sql);
while ($data = mysqli_fetch_array($query)) {?>
<tr style="font-size: 11pt">
<td><?php echo $data['kode'] ?></td>
<td><?php echo $data['plat_nomor'] ?></td>
<td><?php echo $data['jenis'] ?></td>
<td><?php echo $data['merk'] ?></td>
<td><?php echo $data['jam_masuk'] . " WIB" ?></td>
<td><?php echo $data['jam_keluar'] . " WIB" ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- end:History Kendaraan -->
</div>
</body>
</html>