initial commit

This commit is contained in:
jan.skoda
2024-01-10 12:26:54 +01:00
commit c65052e5c4
62 changed files with 4307 additions and 0 deletions

38
admin/js/users.js Executable file
View File

@@ -0,0 +1,38 @@
$(document).ready(function(){
var usersData = $('#userList').DataTable({
"lengthChange": false,
"processing":true,
"serverSide":true,
"order":[],
"ajax":{
url:"manage_user.php",
type:"POST",
data:{action:'userListing'},
dataType:"json"
},
"columnDefs":[
{
"targets":[0, 4, 5],
"orderable":false,
},
],
"pageLength": 10
});
$(document).on('click', '.delete', function(){
var userId = $(this).attr("id");
var action = "userDelete";
if(confirm("Are you sure you want to delete this user?")) {
$.ajax({
url:"manage_user.php",
method:"POST",
data:{userId:userId, action:action},
success:function(data) {
usersData.ajax.reload();
}
})
} else {
return false;
}
});
});