-
Notifications
You must be signed in to change notification settings - Fork 1
/
user.php
executable file
·43 lines (43 loc) · 1.49 KB
/
user.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
<?php
include "header.php";
include_once 'includes/user.inc.php';
$pro = new User($db);
$stmt = $pro->readAll();
?>
<div class="row">
<div class="col-md-6 text-left">
<h4>Data Pengguna</h4>
</div>
<div class="col-md-6 text-right">
<button onclick="location.href='user-baru.php'" class="btn btn-primary">Tambah Data</button>
</div>
</div>
<br/>
<table width="100%" class="table table-striped table-bordered" id="tabeldata">
<thead>
<tr>
<th width="30px">ID</th>
<th>Nama Lengkap</th>
<th>Username</th>
<th width="100px">Action</th>
</tr>
</thead>
<tbody>
<?php
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
?>
<tr>
<td><?php echo $row['id_pengguna'] ?></td>
<td><?php echo $row['nama_lengkap'] ?></td>
<td><?php echo $row['username'] ?></td>
<td class="text-center">
<a href="user-ubah.php?id=<?php echo $row['id_pengguna'] ?>" class="btn btn-warning"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
<a href="user-hapus.php?id=<?php echo $row['id_pengguna'] ?>" onclick="return confirm('Yakin ingin menghapus data')" class="btn btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php include "footer.php"; ?>