-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_datatable.php
49 lines (39 loc) · 1.1 KB
/
user_datatable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php include('header.php'); ?>
<?php include('left_sidebar.php'); ?>
<div class="container-fluid">
<div class="row">
<h1 class="text-center">Users</h1>
<div class="">
<a class="btn btn-primary" href="add_user.php">Add User</a>
<?php
$fields = [
'tbl_user',
[
'name' => 'Name' ,
'age' => 'Age',
'dmy' => 'Date/Month/Year',
'nickname' => 'NickName' ,
'is_employee' => 'Employee/User' ,
'none' => 'Action'
],
'table table-responsive table-stripe',
3,
function($data){
return
'<td>
<a class="btn btn-primary" href="edit_user.php?editid='.$data->id .'"><span class="glyphicon glyphicon-edit"></span></a>
<a class="btn btn-danger" onclick="return confirm(\'Are you sure you want to delete this user?\');" href="?delUserid='.$data->id .'"><span class="glyphicon glyphicon-remove"></span></a>
</td>';
}
];
echo $core->dataTable($fields);
?>
</div>
</div>
</div>
<script>
/*function sort_table(elm){
console.log();
}*/
</script>
<?php include('footer.php'); ?>