forked from rizkadwisaputra/inventorybarang
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin.php
61 lines (58 loc) · 2.46 KB
/
admin.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
<?php
$admin = new \Ataslangit\DB\Admin();
if (isset($_GET['hapus'])) {
$admin->hapus_admin($_GET['hapus']);
echo "<script>location='index.php?page=admin';</script>";
}
?>
<div class="row">
<div class="col-md-12">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-heading">
Data Admin
</div>
<div class="panel-body">
<div class="table">
<table class="table table-striped table-bordered table-hover" id="tabelku">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>Password</th>
<th>Foto</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$adm = $admin->tampil_admin();
foreach ($adm as $index => $data) {
?>
<tr class="odd gradeX">
<td><?= $index + 1; ?></td>
<td><?= $data['nama']; ?></td>
<td><?= $data['email']; ?></td>
<td><?= $data['password']; ?></td>
<td>
<img src="gambar_admin/<?= $data['gambar']; ?>" width="90">
</td>
<td>
<a href="index.php?page=ubahadmin&id=<?= $data['kd_admin']; ?>" class="btn btn-info btn-xs"><i class="fa fa-pencil"></i> Edit</a>
<a href="index.php?page=admin&hapus=<?= $data['kd_admin']; ?>" class="btn btn-danger btn-xs" id="alertHapus"><i class="fa fa-trash"></i> Hapus</a>
</td>
</tr>
<?php
} ?>
</tbody>
</table>
</div>
</div>
<div class="panel-footer">
<a href="index.php?page=tambahadmin" class="btn btn-success"><i class="fa fa-plus"></i> Tambah Admin</a>
</div>
</div>
<!--End Advanced Tables -->
</div>
</div>