-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatamaster.php
81 lines (76 loc) · 2.83 KB
/
datamaster.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
<!DOCTYPE html>
<?php
include 'connect.php';
require 'sideindex.php';
?>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Data User</h1>
<?php
if (isset($_POST['nama'])) {
echo $_POST['nama'];
echo ' ';
echo $_POST['email'];
echo ' ';
echo $_POST['username'];
echo ' ';
echo $_POST['password'];
echo ' ';
echo $_POST['level'];
}
?>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- Load Datatable & Bootsrap CSS -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="datatables/lib/css/dataTables.bootstrap.min.css"/>
</head>
<body>
<div class="table-responsive">
<a class="btn btn-primary" href="isidatauser.php">Tambah User</a>
<table class="table table-striped table-bordered table-hover" id="dataTables-example">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>Username</th>
<th>Password</th>
<th>Level</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
include 'connect.php';
$query = mysqli_query($connect,"select * from user");
$no = 1;
while ( $data = mysqli_fetch_array($query) ) {
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $data['nama']; ?></td>
<td><?php echo $data['email']; ?></td>
<td><?php echo $data['username']; ?></td>
<td><?php echo $data['password']; ?></td>
<td><?php echo $data['level']; ?></td>
<td>
<a href='<?php echo "edit_user.php?id=" . $data['id_user'] ?>' class='btn btn-warning btn-sm'>Edit</a>
<a href='<?php echo "delete_user.php?id=" . $data['id_user']?>' class='btn btn-danger btn-sm'>Hapus</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<!-- Load Jquery & Datatable JS -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="datatables/datatables.min.js"></script>
<script type="text/javascript" src="datatables/lib/js/dataTables.bootstrap.min.js"></script>
<script>
</script>
</body>
</html>