-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
460 lines (404 loc) · 19 KB
/
index.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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<script type="text/javascript" src="files/bower_components/sweetalert1/sweetalert.min.js"></script>
<?php
session_start();
error_reporting(0);
include 'auth/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PPDB Online - SMKN 5 Kota Bekasi</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="" />
<meta name="keywords" content="PPDB Online, PPDB SMK" />
<meta name="author" content="Zamzam Saputra - itszami.my.id" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="https://files.itszami.my.id/files/5e9de3ec54a74.jpg" />
<link href='http://fonts.googleapis.com/css?family=Quicksand:400,700%7CPT+Serif:400,700' rel='stylesheet' type='text/css'>
<!-- Required Fremwork -->
<link rel="stylesheet" type="text/css" href="files\bower_components\bootstrap\css\bootstrap.min.css">
<!-- themify-icons line icon -->
<link rel="stylesheet" type="text/css" href="files\assets\icon\themify-icons\themify-icons.css">
<!-- ico font -->
<link rel="stylesheet" type="text/css" href="files\assets\icon\icofont\css\icofont.css">
<!-- feather Awesome -->
<link rel="stylesheet" type="text/css" href="files\assets\icon\feather\css\feather.css">
<!-- Datatables -->
<link rel="stylesheet" type="text/css" href="files\bower_components\datatables.net-bs4\css\dataTables.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="files\bower_components\datatables.net-responsive-bs4\css\responsive.bootstrap4.min.css">
<!-- Date-time picker css -->
<link rel="stylesheet" type="text/css" href="files\assets\pages\advance-elements\css\bootstrap-datetimepicker.css">
<!-- Date-range picker css -->
<link rel="stylesheet" type="text/css" href="files\bower_components\bootstrap-daterangepicker\css\daterangepicker.css">
<!-- Date-Dropper css -->
<link rel="stylesheet" type="text/css" href="files\bower_components\datedropper\css\datedropper.min.css">
<!-- Color Picker css -->
<link rel="stylesheet" type="text/css" href="files\bower_components\spectrum\css\spectrum.css">
<!-- Mini-color css -->
<link rel="stylesheet" type="text/css" href="files\bower_components\jquery-minicolors\css\jquery.minicolors.css">
<!-- Style.css -->
<link rel="stylesheet" type="text/css" href="files\assets\css\style.css">
<link rel="stylesheet" type="text/css" href="files\assets\css\linearicons.css">
<link rel="stylesheet" type="text/css" href="files\assets\css\jquery.mCustomScrollbar.css">
<style type="text/css">*{font-family: quicksand;}</style>
</head>
<body>
<div class="page-body">
<div class="container">
<div class="row">
<div class="col-lg-12" style="margin-top: 10px;">
<div class="card p-20 z-depth-4 waves-effect" data-toggle="tooltip" data-placement="top" title="Judul Dan Informasi" style="box-shadow: 7px 7px 20px">
<div class="card-body">
<h4>Selamat Datang di PPDB SMK Negeri 5 Kota Bekasi</h4>
<p>Apabila anda sudah melakukan pendaftaran anda bisa cari status anda
berdasarkan <b>Kode Pendaftaran</b> dan anda bisa cek Status peserta yang lolos dan tidak lolos, klik tombol "Cek Status"</p>
<button class="btn btn-primary btn-round" data-toggle="modal" data-target="#alurPpdb">Alur PPDB</button>
<button class="btn btn-success btn-round" data-toggle="modal" data-target="#brosurPpdb">Download Brosur</button>
<a href="peserta/register" class="btn btn-info btn-round">Daftar</a>
<a href="status" class="btn btn-danger btn-round">Cek Status</a>
</div>
</div>
</div>
</div>
<div class="card p-20 z-depth-4 waves-effect" data-toggle="tooltip" data-placement="top" title="Pencarian Pendaftar Berdasarkan Kode Pendaftaran" style="box-shadow: 7px 7px 20px">
<div class="card-header">
<h5>Cari berdasarkan Nomor Pendaftaran</h5>
<span>Yuk cek status pendaftaran anda sekarang juga, dengan memasukkan Nomor Pendaftaran</span>
</div>
<div class="card-body">
<div class="row seacrh-header" style="margin-top: -30px">
<div class="col-lg-12 col-xs-12">
<form action="" method="get">
<div class="input-group input-group-button input-group-primary">
<input type="text" class="form-control" name="code" placeholder="Search here.." required="">
<button type="submit" class="btn btn-primary input-group-addon" id="basic-addon1">Search</button>
</div><br>
</form>
<div class="form-group">
<?php
if (isset($_GET['code']) === true) {
$dataSearch = htmlentities(strip_tags(trim($_GET['code'])));
$check = mysqli_query($link, "SELECT * FROM data_pendaftar WHERE kode_pendaftar = '$dataSearch'");
$checkCode = mysqli_fetch_array($check);
if ($dataSearch !== $checkCode['kode_pendaftar']) {
echo "<script type='text/javascript'>
setTimeout(function () {
swal({
icon: 'error',
closeOnClickOutside: false,
closeOnEsc: false,
dangerMode: true,
className: 'red-bg',
buttons: false,
title: 'Ooopss, Error',
text: 'Kode Pendaftaran tidak ditemukan',
type: 'error',
timer: 3000,
showConfirmButton: false
});
},10);
window.setTimeout(function(){
window.location.replace('index');
} ,3000);
</script>";
return false;
}
$dataQuery = mysqli_query($link, "SELECT * FROM data_pendaftar JOIN data_asal_sekolah ON data_pendaftar.id_pendaftar=data_asal_sekolah.id_siswa JOIN status_pendaftaran ON data_pendaftar.id_pendaftar=status_pendaftaran.id_siswa WHERE kode_pendaftar = '$dataSearch'");
$rowDataSearch = mysqli_fetch_array($dataQuery);
?>
<div class="dt-responsive table-responsive">
<table class="table table-striped table-bordered nowrap">
<thead class="bg-dark">
<tr>
<th>Nama</th>
<th>Jenis Kelamin</th>
<th>TTL</th>
<th>Asal Sekolah</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td><?= ucwords(strtolower($rowDataSearch['nama_lengkap'])) ?></td>
<td><?php
if($rowDataSearch['jenis_kelamin'] === 'L'){
echo 'Laki-Laki';
}else{
echo 'Perempuan';
}
?>
</td>
<td><?= $rowDataSearch['tempat_lahir'] ?>, <?= date('d F Y', strtotime($rowDataSearch['tanggal_lahir'])) ?></td>
<td><?= ucwords(strtolower($rowDataSearch['nama_sekolah'])) ?></td>
<td>
<a href="" class="btn btn-success btn-sm btn-round" data-toggle="modal" data-target="#detailSearch<?= $rowDataSearch['kode_pendaftar'] ?> ">Detail</a>
</td>
</tr>
</tbody>
</table>
</div>
<?php } ?>
</div>
<div class="form-group">
<?php if (isset($_SESSION['kode_pendaftar'])): ?>
<p><b>Kode Pendaftaran</b> anda adalah : <?= $_SESSION['kode_pendaftar']; ?><br>
</p>
<?php endif ?>
<?php if (isset($_GET['code'])): ?>
Copy dan simpan link pendafaran anda : <a href="#" onclick="btnDetail()">Copy Link</a>
<?php endif ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="card p-20 z-depth-4 waves-effect" data-toggle="tooltip" data-placement="top" title="Table siswa yang baru daftar" style="box-shadow: 7px 7px 20px">
<div class="card-header">
<h5>Peserta Terdaftar</h5>
<span>Berikut ini adalah data peserta (siswa) yang telah berhasil mendaftarkan dirinya</span>
</div>
<div class="card-block">
<div class="dt-responsive table-responsive">
<table id="dataPesertaTerdaftar" class="table table-striped table-bordered nowrap">
<thead class="bg-dark">
<tr>
<th>No</th>
<th>Nama</th>
<th>Jenis Kelamin</th>
<th>TTL</th>
<th>Asal Sekolah</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
$querySelect = $link->query('SELECT * FROM data_pendaftar JOIN data_asal_sekolah ON data_pendaftar.id_pendaftar=data_asal_sekolah.id_siswa ORDER BY id_pendaftar DESC');
foreach ($querySelect as $key => $value) {
?>
<tr>
<td><?= $no; ?></td>
<td><?= ucwords(strtolower($value['nama_lengkap'])) ?></td>
<td>
<?php
if ($value['jenis_kelamin'] === "L") {
echo "Laki-laki";
}else{
echo "Perempuan";
}
?>
</td>
<td><?= $value['tempat_lahir'] ?>, <?= date('d F Y', strtotime($value['tanggal_lahir'])) ?></td>
<td><?= ucwords(strtolower($value['nama_sekolah'])) ?></td>
</tr>
<?php $no++; ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="text-center p-10">
<b>Copyright © 2020 by <a href="https://www.itszami.my.id">Zamzam Saputra</a></b>
</div>
</div>
</div>
<!-- Modal Detail Search -->
<?php if (isset($_GET['code'])): ?>
<div class="modal fade" id="detailSearch<?= $rowDataSearch['kode_pendaftar'] ?>" tabindex="-1" role="dialog" aria-labelledby="detailAndEditLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="detailAndEditLabel">Detail - <?= $rowDataSearch['nama_lengkap'] ?> (<?= $rowDataSearch['kode_pendaftar'] ?>)</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="nama_sekolah">Nama Asal Sekolah</label>
<input type="text" class="form-control" readonly="" value="<?= ucwords(strtolower($rowDataSearch['nama_sekolah'])) ?>">
</div>
<div class="form-group">
<label for="alamat_sekolah">Alamat Asal Sekolah</label>
<textarea class="form-control" readonly="" rows="3"><?= $rowDataSearch['alamat_sekolah'] ?></textarea>
</div>
<div class="form-group">
<label for="no_telp">No Telepon</label>
<input type="text" class="form-control" readonly="" value="<?= $rowDataSearch['no_telp'] ?>">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="text" class="form-control" readonly="" value="<?= $rowDataSearch['email'] ?>">
</div>
<div class="form-group">
<label for="status_pendaftaran">Status Pendaftaran</label>
<?php if ($rowDataSearch['status'] === "pengecekan"): ?>
<div class="alert alert-warning background-warning">
Pengecekan
</div>
<?php endif ?>
<?php if ($rowDataSearch['status'] === "tidak_lolos"): ?>
<div class="alert alert-danger background-danger">
Tidak Lolos
</div>
<?php endif ?>
<?php if ($rowDataSearch['status'] === "lolos"): ?>
<div class="alert alert-success background-success">
Lolos
</div>
<?php endif ?>
<?php if ($rowDataSearch['status'] === "tidak_valid"): ?>
<div class="alert alert-danger background-danger">
Tidak Valid
</div>
<?php endif ?>
<?php if ($rowDataSearch['status'] === "verifikasi"): ?>
<div class="alert alert-info background-info">
Verifikasi
</div>
<?php endif ?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-round" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<?php endif ?>
<?php
$queryBrosur = mysqli_query($link, "SELECT gambar FROM uploads WHERE type = 'brosur' ORDER BY id DESC LIMIT 1");
$getBrosur = mysqli_fetch_array($queryBrosur);
?>
<!-- Modal Brosur -->
<div class="modal fade" id="brosurPpdb" tabindex="-1" role="dialog" aria-labelledby="brosurPpdbLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="brosurPpdbLabel">Brosur PPDB</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<img src="gambar/<?= $getBrosur['gambar'] ?>" style="height: 312px; width: 100%;">
</div>
<div class="form-group text-center">
<h4>
<a href="gambar/brosur" onl>Download</a> | <a href="#" onclick="bagikanBrosur()">Bagikan</a>
</h4>
<div class="form-group">
<p id="bagikanRest"></p>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-round" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<?php
$queryAlur = mysqli_query($link, "SELECT * FROM uploads WHERE type = 'alur' ORDER BY id DESC LIMIT 1");
$getAlur = mysqli_fetch_array($queryAlur);
?>
<!-- Modal Brosur -->
<div class="modal fade" id="alurPpdb" tabindex="-1" role="dialog" aria-labelledby="brosurPpdbLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="brosurPpdbLabel">Alur PPDB</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<img src="gambar/<?= $getAlur['gambar'] ?>" style="height: 312px; width: 100%;">
</div>
<div class="form-group text-center">
<p><a href="gambar/alur">Download</a> | <a href="#" onclick="bagikanAlur()">Bagikan</a></p>
<p id="bagikanRestAlur"></p>
</div>
<div class="form-group">
<p><?= $getAlur['deskripsi'] ?></p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-round" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Required Jquery -->
<script type="text/javascript" src="files\bower_components\jquery\js\jquery.min.js"></script>
<script type="text/javascript" src="files\bower_components\jquery-ui\js\jquery-ui.min.js"></script>
<script type="text/javascript" src="files\bower_components\popper.js\js\popper.min.js"></script>
<script type="text/javascript" src="files\bower_components\bootstrap\js\bootstrap.min.js"></script>
<!-- jquery slimscroll js -->
<script type="text/javascript" src="files\bower_components\jquery-slimscroll\js\jquery.slimscroll.js"></script>
<!-- modernizr js -->
<script type="text/javascript" src="files\bower_components\modernizr\js\modernizr.js"></script>
<script type="text/javascript" src="files\bower_components\modernizr\js\css-scrollbars.js"></script>
<!-- data-table js -->
<script type="text/javascript" src="files\bower_components\datatables\jquery.dataTables.min.js"></script>
<script type="text/javascript" src="files\bower_components\datatables\dataTables.bootstrap4.min.js"></script>
<!-- Bootstrap date-time-picker js -->
<script type="text/javascript" src="files\assets\pages\advance-elements\moment-with-locales.min.js"></script>
<script type="text/javascript" src="files\bower_components\bootstrap-datepicker\js\bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="files\assets\pages\advance-elements\bootstrap-datetimepicker.min.js"></script>
<!-- Date-range picker js -->
<script type="text/javascript" src="files\bower_components\bootstrap-daterangepicker\js\daterangepicker.js"></script>
<!-- Date-dropper js -->
<script type="text/javascript" src="files\bower_components\datedropper\js\datedropper.min.js"></script>
<!-- Color picker js -->
<script type="text/javascript" src="files\bower_components\spectrum\js\spectrum.js"></script>
<script type="text/javascript" src="files\bower_components\jscolor\js\jscolor.js"></script>
<!-- Mini-color js -->
<script type="text/javascript" src="files\bower_components\jquery-minicolors\js\jquery.minicolors.min.js"></script>
<script type="text/javascript" src="files\assets\pages\advance-elements\custom-picker.js"></script>
<!-- SweetAlert -->
<script type="text/javascript" src="files/bower_components/sweetalert/js/sweetalert2.js"></script>
<!-- Accordion js -->
<script type="text/javascript" src="files\assets\pages\accordion\accordion.js"></script>
<script type="text/javascript" src="files/bower_components/bootstrap-validate/bootstrap-validate.js"></script>
<!-- i18next.min.js -->
<script>
function btnDetail(){
Swal.fire({
text: 'https://ppdb.itszami.my.id/?code=<?= $rowDataSearch['kode_pendaftar'] ?>',
showConfirmButton: false,
})
}
</script>
<script>
$(document).ready(function() {
$('#dataPesertaTerdaftar').DataTable();
} );
</script>
<!-- Ajax -->
<script type="text/javascript" src="src/files/ajax/scriptAjax.js"></script>
<!-- Get Wilayah -->
<script type="text/javascript" src="wilayah/scriptWilayah.js"></script>
<!-- Validate -->
<script type="text/javascript" src="src/files/bootstrapValidateIndex/validateFormIndex.js"></script>
<script type="text/javascript">
function bagikanBrosur(){
var url = 'https://ppdb.itszami.my.id/gambar/<?= $getBrosur['gambar'] ?>';
document.getElementById('bagikanRest').innerHTML=url;
}
</script>
<script type="text/javascript">
function bagikanAlur(){
var url = 'https://ppdb.itszami.my.id/gambar/<?= $getAlur['gambar'] ?>';
document.getElementById('bagikanRestAlur').innerHTML=url;
}
</script>
</body>
</html>