-
Notifications
You must be signed in to change notification settings - Fork 0
/
pelanggan-show.php
64 lines (49 loc) · 1.32 KB
/
pelanggan-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
<?php
$title = 'Lihat Pelanggan';
require_once "template/theHeader.php";
isAuth();
middleware(['admin', 'waiter']);
?>
<div class="level">
<div class="level-left">
<div class="level-item">
<h1 class="title is-4">Lihat Pelanggan</h1>
</div>
</div>
<div class="level-right">
<div class="level-item">
<a href="pelanggan-edit.php?id=<?= $_GET['id'] ?>" class="button is-light">Edit</a>
</div>
<div class="level-item">
<a href="pelanggan.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:pelanggan.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">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"
?>