forked from rizkadwisaputra/inventorybarang
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsupplier.php
55 lines (52 loc) · 2.16 KB
/
supplier.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
<?php
$supplier = new \Ataslangit\DB\Supplier();
if (isset($_GET['hapus'])) {
$supplier->hapus_supplier($_GET['hapus']);
echo "<script>location='index.php?page=supplier';</script>";
}
?>
<div class="row">
<div class="col-md-12">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-heading">
Data Supplier
</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>Alamat</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$sp = $supplier->tampil_supplier();
foreach ($sp as $index => $data) {
?>
<tr class="odd gradeX">
<td><?= $index + 1; ?></td>
<td><?= $data['nama_supplier']; ?></td>
<td><?= $data['alamat']; ?></td>
<td>
<a href="index.php?page=ubahsupplier&id=<?= $data['kd_supplier']; ?>" class="btn btn-info btn-xs"><i class="fa fa-pencil"></i> Edit</a>
<a href="index.php?page=supplier&hapus=<?= $data['kd_supplier']; ?>" 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=tambahsupplier" class="btn btn-success"><i class="fa fa-plus"></i> Tambah Supplier</a>
</div>
</div>
<!--End Advanced Tables -->
</div>
</div>