-
Notifications
You must be signed in to change notification settings - Fork 0
/
tescovid.php
176 lines (164 loc) · 8.11 KB
/
tescovid.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
<?php
require 'function.php';
if (!isset($_SESSION["login"])) {
header("Location: login_form.php");
}
$id_user = $_SESSION["login"];
$users = query("SELECT * FROM users WHERE Id_user='$id_user'");
$Photo_profile = findRow("SELECT Photo_profile FROM users WHERE Id_user='$id_user'", "Photo_profile");
$result = query("SELECT * FROM users_status WHERE id_user='$id_user'");
$status_kesehatan = findRow("SELECT * FROM users_status WHERE id_user='$id_user'",'Status_kesehatan');
$status_vaksinasi = findRow("SELECT * FROM users_status WHERE id_user='$id_user'",'Status_vaksinasi');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hasil Test Covid</title>
<link rel="icon" href="img/logo.ico" type="image/icon type">
<link rel="stylesheet" href="CSS/tescovid.css">
</head>
<body>
<div class="container">
<div class="navbar">
<div class="logo">
<div class="icon">
</div>
<h3>PeduliLindungi</h3>
</div>
<div class="atasan">
<a href="index.php#beranda">Beranda</a>
<a href="index.php#tentang">Tentang</a>
<a href="index.php#statistik">Statistik</a>
<a href="index.php#Bahasa">Bahasa</a>
</div>
<?php if (isset($_SESSION["login"])) : ?>
<?php foreach ($users as $user) : ?>
<div class="account">
<div class="photo-profil">
<?php if (strlen($Photo_profile) > 1) : ?>
<div class="custom" style="background-image: url(img/user-pic/<?= $user["Photo_profile"] ?>);">
</div>
<?php else : ?>
<div class="default">
<h4><?= substr($user["Nama"], 0, 1) ?></h4>
</div>
<?php endif; ?>
</div>
<?php if (strlen($user["Nama"]) >= 11) : ?>
<h3><?= substr($user["Nama"], 0, 11) ?>..</h3>
<img src="img/sort-down.png" class="dropdown" alt="" srcset="">
<?php else : ?>
<h3><?= $user["Nama"] ?></h3>
<img src="img/sort-down.png" class="dropdown" alt="" srcset="">
<?php endif; ?>
<div class="dropbtn">
<div class="dropdown-content">
<a href="account.php">
<img src="img/login.png" alt="">
Profil
</a>
<a href="logout.php">
<img src="img/exit.png" alt="">
Keluar
</a>
</div>
</div>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="not_login">
<a href="login_form.php">Login</a>/
<a href="register_form.php">Register</a>
</div>
<?php endif; ?>
</div>
<div class="group-col">
<div class="col2">
<div class="header-col2">
<h2>Status vaksinasi & tes COVID-19</h2>
</div>
<div class="main">
<div class="group-col2">
<div class="group-tex">
<p id="head-namatanggal">Nama NIK & Tanggal Lahir</p>
<?php foreach ($users as $key): ?>
<div class="nama-col2">
<p><pre>Nama Lengkap : <?= $key["Nama"] ?></pre></p>
</div>
<div class="nik-col2">
<p><pre>NIK : <?= $key["Nik"] ?></pre></p>
</div>
<div class="ttl-col2">
<p><pre>Tanggal Lahir : <?= $key["Tanggal_lahir"] ?></pre></p>
</div>
<?php endforeach; ?>
</div>
<?php foreach ($users as $key): ?>
<?php if (strlen($Photo_profile) > 1): ?>
<div class="foto-profile" style="background-image: url(img/user-pic/<?= $key["Photo_profile"] ?>);">
</div>
<?php else: ?>
<div class="foto-profile" style="background-color: #F4BF00;">
<h1><?= substr($key["Nama"],0,1) ?></h1>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<p id="head-status">Status kesehatan kamu </p>
<div class="status-kesehatan">
<?php if ($status_kesehatan == "Merah"): ?>
<div class="simbol" style="background-color: red;">
</div>
<p id="detail-status">Kamu tidak di izinkan pergi ke tempat umum</p>
<?php elseif($status_kesehatan == "Kuning"): ?>
<div class="simbol" style="background-color: orange;">
</div>
<p id="detail-status">Kamu bisa pergi ke tempat umum dengan bebas (dalam pengawasan)</p>
<?php else: ?>
<div class="simbol">
</div>
<p id="detail-status">Kamu bisa pergi ke tempat umum dengan bebas</p>
<?php endif ?>
</div>
</div>
<div class="status-vaksinasi">
<img src="img/vaccination.png" alt="" id="vaksin">
<?php if ($status_vaksinasi == "1"): ?>
<p id="vaksin-none">belum melakukan vaksinasi</p>
<img src="img/remove.png" alt="" srcset="" id="remove">
<?php elseif($status_vaksinasi == "2"): ?>
<p>vaksinasi dosis ke 2</p>
<img src="img/check.png" alt="" srcset="" id="check">
<?php else: ?>
<p>vaksinasi dosis ke 3</p>
<img src="img/check.png" alt="" srcset="" id="check">
<?php endif; ?>
</div>
<div class="hasil-test">
<h4>Hasil test COVID-19</h4>
<div class="swab">
<img src="img/lab-microscope.png" alt="" srcset="" id="swab">
<div class="caption-swab">
<p>Swab PCR</p>
<p style="font-size: 13px; color: gray;">Tidak ada</p>
</div>
</div>
<div class="anti-gen">
<img src="img/experiment.png" alt="" srcset="" id="antigen">
<div class="caption-antigen">
<p>Antigen</p>
<p style="font-size: 13px; color: gray;">Tidak ada</p>
</div>
</div>
<div class="update-status">
<a href="">update status kesehatan kamu disini!</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>