0) { $my_temp = array(); foreach ($idChecked as $id){ $my_temp[]= Database::escape_string($id);// forcing the escape_string } $idChecked = $my_temp; $idChecked="'".implode("','",$idChecked)."'"; Database::query("DELETE FROM $tbl_session_rel_course WHERE id_session='$id_session' AND course_code IN($idChecked)",__FILE__,__LINE__); $nbr_affected_rows=mysql_affected_rows(); Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE id_session='$id_session' AND course_code IN($idChecked)",__FILE__,__LINE__); Database::query("UPDATE $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'",__FILE__,__LINE__); } header('Location: '.api_get_self().'?id_session='.$id_session.'&sort='.$sort); exit(); } $limit=20; $from=$page * $limit; $result=Database::query("SELECT code,title,nbr_users FROM $tbl_session_rel_course,$tbl_course WHERE course_code=code AND id_session='$id_session' ORDER BY $sort LIMIT $from,".($limit+1),__FILE__,__LINE__); $Courses=Database::store_result($result); $nbr_results=sizeof($Sessions); $tool_name = api_htmlentities($session_name,ENT_QUOTES,$charset).' : '.get_lang('CourseListInSession'); $interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); $interbreadcrumb[]=array('url' => "session_list.php","name" => get_lang('SessionList')); Display::display_header($tool_name); api_display_tool_title($tool_name); ?>
'; Display::display_footer(); ?>