-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
125 lines (116 loc) · 4.25 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>NIK CHECKER</title>
<link rel="icon" type="image/jpeg" href="https://avatars.githubusercontent.com/u/52845610" />
<style>
body {
font-family: sans-serif;
}
.panel {
width: 400px;
}
.input-group {
position: relative;
}
.input {
padding: 10px;
background: white;
border-radius: 2px;
outline: none;
color: #444444 !important;
border: 1px solid #0da2ff !important;
width: 327.14px;
}
.placeholder {
position: absolute;
top: 10px;
left: 8px;
font-size: 14px;
padding: 0px 5px;
color: #0da2ff !important;
transition: 0.3s;
pointer-events: none;
}
.input:focus+.placeholder,
.input:not(:placeholder-shown)+.placeholder {
top: -10px;
background-color: white;
}
</style>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<br><br><br><br><br>
<center>
<div class="panel panel-primary">
<div class="panel-heading">Cek Nomor Induk Kependudukan</div>
<div class="panel-body">
<table class='table' style='width: 20px'>
<tr>
<td colspan="2">
<form action="." method="post">
<div class="input-group">
<input type="number" class="input" placeholder=" " name="nik" maxlength="16" />
<label class="placeholder">Masukan NIK</label>
</div>
</form>
</td>
</tr>
<?php
if (isset($_POST['nik'])) {
include 'functions.php';
$get_nik = $_POST['nik'];
$parsed = parseNik($get_nik);
if ($parsed->status == "false") {
echo "<tr>
<td colspan=2>
<div class='alert alert-danger'>
<strong>$parsed->message</strong>
</div>
</td>
</tr>";
} else {
echo "
<tr>
<td>Nomor Urut</td>
<td><input value='$parsed->urutan' disabled></td>
</tr>
<tr>
<td>Jenis Kelamin</td>
<td><input value='$parsed->jenis_kelamin' disabled></td>
</tr>
<tr>
<td>Tanggal Lahir</td>
<td><input value='$parsed->lahir' disabled></td>
</tr>
<tr>
<td>Kecamatan</td>
<td><input value='$parsed->kecamatan' disabled></td>
</tr>
<tr>
<td>Kodepos</td>
<td><input value='$parsed->kodepos' disabled></td>
</tr>
<tr>
<td>Kabupaten/Kota</td>
<td><input value='$parsed->kota' disabled></td>
</tr>
<tr>
<td>Provinsi</td>
<td><input value='$parsed->provinsi' disabled></td>
</tr>
</table>";
}
} else {
echo "</table>";
}
?>
</div>
</div>
</body>
</html>