学习管理系统源代码v1.0
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
session_cache_limiter('none');
session_start();
//print_r($_SESSION);
$path = "../libraries/";
/** The configuration file.*/
require_once $path."configuration.php";
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
try {
$currentUser = EfrontUser :: checkUserAccess();
$smarty -> assign("T_CURRENT_USER", $currentUser);
} catch (Exception $e) {
if ($e -> getCode() == EfrontUserException :: USER_NOT_LOGGED_IN) {
setcookie('c_request', htmlspecialchars_decode(http_build_query($_GET)), time() + 300, false, false, false, true);
}
eF_redirect("index.php?ctg=expired");
exit;
}
if ($GLOBALS['currentTheme'] -> options['sidebar_interface']) {
header("location:".$_SESSION['s_type'].".php".($_SERVER['QUERY_STRING'] ? "?".$_SERVER['QUERY_STRING'] : ''));
//$smarty -> assign("T_SIDEBAR_URL", ""); // set an empty source for horizontal sidebars //$smarty -> assign("T_SIDEFRAME_WIDTH", 0);
}
$smarty -> assign("T_SIDEBAR_MODE", $GLOBALS['currentTheme'] -> options['sidebar_interface']); if ($GLOBALS['currentTheme'] -> options['sidebar_width']) {
$smarty -> assign("T_SIDEFRAME_WIDTH", $GLOBALS['currentTheme'] -> options['sidebar_width']); } else {
$smarty -> assign("T_SIDEFRAME_WIDTH", 175);
}
if (isset($_SESSION['previousSideUrl'])) {
$smarty -> assign("T_SIDEBAR_URL", $_SESSION['previousSideUrl']);
}
if (isset($_GET['dashboard']) && $_SESSION['s_type'] == "administrator") {
$smarty -> assign("T_MAIN_URL", $_SESSION['s_type'].".php?ctg=personal&user=". $_GET['dashboard']);
} elseif (isset($_GET['dashboard']) || $_GET['ctg'] == 'personal') {
$smarty -> assign("T_MAIN_URL", $_SESSION['s_type'].".php?ctg=personal");
} elseif (isset($_GET['ctg']) || $_GET['ctg'] == 'landing_page') {
$smarty -> assign("T_MAIN_URL", $_SESSION['s_type'].".php?ctg=landing_page");
} else {
if (isset($_SESSION['previousMainUrl'])) {
$smarty -> assign("T_MAIN_URL", $_SESSION['previousMainUrl']);
}
}
if (isset($_SESSION['s_type'])) {
$smarty -> display($_SESSION['s_type']."page.tpl");
} else {
eF_redirect("index.php");
}
>
session_cache_limiter('none');
session_start();
$path = "../libraries/";
include_once $path."configuration.php";
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
try {
if (isset($_GET['login']) && $_SESSION['s_login']) {
$currentUser = EfrontUserFactory::factory($_SESSION['s_login']);
$additionalAccounts = unserialize($currentUser -> user['additional_accounts']);
if (in_array($_GET['login'], $additionalAccounts)) {
$newUser = EfrontUserFactory::factory($_GET['login']);
$lessonID = $_SESSION['s_lessons_ID'];
$courseID = $_SESSION['s_courses_ID'];
$currentUser -> logout(session_id());
$newUser -> login($newUser -> user['password'], true);
if ($_SESSION['s_type'] != 'administrator' && $lessonID) {
if ($courseID) {
setcookie('c_request',
$_SESSION['s_type'].'.php?lessons_ID='.$lessonID."&from_course=".$courseID, time() + 300, false, false, false, true);