first commit
This commit is contained in:
57
dev/app/skeluar/tabel_kepada.php
Normal file
57
dev/app/skeluar/tabel_kepada.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
include("../koneksi.php");
|
||||
$surat_id=$_POST['surat_id'];
|
||||
?>
|
||||
|
||||
<script type="text/javascript">$("#tabel_data_kepada_k").DataTable({"paging": false,"lengthChange": false,"searching": false,"ordering": false,"info": false,"autoWidth": false});</script>
|
||||
|
||||
<table id="tabel_data_kepada_k" class="table table-striped table-condensed" cellpadding="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><b>Kepada</b></td>
|
||||
<td><b>Uraian</b></td>
|
||||
<td align="center"><b>Tools</b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="color:black">
|
||||
<?php
|
||||
$d=pg_query("SELECT * FROM kepada WHERE surat_id='$surat_id' ORDER BY id ASC");
|
||||
while($r=pg_fetch_array($d)) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="kiri"><b><?php echo $r['kepada']; ?></b></td>
|
||||
<td><b><?php echo $r['uraian']; ?></b></td>
|
||||
<td class="kanan md_kpd" align="center">
|
||||
<button type="button" name="delete_kepada_k" style="height:22px;"class="btn btn-danger btn-xs delete_kepada_k" id="<?php echo $r['id'];?>" data-content="Hapus" rel="popover" data-placement="top" data-trigger="hover"
|
||||
><i class="fa fa-remove"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
$('button[name="delete_kepada_k"]').popover();
|
||||
|
||||
$("#tabel_data_kepada_k").on('click','.delete_kepada_k',function(){
|
||||
var x = confirm("Anda yakin ingin menghapus ?");
|
||||
if (x) {
|
||||
var key = "delete_kepada_k";
|
||||
var id = $(this).attr('id');
|
||||
var rowElement = $(this).parent().parent();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/skeluar/crud.php",
|
||||
data: 'id='+id
|
||||
+'&key='+key,
|
||||
success: function(data){
|
||||
rowElement.fadeOut(500).remove();
|
||||
$('#tabel_skeluar').load("app/skeluar/tabel.php",{satker:sess_satker,jenis:sess_jenis,sess_nama:sess_nama});
|
||||
}
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user