39 lines
960 B
PHP
39 lines
960 B
PHP
|
<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>asset/css/jquery.dataTables.css">
|
||
|
<div class="col-sm-10" id="contents">
|
||
|
<h3>Barang</h3>
|
||
|
<hr>
|
||
|
<div class="col-sm-10">
|
||
|
<table class="table" id="tbl">
|
||
|
<thead><tr>
|
||
|
<td>Nama</td>
|
||
|
<td>Kode Barang</td>
|
||
|
<td>Harga</td>
|
||
|
<td>Kategori</td>
|
||
|
<td>Stok</td>
|
||
|
<td>Action</td>
|
||
|
</tr></thead>
|
||
|
<tbody>
|
||
|
<?php foreach($table as $tb) {?>
|
||
|
<tr>
|
||
|
<td><?php echo $tb['nama']; ?></td>
|
||
|
<td><?php echo $tb['kdbarang']; ?></td>
|
||
|
<td><?php echo $tb['harga']; ?></td>
|
||
|
<td><?php echo $tb['kategori'] ?></td>
|
||
|
<td><?php echo $tb['stok'] ?></td>
|
||
|
<td>View Edit Delete</td>
|
||
|
</tr>
|
||
|
<?php } ?>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script src="<?php echo base_url()?>asset/js/jquery.dataTables.js"></script>
|
||
|
<script>
|
||
|
$(document).ready(function(){
|
||
|
$('#tbl').DataTable({
|
||
|
"pageLength": 5,
|
||
|
"lengthMenu": [ 5, 10, 25, 50, 75, 100 ],
|
||
|
"processing": true
|
||
|
});
|
||
|
});
|
||
|
</script>
|