'session_list.php', "name" => get_lang('SessionList') ); $interbreadcrumb[] = array( 'url' => "session_category_list.php", "name" => get_lang('ListSessionCategory') ); $sql = "SELECT * FROM $tbl_session_category WHERE id='".$id."' ORDER BY name"; $result = Database::query($sql); if (!$infos = Database::fetch_array($result)) { header('Location: session_list.php'); exit(); } list($year_start, $month_start, $day_start) = explode('-', $infos['date_start']); list($year_end, $month_end, $day_end) = explode('-', $infos['date_end']); if (!api_is_platform_admin() && $infos['session_admin_id'] != $_user['user_id'] && !api_is_session_admin()) { api_not_allowed(true); } if (isset($_POST['formSent']) && $_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']; $return = SessionManager::edit_category_session( $id, $name, $year_start, $month_start, $day_start, $year_end, $month_end, $day_end ); if ($return == strval(intval($return))) { Display::addFlash(Display::return_message(get_lang('SessionCategoryUpdate'))); header('Location: session_category_list.php'); exit(); } } $thisYear = date('Y'); $thisMonth = date('m'); $thisDay = date('d'); // display the header Display::display_header($tool_name); if (!empty($return)) { echo Display::return_message($return, 'error', false); } ?>