fhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhd dfhdfhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhdfh
| DIR:/home/u1105814/www/mountanasikunir.com/admin/modul/mod_detail/ |
| Current File : /home/u1105814/www/mountanasikunir.com/admin/modul/mod_detail/detail.php |
<script LANGUAGE="JavaScript">
<!--
function confirmSubmit() {
var msg;
msg= "Anda yakin akan menghapus?";
var agree=confirm(msg);
if (agree)
return true ;
else
return false ;
}
// -->
</script>
<?php
$module=$_GET['module'];
$aksi="modul/mod_detail/aksi_detail.php";
switch($_GET['act']){
// Tampil Review
default:
echo "
<section class='content'>
<div class='container-fluid'>
<div class='row'>
<div class='col-12'>
<div class='card'>
<div class='card-header'>
<h3 class='card-title'><a onclick=\"window.location.href='?module=detail&act=add';\" class='btn btn-primary'>Tambah</a></h3>
</div>
<div class='card-body'>
<div class='table-responsive'>
<table id='example1' class='table table-bordered table-striped'>
<thead>
<tr>
<th>ID detail</th>
<th>ID Produk</th>
<th>Nama Produk</th>
<th>Teks</th>
<th>Manage</th>
</tr>
</thead>
<tbody>";
$tampil=mysqli_query($connect,"SELECT a.id_detail id_detail,a.id_produk id_produk,b.nama nama, a.teks teks FROM detail a left join produk b on a.id_produk=b.id_produk");
$no=1;
while ($r=mysqli_fetch_array($tampil)){
$id = $r['id_detail'];
$id_produk = $r['id_produk'];
$nama_produk=$r['nama'];
$teks = $r['teks'];
echo "
<tr>
<td>$id</td>
<td>$id_produk</td>
<td>$nama_produk</td>
<td>$teks</td>
<td><a class='btn btn-success' href=?module=detail&act=edit&id=$r[id_detail]>Edit</a> ||<a onclick=\"return confirmSubmit('$r[id_detail]')\" href=$aksi?module=detail&act=hapus&id=$r[id_detail] class='btn btn-danger'>Hapus</a></td>
</tr>";
}
echo "
</table></div>
</div>
</div>
</div>
</div>
</div>
</section>";
break;
case "add":
include "add.php";
break;
case "edit":
include "edit.php";
break;
}
?> |