-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuser.php
More file actions
54 lines (51 loc) · 2.05 KB
/
user.php
File metadata and controls
54 lines (51 loc) · 2.05 KB
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
<?php include('./template/head.php') ?>
<?php include('./php/connection.php') ?>
<?php include('./template/nav.php') ?>
<div class="container pt-5">
<h3 class="text-secondary">Data Konsumen</h3>
<hr>
<div class="table-responsive pt-3">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Nama Lengkap</th>
<th>Username</th>
<th class="text-center">
<a href="./user.add.php" class="btn btn-warning btn-sm">
<i class="bi bi-plus"></i>
</a>
</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT
*
FROM
pengguna
WHERE
role = 0
;";
$query = mysqli_query($connection, $sql);
$i = 1;
?>
<?php while(list($id, $nama, $username, $kata_sandi, $role) = mysqli_fetch_array($query)): ?>
<tr>
<td><?= $i ?></td>
<td><?= $nama ?></td>
<td><?= $username ?></td>
<td>
<div class="d-flex justify-content-evenly">
<a href="./user.edit.php?id=<?= $id ?>" class="btn btn-info btn-sm"><i class="bi bi-pencil-square"></i></a>
<a href="./user.delete.php?id=<?= $id ?>" class="btn btn-danger btn-sm"><i class="bi bi-trash"></i></a>
</div>
</td>
<?php $i++ ?>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
<?php include('./template/foot.php') ?>