// TODO ERROR } $userM = new userManager(); $userM->delete($id); // TODO confirmation echo 'L\'utilisateur vient d\'être supprimé!'; echo '<script type="text/javascript">dataTable.ajax.reload();</script>'; break; // Display the table content // Display the table content case 'jsonList': $dataArray['data'] = array(); $q0 = get_link()->prepare("SELECT id AS ID,mail AS MAIL, name AS DISPLAYNAME, avatar AS AVATAR FROM " . get_ini('BDD_PREFIX') . "core_users WHERE deleted_date=0 ORDER BY name ASC"); $q0->execute(); while ($r0 = $q0->fetch(PDO::FETCH_OBJ)) { list($avatarWidth, $avatarHeight) = getNewSizePicture($r0->AVATAR, "48", "48"); array_push($dataArray['data'], array("ID" => $r0->ID, "MAIL" => $r0->MAIL, "DISPLAYNAME" => $r0->DISPLAYNAME, "AVATAR" => '<img src="' . $r0->AVATAR . '" width="' . $avatarWidth . '" height="' . $avatarHeight . '">', "ACTION" => '<a href="#" data-toggle="modal" data-target="#popup" onClick="insertLoader(\'#popupContent\');setPopupTitle(\'Modifier un utilisateur\');$(\'#popupContent\').load(\'index.php?m=a&g=core&p=admin_users&a=update_form&id=' . $r0->ID . '\');"><span class="iconastic-edit-write"> Modifier </span></a> <a href="#" data-toggle="modal" data-target="#popup" onClick="insertLoader(\'#popupContent\');setPopupTitle(\'Supprimer un utilisateur\');$(\'#popupContent\').load(\'index.php?m=a&g=core&p=admin_users&a=delete_form&id=' . $r0->ID . '\');"><span class="iconastic-minus-line"> Supprimer</span></a>')); } $q0->closeCursor(); echo json_encode($dataArray); break; // Display Html table container // Display Html table container default: echo ' <div class="box"> <div class="box-header"> <h3 class="box-title">Liste des utilisateurs</h3> <a href="#popup" data-toggle="modal" data-target="#popup" onClick="insertLoader(\'#popupContent\');setPopupTitle(\'Ajouter un utilisateur\');$(\'#popupContent\').load(\'index.php?m=a&g=core&p=admin_users&a=create_form\');"><span class="iconastic-plus-square"> Ajouter</span></a> </div> <div class="box-body">
nxt(); }); } } $(document).ready(function() { $('#backgroundTaskLoad<?php echo $mtRand; ?> ').load('index.php?m=j');taskLoad(); }); // ---------------------------------- // </script> <style> <?php // Display the logo to the right height/width for mobile device list($logoWidth, $logoHeight) = getNewSizePicture(get_ini('LOGO'), "32", "16"); echo '@media (max-width: 60em) {#mainLogo {height: ' . $logoHeight . 'px;width: ' . $logoWidth . 'px;}}'; ?> </style> </head> <body class="hold-transition skin-blue <?php $userM = new userManager(); if ($userM->getIdByName('#core#_#0#') == $_SESSION['USER_ID']) { echo ' sidebar-collapse '; } ?> sidebar-mini"> <div class="wrapper" id="wrapper"> <header class="main-header">