-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathticket.php
91 lines (82 loc) · 2.81 KB
/
ticket.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
<?php
require 'function.php';
global $db;
if (isset($_SESSION["login"])) {
$id = $_SESSION["login"];
$status = $_GET["status"];
} else {
$status = '';
header("Location: index.php");
}
$check_kewarganegaraan = findRow("SELECT * FROM users WHERE Id_user='$id'", 'Kewarganegaraan');
$data = query("SELECT * FROM checkin WHERE id_user='$id'")
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Checkin</title>
<link rel="stylesheet" href="CSS/ticket.css">
</head>
<body>
<div class="ticket">
<?php if ($status === 'diizinkan') : ?>
<div class="title">
<h2>Checkin Berhasil!</h2>
<img src="img/check.png" alt="" srcset="">
</div>
<?php else : ?>
<div class="title">
<h2 style="color: #F44336;">Checkin Gagal!</h2>
<img src="img/remove.png" alt="" srcset="">
</div>
<?php endif; ?>
<!-- <div class="holes-top"></div> -->
<div class="holes-lower"></div>
<div class="ticket2">
<?php foreach ($data as $key) : ?>
<div class="data-ticket">
<h4>Nama</h4>
<p style="font-size: 15px;"><?= $key["Nama"] ?></p>
</div>
<?php if ($check_kewarganegaraan === 'indonesia') : ?>
<div class=" data-ticket">
<h4>Nik</h4>
<p style="font-size: 15px;"><?= $key["Nik"] ?></p>
</div>
<?php else : ?>
<div class=" data-ticket">
<h4>Nomor_paspor</h4>
<p style="font-size: 15px;"><?= $key["Nomor_paspor"] ?></p>
</div>
<?php endif; ?>
<div class=" data-ticket">
<h4>Lokasi</h4>
<p style="font-size: 15px;"><?= $key["lokasi"] ?></p>
</div>
<div class="data-ticket">
<h4>tanggal & waktu/Hari ini</h4>
<p style="font-size: 15px;"><?= $key["tanggal"] ?></p>
</div>
<?php endforeach; ?>
</div>
<div class=" holes-lower">
</div>
<p id="pesan">
Selalu terapkan 3M <br>
1. Mencuci tangan <br>
2. Menjaga jarak <br>
3. Memakai masker
</p>
<?php if ($status === 'diizinkan') : ?>
<div class="btn" style="background-color: #0ED678;">
<a href="index.php">SELESAI</a>
</div>
<?php else : ?>
<div class="btn" style="background-color: #F44336;">
<a href="index.php?status=gagal">SELESAI</a>
</div>
<?php endif; ?>
</div>
</body>
</html>