'index.php',"name" => get_lang('PlatformAdmin')); $interbreadcrumb[]=array('url' => "session_list.php","name" => get_lang('SessionList')); list($year_start,$month_start,$day_start) = explode('-',$infos['date_start']); list($year_end,$month_end,$day_end) = explode('-',$infos['date_end']); $end_year_disabled = $end_month_disabled = $end_day_disabled = ''; if ($_POST['formSent']) { $formSent = 1; $name = $_POST['name']; $year_start = $_POST['year_start']; $month_start = $_POST['month_start']; $day_start = $_POST['day_start']; $year_end = $_POST['year_end']; $month_end = $_POST['month_end']; $day_end = $_POST['day_end']; $nb_days_acess_before = $_POST['nb_days_access_before']; $nb_days_acess_after = $_POST['nb_days_access_after']; //$nolimit = $_POST['nolimit']; $id_coach = $_POST['id_coach']; $id_session_category = $_POST['session_category']; $id_visibility = $_POST['session_visibility']; $end_limit = $_POST['end_limit']; $start_limit = $_POST['start_limit']; if (empty($end_limit) && empty($start_limit)) { $nolimit = 1; } else { $nolimit = null; } $return = SessionManager::edit_session($id,$name,$year_start,$month_start,$day_start,$year_end,$month_end,$day_end,$nb_days_acess_before,$nb_days_acess_after,$nolimit, $id_coach, $id_session_category,$id_visibility,$start_limit,$end_limit); if ($return == strval(intval($return))) { header('Location: resume_session.php?id_session='.$return); exit(); } } $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username'; $sql="SELECT user_id,lastname,firstname,username FROM $tbl_user WHERE status='1'".$order_clause; if ($_configuration['multiple_access_urls']) { $table_access_url_rel_user= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); $access_url_id = api_get_current_access_url_id(); if ($access_url_id != -1) { $sql="SELECT DISTINCT u.user_id,lastname,firstname,username FROM $tbl_user u INNER JOIN $table_access_url_rel_user url_rel_user ON (url_rel_user.user_id = u.user_id) WHERE status='1' AND access_url_id = '$access_url_id' $order_clause"; } } $result = Database::query($sql); $Coaches = Database::store_result($result); $thisYear = date('Y'); // display the header Display::display_header($tool_name); // display the tool title // api_display_tool_title($tool_name); if (!empty($return)) { Display::display_error_message($return,false); } ?>