| Server IP : 172.67.187.206 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : E:/Inetpub/www/news/edu2018/admin/ |
Upload File : |
<script type="text/javascript" language="javascript" >
$(document).ready(function() {
var dataTable = $('#datatable1').DataTable( {
"processing": true,
"serverSide": true,
"pageLength": 10,
"pagingType": "full_numbers",
"ordering": true,
"order": [[0, "desc"]],
"columnDefs": [ {
"targets": 0,
"orderable": false,
"searchable": false
} ],
"ajax":{
url :"fetch.php", // json datasource
type: "post", // method , by default get
error: function(){ // error handling
$(".datatable1-error").html("");
$("#datatable1").append('<tbody class="datatable1-error"><tr><th colspan="3">ไม่พบข้อมูลในฐานข้อมูล</th></tr></tbody>');
$("#datatable1_processing").css("display","none");
}
}
} );
$("#bulkDelete").on('click',function() { // bulk checked
var status = this.checked;
$(".deleteRow").each( function() {
$(this).prop("checked",status);
});
});
$('#deleteTriger').on("click", function(event){ // triggering delete one by one
if( $('.deleteRow:checked').length > 0 ){ // at-least one checkbox checked
var ids = [];
$('.deleteRow').each(function(){
if($(this).is(':checked')) {
ids.push($(this).val());
}
});
var ids_string = ids.toString(); // array to string conversion
$.ajax({
type: "POST",
url: "delete-all.php",
data: {data_ids:ids_string},
success: function(result) {
dataTable.draw(); // redrawing datatable
},
async:false
});
}
});
} );
</script>
<style>
th { font-size: 15px; }
td { font-size: 15px;
}
</style>
<section class="content-header">
<h1>
ข้อมูลนักเรียน
<small>Version 2.0</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Dashboard</li>
</ol>
</section>
<section class="content">
<div class="box">
<div class="box-header">
<h3 class="box-title">ข้อมูลนักเรียน</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="datatable1" class="table table-hover table-datatable table-striped table-bordered">
<thead>
<tr>
<th width="30"><a href="index.php?dash=<?=md5("5");?>&op=mstudent&m=2"><button type="button" class="btn btn-success btn-xs"><span class="glyphicon glyphicon-plus"></span> เพิ่ม</button></a></th>
<th width="100"><center>รหัส</center></th>
<th><center>ชื่อ-นามสกุล</center></th>
<th width="50">ชื่อเล่น</th>
<th width="50" align='center'>ชั้น</th>
<th width="70" align='center'>หอพัก</th>
<th><center>จัดการ</center></th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
</div>
</section>