-
Notifications
You must be signed in to change notification settings - Fork 0
/
users-show.php
68 lines (53 loc) · 1.41 KB
/
users-show.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
<?php
$title = 'Lihat Pengguna';
require_once "template/theHeader.php";
isAuth();
middleware(['admin']);
?>
<div class="level">
<div class="level-left">
<div class="level-item">
<h1 class="title is-4">Lihat Pengguna</h1>
</div>
</div>
<div class="level-right">
<div class="level-item">
<a href="users-edit.php?id=<?= $_GET['id'] ?>" class="button is-light">Edit</a>
</div>
<div class="level-item">
<a href="users.php" class="button is-light">Kembali</a>
</div>
</div>
</div>
<hr>
<?php
if (isset($_GET['id'])) {
$query = $conn->query(sprintf("SELECT * FROM users WHERE id_user_055 = %s", $_GET['id']));
$item = $query->fetch_object();
} else {
return header('Location:users.php');
}
?>
<div class="field">
<label class="label">Nama Lengkap</label>
<pre><?= $item->nama_user_055; ?></pre>
</div>
<div class="field">
<label class="label">Nama Pengguna</label>
<pre><?= $item->username_user_055; ?></pre>
</div>
<div class="field">
<label class="label">Peran</label>
<pre><?= $item->role_user_055; ?></pre>
</div>
<div class="field">
<label class="label">Telepon/Hp</label>
<pre><?= $item->telepon_user_055; ?></pre>
</div>
<div class="field">
<label class="label">Alamat</label>
<pre><?= $item->alamat_user_055; ?></pre>
</div>
<?php
require_once "template/theFooter.php"
?>