0 ) { $idChecked=implode(',',$idChecked); Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE id_session='$id_session' AND course_code='".addslashes($course_code)."' AND id_user IN($idChecked)"); $nbr_affected_rows=Database::affected_rows(); Database::query("UPDATE $tbl_session_rel_course SET nbr_users=nbr_users-$nbr_affected_rows WHERE id_session='$id_session' AND course_code='".addslashes($course_code)."'"); } header('Location: '.api_get_self().'?id_session='.$id_session.'&course_code='.urlencode($course_code).'&sort='.$sort); exit(); } $limit=20; $from=$page * $limit; $is_western_name_order = api_is_western_name_order(); $result=Database::query("SELECT u.user_id,".($is_western_name_order ? 'u.firstname, u.lastname' : 'u.lastname, u.firstname').", u.username FROM $tbl_session_rel_course_rel_user scru, $tbl_user u WHERE u.user_id=scru.id_user AND scru.id_session='$id_session' AND scru.status<>2 AND scru.course_code='".addslashes($course_code)."' ORDER BY $sort LIMIT $from,".($limit+1)); $Users=Database::store_result($result); $nbr_results=sizeof($Users); $tool_name = get_lang('ListOfUsersSubscribedToCourse').' "'.api_htmlentities($course_title,ENT_QUOTES,$charset).'" '.get_lang('ForTheSession').' "'.api_htmlentities($session_name,ENT_QUOTES,$charset).'"'; $interbreadcrumb[]=array("url" => "index.php","name" => get_lang('AdministrationTools')); $interbreadcrumb[]=array("url" => "session_list.php","name" => get_lang('SessionList')); $interbreadcrumb[]=array("url" => "session_course_list.php?id_session=$id_session","name" => get_lang('ListOfCoursesOfSession')." "".api_htmlentities($session_name,ENT_QUOTES,$charset)."""); Display::display_header($tool_name); api_display_tool_title($tool_name); ?>