收藏 分销(赏)

学习管理系统源代码v1.0.doc

上传人:二*** 文档编号:4762879 上传时间:2024-10-12 格式:DOC 页数:63 大小:217.54KB 下载积分:5 金币
下载 相关 举报
学习管理系统源代码v1.0.doc_第1页
第1页 / 共63页
本文档共63页,全文阅读请下载到手机保存,查看更方便
资源描述
精品文档就在这里 -------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------- -------------------------------------------------------------------------------------------------------------------------------------------- <?php 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"); } ?> <?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); } else { setcookie('c_request', $_SESSION['s_type'].'.php?lessons_ID='.$lessonID, time() + 300); } } 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") !== false) { echo 'userpage.php?ctg=landing_page'; } else { echo 'userpage.php'; } } } } catch (Exception $e) { handleAjaxExceptions($e); } ?> <?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 { $languages = EfrontSystem::getLanguages(true); if (isset($_GET['lessons_ID']) && eF_checkParameter($_GET['lessons_ID'], 'id')) { $lesson = new EfrontLesson($_GET['lessons_ID']); $lessonInformation = $lesson -> getInformation(); //$lessonInformation['language'] = $languages[$lesson -> lesson['languages_NAME']]; if ($lessonInformation['professors']) { foreach ($lessonInformation['professors'] as $value) { $professorsString[] = formatLogin($value['login']); } $lessonInformation['professors'] = implode(", ", $professorsString); } $lesson -> lesson['price'] ? $priceString = formatPrice($lesson -> lesson['price'], array($lesson -> options['recurring'], $lesson -> options['recurring_duration']), true) : $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 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['course_only']) { $lessonCourses = $lesson -> getCourses(); if (!empty($lessonCourses)) { foreach ($lessonCourses as $value) { $lessonInformation['lesson_courses'][] = $value['name']; } $lessonInformation['lesson_courses'] = implode(", ", $lessonInformation['lesson_courses']); } } foreach ($lessonInformation as $key => $value) { if ($value) { $value = str_replace ("\n","<br />", $value); switch ($key) { case 'language' : $GLOBALS['configuration']['onelanguage'] OR $tooltipInfo[] = '<div class = "infoEntry"><span>'._LANGUAGE."</span><span>: $languages[$value]</span></div>"; break; case 'professors' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._PROFESSORS."</span><span>: $value</span></div>"; break; case 'content' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._CONTENTUNITS."</span><span>: $value</span></div>"; break; case 'tests' : $GLOBALS['configuration']['disable_tests'] != 1 ? $tooltipInfo[] = '<div class = "infoEntry"><span>'._TESTS."</span><span>: $value</span></div>" : null; break; case 'projects' : $GLOBALS['configuration']['disable_projects'] != 1 ? $tooltipInfo[] = '<div class = "infoEntry"><span>'._PROJECTS."</span><span>: $value</span></div>" : null; break; case 'course_dependency' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._DEPENDSON."</span><span>: $value</span></div>"; break; case 'from_timestamp' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._AVAILABLEFROM."</span><span>: ".formatTimestamp($value, 'time_nosec')."</span></div>";break; case 'to_timestamp' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._AVAILABLEUNTIL."</span><span>: ".formatTimestamp($value, 'time_nosec')."</span></div>"; break; case 'general_description': $tooltipInfo[] = '<div class = "infoEntry"><span>'._DESCRIPTION."</span><span>: $value</span></div>"; break; case 'assessment' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._ASSESSMENT."</span><span>: $value</span></div>"; break; case 'objectives' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._OBJECTIVES."</span><span>: $value</span></div>"; break; case 'lesson_topics' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._LESSONTOPICS."</span><span>: $value</span></div>"; break; case 'resources' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._RESOURCES."</span><span>: $value</span></div>"; break; case 'other_info' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._OTHERINFO."</span><span>: $value</span></div>"; break; case 'price_string' : !$lesson -> lesson['course_only'] ? $tooltipInfo[] = '<div class = "infoEntry"><span>'._PRICE."</span><span>: $value</span></div>" : null; break; case 'lesson_courses' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._PARTOFCOURSES."</span><span>: $value</span></div>"; break; default: break; } } } if ($string = implode("", $tooltipInfo)) { echo '<html '.($GLOBALS['rtl'] ? 'dir = "rtl"' : '').' >'.$string.'</html>'; } else { echo _NODATAFOUND; } } if (isset($_GET['courses_ID']) && eF_checkParameter($_GET['courses_ID'], 'id')) { $course = new EfrontCourse($_GET['courses_ID']); $courseInformation = $course -> getInformation(); if ($courseInformation['professors']) { foreach ($courseInformation['professors'] as $value) { $professorsString[] = formatLogin($value['login']); } $courseInformation['professors'] = implode(", ", $professorsString); } $course -> course['price'] ? $priceString = 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_replace ("\n","<br />", $value); switch ($key) { case 'language' : $GLOBALS['configuration']['onelanguage'] OR $tooltipInfo[] = '<div class = "infoEntry"><span>'._LANGUAGE."</span><span>: $languages[$value]</span></div>"; break; case 'professors' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._PROFESSORS."</span><span>: $value</span></div>"; break; case 'lessons_number' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._LESSONS."</span><span>: $value</span></div>"; break; case 'instances' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._COURSEINSTANCES."</span><span>: $value</span></div>"; break; case 'general_description': $tooltipInfo[] = '<div class = "infoEntry"><span>'._DESCRIPTION."</span><span>: $value</span></div>"; break; case 'assessment' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._ASSESSMENT."</span><span>: $value</span></div>"; break; case 'objectives' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._OBJECTIVES."</span><span>: $value</span></div>"; break; case 'lesson_topics' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._COURSETOPICS."</span><span>: $value</span></div>"; break; case 'resources' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._RESOURCES."</span><span>: $value</span></div>"; break; case 'other_info' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._OTHERINFO."</span><span>: $value</span></div>"; break; case 'price_string' : $tooltipInfo[] = '<div class = "infoEntry"><span>'._PRICE."</span><span>: $value</span></div>"; break; default: break; } } } if ($course -> course['depends_on']) { try { $dependsOn = new EfrontCourse($course -> course['depends_on']); $tooltipInfo[] = '<div class = "infoEntry"><span>'._DEPENDSON."</span><span>: ".$dependsOn->course['name']."</span></div>"; } catch (Exception $e) {} } if ($string = implode("", $tooltipInfo)) { echo $string; } else { echo _NODATAFOUND; } } // For eFront social if (isset($_GET['common_lessons']) && isset($_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']); // pr($common_lessons); foreach ($common_lessons as $id => $lesson) { if (strlen($lesson['name'])>25) { $lesson['name'] = substr($lesson['name'],0,22) . "..."; } $tooltipInfo[] = '<div class = "infoEntry"><span>'.$lesson['name']."</span><span></span></div>"; } 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 the popup } ?> <?php /** * Respond to ajax query returing a list * * @package eFront */ session_cache_limiter('none'); session_start(); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $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; } eF_checkParameter($_POST['preffix'], 'text') OR $_POST['preffix'] = '%'; switch ($_GET['ask_type']) { case 'users': askUsers(); 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 'branch': case 'branches': askBranches(); break; case 'skill': case 'skills': askSkills(); break; default: break; } function highlightSearch($search_results, $search_criteria, $bgcolor='Yellow'){ $start_tag = '<span style="vertical-align:top;background-color: '.$bgcolor.'">'; $end_tag = '</span>'; $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'], ";") === 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 // - supervisors: 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
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服