-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpenumpang.php
225 lines (209 loc) · 6.61 KB
/
penumpang.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
<?php
session_start();
include 'db.php';
if (!$conn) {
die("<script>alert('Gagal tersambung dengan database.')</script>");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/ico" href="images/favicon.ico">
<title>Display</title>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Refresh Page -->
<meta http-equiv="refresh" content="30">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous" />
<title>Baggage Check</title>
<style>
body {
background-image: url("images/test.png");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.blink {
animation: blinker 1.5s linear infinite;
color: red;
font-family: sans-serif;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
</style>
</head>
<body onload="startTime()">
<header>
<div class="container mt-5 mb-2">
<div class="row">
<div class="col">
<nav class="navbar navbar-light">
<a href="#" class="navbar-brand">
<h1>Airport Baggage Check Service</h1>
</a>
<div class="form-inline">
<h4 class="mr-2" id="currentDate"></h4>
<h4 class="" id="currentTime"></h4>
</div>
</nav>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row d-flex justify-content-center">
<table class="table table-light table-stripped table-striped text-center shadow rounded-lg">
<thead class="thead-dark">
<tr>
<th>No.</th>
<th>Nomor Penerbangan</th>
<th>Nama</th>
<th>Tanggal</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<!-- Menampilkan Data yang ada di Database -->
<?php
$no = 1;
$tampil = mysqli_query($conn, "SELECT * FROM `tb_suspek` WHERE `status` like 'Aktif' ORDER BY `tanggal_simpan` DESC;");
while ($data = mysqli_fetch_array($tampil)) {
$nama_penumpang = explode("-", $data['nama_penumpang']); // Split the names by hyphen
$implode_nama = implode(" ", $nama_penumpang); // Implode the names with space
?>
<tr>
<td>
<?= $no++ ?>
</td>
<td>
<?= $data['nomor_penerbangan'] ?>
</td>
<td>
<?= $implode_nama ?>
</td>
<td>
<?= toDate_ID($data['tanggal_simpan']) ?>
</td>
<td class="blink">
<?= $data['status'] ?>
</td>
<?php } ?>
<tr>
</tr>
</tbody>
</table>
</div>
<div class="row d-flex justify-content-center">
<div class="col">
<div class="alert alert-info text-center" role="alert">
Bagi Nama yang Tertera Segera Hubungi Posko AVSEC
</div>
</div>
</div>
</div>
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col d-flex align-items-center">
<a href="/" class="mb-3 me-2 mb-md-0 text-muted text-decoration-none lh-1">
<svg class="bi" width="30" height="24">
<use xlink:href="#bootstrap"></use>
</svg>
</a>
<!-- <span class="mb-3 mb-md-0 text-muted">© 2022 Company, Inc</span> -->
<marquee onmouseout='this.start()' onmouseover='this.stop()' scrollamount='10'><img src="images/ap1logo.png"
width="60" height="30" />  SELAMAT DATANG DI TERMINAL 1 BANDAR UDARA INTERNASIONAL JUANDA
SURABAYA  <img src="images/ap1logo.png" width="60" height="30" />  JANGAN MENINGGALKAN BARANG
BAWAAN ANDA TANPA PENGAWASAN  <img src="images/ap1logo.png" width="60" height="30" />  DO NOT
LEAVE YOUR LUGGAGE UNATTENDED  <img src="images/ap1logo.png" width="60" height="30" />  SILENT
AIRPORT SUDAH DIBERLAKUKAN, MOHON PARA PENUMPANG SELALU MEMPERHATIKAN INFORMASI PENERBANGAN PADA MONITOR FIDS
YANG TERSEDIA. TERIMAKASIH.  <img src="images/ap1logo.png" width="60" height="30" />  SILENT
AIRPORT POLICY HAS BEEN ENFORCED, PASSANGERS ARE ADVISED TO CHECK FLIGHT INFORMATION ON AVAILABLE FIDS SCREEN.
THANK YOU.  </marquee>
</div>
</footer>
</div>
<?php
function toDate_ID($tanggal)
{
$date = new DateTime($tanggal);
$date_now = $date->format('d-m-Y');
$hour_now = $date->format('H:i:s');
$month = array(
1 => 'Januari',
'Februari',
'Maret',
'April',
'Mei',
'Juni',
'Juli',
'Agustus',
'September',
'Oktober',
'November',
'Desember'
);
$var = explode('-', $date_now);
return $var[0] . ' ' . $month[(int) $var[1]] . ' ' . $var[2] . ' ' . $hour_now;
}
?>
<script>
var today = new Date(); /* new date object */
var month = [
"",
"Januari",
"Februari",
"Maret",
"April",
"Mei",
"Juni",
"Juli",
"Agustus",
"September",
"Oktober",
"November",
"Desember",
];
var date =
today.getDate() +
" " +
month[today.getMonth() + 1] +
" " +
today.getFullYear();
/* display current date */
document.getElementById("currentDate").innerHTML = date;
/* Auto refreshing clock time */
function startTime() {
var today = new Date(); /* new date object */
/* getting minutes hours and seconds from date object */
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
/* 12 hour time formate */
var amPm = "AM";
if (hours > 13) {
amPm = "PM";
}
/* put zero before numbers < 10 */
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
var time = hours + " : " + minutes + " : " + seconds + " " + amPm;
/* display current time */
document.getElementById("currentTime").innerHTML = time;
/* Auto refreshing time every 1 second */
setTimeout(function () {
startTime();
}, 1000);
}
</script>
</body>
</html>