-
Notifications
You must be signed in to change notification settings - Fork 0
/
person_012.php
82 lines (71 loc) · 2.53 KB
/
person_012.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Data Person 081911633012</title>
<link href="style.css?<?= filemtime("style.css") ?>" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div class="header">
<h1>Data Person</h1>
</div>
<div class="tambah">
<form action="add.php">
<input type="submit" name="submit" id="submit" value="Tambah">
</form>
</div>
<br>
<div class="table">
<table class="table">
<tr>
<th class="idperson">IDPerson</th>
<th>Nama</th>
<th>Alamat</th>
<th>Control</th>
</tr>
<?php
include("connect.php");
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$indicator = $row["idperson"];
if ($row["status"] == 1) {
$status = "Active";
} else {
$status = "Deactive";
};
echo
"<tr><td>"
. $row["idperson"] . "</td><td>"
. $row["nama"] . "</td><td>"
. $row["alamat"] . "</td><td>";
if ($row["status"] == 1) {
echo
"<div class='control'>
<a href='detail.php?id=$indicator' id='detail' name='detail'>Detail</a>
<a href='edit.php?id=$indicator' id='edit'>Edit</a>
<a href='updatestatus.php?id=$indicator' id='status'>$status</a></td>
</div></tr>";
} else {
echo
"<div class='fcontrol'>
<a href='' id='fdetail' name='detail'>Detail</a>
<a href=''id='fedit'>Edit</a>
<a href='updatestatus.php?id=$indicator' id='fstatus'>$status</a></td>
</div></tr>";
}
}
echo "</table>";
} else {
echo "0 results";
}
$conn->close();
?>
</table>
</div>
<div class="footer">
<p>Halim Wildan Awalurahman (081911633012). 2021.</p>
</div>
</body>
</html>