/** * Set positions of control panel elements * * This page is used to store the positions of the users' control panel elements * * @package eFront * @version 1.0 */ session_cache_limiter('none'); session_start(); $path = "../libraries/"; /** Configuration file.*/ include_once $path . "configuration.php"; try { $currentUser = EfrontUser::checkUserAccess(); } catch (Exception $e) { echo "<script>parent.location = 'index.php?logout=true&message=" . urlencode($e->getMessage() . ' (' . $e->getCode() . ')') . "&message_type=failure'</script>"; //This way the frameset will revert back to single frame, and the annoying effect of 2 index.php, one in each frame, will not happen exit; } try { if ($_SESSION['s_lessons_ID']) { $currentLesson = new EfrontLesson($_SESSION['s_lessons_ID']); } elseif ($_POST['lessons_ID']) { $currentLesson = new EfrontLesson($_POST['lessons_ID']); } if (isset($currentUser->coreAccess['settings']) && $currentUser->coreAccess['settings'] != 'change') { throw new Exception(); } } catch (Exception $e) {
// Date in the past header("cache-control: no-transform"); //To prevent 3G carriers from compressing the site, which will break all grids //If the page is shown as a popup, make sure it remains in such mode if (!isset($_GET['reset_popup']) && (isset($_GET['popup']) || isset($_POST['popup']) || isset($_SERVER['HTTP_REFERER']) && strpos(strtolower($_SERVER['HTTP_REFERER']), 'popup') !== false && strpos(strtolower($_SERVER['HTTP_REFERER']), 'reset_popup') === false)) { output_add_rewrite_var('popup', 1); $smarty->assign("T_POPUP_MODE", true); $popup = 1; } setcookie("parent_sid", session_id(), time() + 3600, "/"); //We use this for the editor, in order to work with branch urls. See also browse.php, image.php on how it's used $message = ''; $message_type = ''; //Initialize messages, because if register_globals is turned on, some messages will be displayed twice try { $currentUser = EfrontUser::checkUserAccess(false, 'professor'); if ($currentUser->user['user_type'] == 'administrator') { throw new Exception(_ADMINISTRATORCANNOTACCESSLESSONPAGE, EfrontUserException::RESTRICTED_USER_TYPE); } $smarty->assign("T_CURRENT_USER", $currentUser); } catch (Exception $e) { if ($e->getCode() == EfrontUserException::USER_NOT_LOGGED_IN && !isset($_GET['ajax'])) { setcookie('c_request', htmlspecialchars_decode(basename($_SERVER['REQUEST_URI'])), time() + 300, false, false, false, true); } eF_redirect("index.php?ctg=expired"); exit; } if (isset($_SESSION['s_index_comply'])) { eF_redirect("index.php?ctg=" . $_SESSION['s_index_comply']); exit; }
//If the page is shown as a popup, make sure it remains in such mode if (!isset($_GET['reset_popup']) && (isset($_GET['popup']) || isset($_POST['popup']) || isset($_SERVER['HTTP_REFERER']) && strpos(strtolower($_SERVER['HTTP_REFERER']), 'popup') !== false && strpos(strtolower($_SERVER['HTTP_REFERER']), 'reset_popup') === false)) { output_add_rewrite_var('popup', 1); $smarty->assign("T_POPUP_MODE", true); $popup = 1; } $search_message = $message = $message_type = ''; //Initialize messages, because if register_globals is turned on, some messages will be displayed twice $load_editor = false; $loadScripts = array(); try { if ($_GET['student']) { $currentUser = EfrontUserFactory::factory('student', false, 'student'); $currentUser->login($currentUser->user['password'], true); } else { $currentUser = EfrontUser::checkUserAccess(false, 'student'); } if ($currentUser->user['user_type'] == 'administrator') { throw new Exception(_ADMINISTRATORCANNOTACCESSLESSONPAGE, EfrontUserException::RESTRICTED_USER_TYPE); } $smarty->assign("T_CURRENT_USER", $currentUser); } catch (Exception $e) { if ($e->getCode() == EfrontUserException::USER_NOT_LOGGED_IN && !isset($_GET['ajax'])) { setcookie('c_request', htmlspecialchars_decode(basename($_SERVER['REQUEST_URI'])), time() + 300); } eF_redirect("index.php?ctg=expired"); exit; } if (isset($_SESSION['s_index_comply'])) { eF_redirect("index.php?ctg=" . $_SESSION['s_index_comply']); exit;
//To prevent 3G carriers from compressing the site, which will break all grids //pr($_SESSION); //If the page is shown as a popup, make sure it remains in such mode if (!isset($_GET['reset_popup']) && (isset($_GET['popup']) || isset($_POST['popup']) || isset($_SERVER['HTTP_REFERER']) && strpos(strtolower($_SERVER['HTTP_REFERER']), 'popup') !== false && strpos(strtolower($_SERVER['HTTP_REFERER']), 'reset_popup') === false && !strpos(strtolower($_SERVER['HTTP_REFERER']), 'evaluation'))) { output_add_rewrite_var('popup', 1); $smarty->assign("T_POPUP_MODE", true); $popup = 1; } setcookie("parent_sid", session_id(), time() + 3600, "/"); //We use this for the editor, in order to work with branch urls. See also browse.php, image.php on how it's used $message = $message_type = $search_message = ''; //Initialize messages, because if register_globals is turned on, some messages will be displayed twice $load_editor = false; $loadScripts = array(); try { $currentUser = EfrontUser::checkUserAccess('administrator'); $smarty->assign("T_CURRENT_USER", $currentUser); } catch (Exception $e) { if ($e->getCode() == EfrontUserException::USER_NOT_LOGGED_IN && !isset($_GET['ajax'])) { setcookie('c_request', htmlspecialchars_decode(basename($_SERVER['REQUEST_URI'])), time() + 300, false, false, false, true); } eF_redirect("index.php?ctg=expired"); exit; } if (isset($_SESSION['s_index_comply'])) { eF_redirect("index.php?ctg=" . $_SESSION['s_index_comply']); exit; } if (!isset($_GET['ajax']) && !isset($_GET['postAjaxRequest']) && !isset($popup) && !isset($_GET['tabberajax'])) { $_SESSION['previousMainUrl'] = $_SERVER['REQUEST_URI']; }