- Beeznest * * @package chamilo.auth */ if (isset($_REQUEST['action']) && Security::remove_XSS($_REQUEST['action']) !== 'subscribe') { $stok = Security::get_token(); } else { $stok = Security::getTokenFromSession(); } $action = !empty($_REQUEST['action']) ? Security::remove_XSS($_REQUEST['action']) : 'display_courses'; global $actions; $action = in_array($action, $actions) ? $action : 'display_courses'; $showCourses = CoursesAndSessionsCatalog::showCourses(); $showSessions = CoursesAndSessionsCatalog::showSessions(); $pageCurrent = isset($pageCurrent) ? $pageCurrent : isset($_GET['pageCurrent']) ? (int) $_GET['pageCurrent'] : 1; $pageLength = isset($pageLength) ? $pageLength : isset($_GET['pageLength']) ? (int) $_GET['pageLength'] : CoursesAndSessionsCatalog::PAGE_LENGTH; $pageTotal = (int) ceil((int) $countCoursesInCategory / $pageLength); $cataloguePagination = $pageTotal > 1 ? CourseCategory::getCatalogPagination($pageCurrent, $pageLength, $pageTotal) : ''; $searchTerm = isset($_REQUEST['search_term']) ? Security::remove_XSS($_REQUEST['search_term']) : ''; $codeType = isset($_REQUEST['category_code']) ? Security::remove_XSS($_REQUEST['category_code']) : ''; $date = date('Y-m-d'); if ($showSessions && isset($_POST['date'])) { $date = $_POST['date']; } $userInfo = api_get_user_info(); $code = isset($code) ? $code : null; ?>
".get_lang('Search results for:')." ".$searchTerm."
";
}
$showTeacher = api_get_setting('display_teacher_in_courselist') === 'true';
$ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote';
$user_id = api_get_user_id();
$categoryListFromDatabase = CourseCategory::getCategories();
$categoryList = [];
if (!empty($categoryListFromDatabase)) {
foreach ($categoryListFromDatabase as $categoryItem) {
$categoryList[$categoryItem['code']] = $categoryItem['name'];
}
}
if (!empty($browse_courses_in_category)) {
echo '