1、精品文档就在这里 -------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------- --------------------------------------------------------------------------------------------------------------------------------------------
2、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();
3、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=ex
4、pired"); 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
5、 //$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
6、']); } 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", $_SESSI
7、ON['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_MA
8、IN_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("ind
9、ex.php"); } ?>
10、f (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
11、 = 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) {
12、 if ($courseID) { setcookie('c_request', $_SESSION['s_type'].'.php?lessons_ID='.$lessonID."&from_course=".$courseID, time() + 300, false, false, false, true); } else { setcookie('c_request', $_SESSION['s_type'].'.php?lessons_ID='.$lessonID, time() + 300); }
13、 } unset($_SESSION['referer']); $redirectPage = $GLOBALS['configuration']['login_redirect_page']; if ($redirectPage == "user_dashboard" && $newUser -> user['user_type'] != "administrator") { echo 'userpage.php?ctg=personal'; }elseif (strpos($redirectPage, "module") !== fals
14、e) { echo 'userpage.php?ctg=landing_page'; } else { echo 'userpage.php'; } } } } catch (Exception $e) { handleAjaxExceptions($e); } ?>
15、p"; 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 { $languages = EfrontSystem::getLanguages(true); if (isset($_GET['lessons_ID']) && eF_checkParameter($_GET['lessons_ID'], 'id')) { $lesson = n
16、ew EfrontLesson($_GET['lessons_ID']); $lessonInformation = $lesson -> getInformation(); //$lessonInformation['language'] = $languages[$lesson -> lesson['languages_NAME']]; if ($lessonInformation['professors']) { foreach ($lessonInformation['professors'] as $value) { $professors
17、String[] = formatLogin($value['login']); } $lessonInformation['professors'] = implode(", ", $professorsString); } $lesson -> lesson['price'] ? $priceString = formatPrice($lesson -> lesson['price'], array($lesson -> options['recurring'], $lesson -> options['recurring_duration']), true)
18、 $priceString = false; $lessonInformation['price_string'] = $priceString; // if (!$lessonInformation['price']) { // unset($lessonInformation['price_string']); // } try { if ($_GET['from_course'] && eF_checkParameter($_GET['from_course'], 'id')) { $course = new
19、 EfrontCourse($_GET['from_course']); $schedule = $course -> getLessonScheduleInCourse($lesson); $lessonInformation['from_timestamp'] = $schedule['start_date']; $lessonInformation['to_timestamp'] = $schedule['end_date']; } } catch (Exception $e) {}; if ($lesson -> lesson['c
20、ourse_only']) { $lessonCourses = $lesson -> getCourses(); if (!empty($lessonCourses)) { foreach ($lessonCourses as $value) { $lessonInformation['lesson_courses'][] = $value['name']; } $lessonInformation['lesson_courses'] = implode(", ", $lessonInformation['lesson_courses
21、']);
}
}
foreach ($lessonInformation as $key => $value) {
if ($value) {
$value = str_replace ("\n","
", $value);
switch ($key) {
case 'language' : $GLOBALS['configuration']['onelanguage'] OR $tooltipInfo[] = '
22、an>: $languages[$value]
23、iv>"; break; case 'tests' : $GLOBALS['configuration']['disable_tests'] != 1 ? $tooltipInfo[] = '
24、 "infoEntry">'._PROJECTS.": $value
25、an>'._AVAILABLEFROM.": ".formatTimestamp($value, 'time_nosec')."
26、ption': $tooltipInfo[] = '
27、class = "infoEntry">'._OBJECTIVES.": $value
28、RESOURCES."
: $value29、n>'._PRICE.": $value
30、'.$string.''; } else { echo _NODATAFOUND; } } if (isset($_GET['courses_ID']) && eF_checkParameter($_GET['courses_ID'], 'id')) { $course = new EfrontCourse($_GET['courses_ID']); $courseInformation = $course -> getInforma
31、tion(); if ($courseInformation['professors']) { foreach ($courseInformation['professors'] as $value) { $professorsString[] = formatLogin($value['login']); } $courseInformation['professors'] = implode(", ", $professorsString); } $course -> course['price'] ? $priceString
32、 formatPrice($course -> course['price'], array($course -> options['recurring'], $course -> options['recurring_duration']), true) : $priceString = false; $courseInformation['price_string'] = $priceString; foreach ($courseInformation as $key => $value) { if ($value) { $value = str_repl
33、ace ("\n","
", $value);
switch ($key) {
case 'language' : $GLOBALS['configuration']['onelanguage'] OR $tooltipInfo[] = '
35、/span>: $value
36、pan>
37、ase 'resources' : $tooltipInfo[] = '
38、 = '
39、'._DEPENDSON.": ".$dependsOn->course['name']."
40、GET['user1']) && isset($_GET['user2']) && eF_checkParameter($_GET['user1'], 'login') && eF_checkParameter($_GET['user2'], 'login')) { $user1 = EfrontUserFactory::factory($_GET['user1']); if ($user1->getType() != "administrator") { $common_lessons = $user1 -> getCommonLessons($_GET['user2'
41、]); // pr($common_lessons); foreach ($common_lessons as $id => $lesson) { if (strlen($lesson['name'])>25) { $lesson['name'] = substr($lesson['name'],0,22) . "..."; } $tooltipInfo[] = '
42、 if ($string = implode("", $tooltipInfo)) { echo $string; } else { echo _NODATAFOUND; } } else { echo _NODATAFOUND; } } } catch (Exception $e) { echo ($e -> getMessage().' ('.$e -> getCode().')'); //No ajax error handling here, since we want the info to appear in
43、the popup } ?>
44、 = "../libraries/"; /** Configuration file.*/ include_once $path."configuration.php"; try { $currentUser = EfrontUser :: checkUserAccess(); } catch (Exception $e) { echo ""; //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; } eF_checkParameter($_POST['preffix'], 'text') OR $_POST['preffix'] = '%'; switch ($_GET['ask_type']) { case 'users': as
46、kUsers(); break; case 'tests': askTests(); break; case 'feedback': askFeedback(); break; case 'projects': askProjects(); break; case 'lesson': case 'lessons': askLessons(); break; case 'group' : case 'groups': askGroups(); break; case 'course': case 'courses': askCourses(); break; case
47、 'branch': case 'branches': askBranches(); break; case 'skill': case 'skills': askSkills(); break; default: break; } function highlightSearch($search_results, $search_criteria, $bgcolor='Yellow'){ $start_tag = ''; $end_tag =
48、 ''; $search_results = str_ireplace($search_criteria, $start_tag . $search_criteria . $end_tag, $search_results); return $search_results; } function askUsers() { // $_POST['preffix'] = "%"; // Useful for debugging if (isset($_POST['preffix'])) { if (mb_strpos($_POST['preffix'],
49、";") === false) { $user = $_POST['preffix']; } else { $user = mb_substr(strrchr($_POST['preffix'], ";"), 1); } } //pr($_SESSION); $users = array(); if (isset($user) && $user) { $preffix = $user; // Return active users for statistics: // - admins: all // - supervisor
50、s: all supervised (in Enterprise) // - professors: students if (isset($_GET['supervisors'])) { $users = eF_getTableData("users u, module_hcd_employee_works_at_branch wb", "distinct u.login,u.name,u.surname,u.user_type,u.user_types_ID", "u.login=wb.users_LOGIN and wb.supervisor=1 and u.acti