<input name="id" type="hidden" value="' . $id . '"> <button type="button" class="btn btn-primary" onClick="popupFormSubmit(\'index.php?m=a&g=core&p=admin_groups&a=delete\',$(\'form#popupForm\').serialize());"> Supprimer </button> '; break; case 'delete': if (isset($_GET['id'])) { $id = $_GET['id']; } elseif (isset($_POST['id'])) { $id = $_POST['id']; } else { // TODO ERROR } $groupM = new groupManager(); $groupM->delete($id); // TODO confirmation echo 'Le groupe vient d\'être supprimé!'; echo '<script type="text/javascript">dataTable.ajax.reload();</script>'; break; case 'group_user_map': if (isset($_GET['id'])) { $id = $_GET['id']; } elseif (isset($_POST['id'])) { $id = $_POST['id']; } else { // TODO ERROR } echo '<a href="#popup" data-rel="popup" data-position-to="window" onClick="insertLoader(\'#popupContent\');$(\'#popupContent\').load(\'index.php?m=a&g=core&p=admin_groups&a=group_user_map_create_form&id=' . $id . '\');"><span class="iconastic-plus-square"> Ajouter</span></a><BR>'; $q0 = get_link()->prepare("\nSELECT \tm.user_id AS USERID,\n\t\tm.group_id AS GROUPID,\n\t\tu.name AS NAME,\n\t\tu.avatar AS AVATAR, \n\t\tm.id AS MAP_ID\nFROM \n" . get_ini('BDD_PREFIX') . "core_users u,\n" . get_ini('BDD_PREFIX') . "core_groups_users_map m\nWHERE \nm.group_id=:group_id AND \nm.user_id=u.id AND\nu.deleted_date=0 AND\nm.deleted_date=0\nORDER BY u.name ASC"); //deleted_date=0 ORDER BY name