add sppd to git repo
This commit is contained in:
76
app/master/item/tabel_jtspj.php
Normal file
76
app/master/item/tabel_jtspj.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
include('../../koneksi.php');
|
||||
?>
|
||||
|
||||
<script type="text/javascript">$("#tabel_data_jtspj").DataTable({"stateSave": true,"paging": true,"lengthChange": true,"searching": true,"ordering": false,"info": true,"autoWidth": false});</script>
|
||||
<table id="tabel_data_jtspj" class="table table-striped table-bordered table-condensed tb_master" cellpadding="1" >
|
||||
<thead style="font-weight:bold">
|
||||
<tr>
|
||||
<td align="center" width="40px;">ID</td>
|
||||
<td align="center">Jumlah Hari</td>
|
||||
<td align="center" width="60px;">Tools</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="color:black">
|
||||
<?php
|
||||
$data = pg_query("SELECT id,jumlah_hari FROM sp_seting_hari ORDER BY id ASC");
|
||||
while($row=pg_fetch_array($data)) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="kiri" align="center"><?php echo $row['id']; ?></td>
|
||||
<td align="center"><?php echo $row['jumlah_hari']; ?></td>
|
||||
<td align="center" class="kanan">
|
||||
<button type="button" name="edit_jtspj" style="height:22px;" class="btn btn-teal btn-xs edit_jtspj" id="<?php echo $row['id'];?>" data-content="Edit Data" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||
<i class="fa fa fa-pencil"></i>
|
||||
</button>
|
||||
<!--
|
||||
<button type="button" name="delete_jtspj" style="height:22px;"class="btn btn-danger btn-xs delete_jtspj" id="<?php echo $row['id'];?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||
<i class="fa fa-remove"></i>
|
||||
</button>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#tabel_data_jtspj").on('click','.edit_jtspj',function(){
|
||||
var id = $(this).attr('id');
|
||||
$('#modal_jtspj').modal('show');
|
||||
$('#modal_body_jtspj').html("");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/master/item/modal_jtspj.php",
|
||||
data: 'id='+id,
|
||||
success: function(data){
|
||||
$('#modal_body_jtspj').html(data);
|
||||
$('#jumlah_hari_jtspj').first().focus().selected();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#tabel_data_jtspj").on('click','.delete_jtspj',function(){
|
||||
var x = confirm("Anda yakin ingin menghapus ?");
|
||||
if (x) {
|
||||
var key = "delete_jtspj";
|
||||
var id = $(this).attr('id');
|
||||
var rowElement = $(this).parent().parent();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/master/item/crud.php",
|
||||
data: 'id='+id
|
||||
+'&key='+key,
|
||||
success: function(data){
|
||||
rowElement.fadeOut(500).remove();
|
||||
}
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user