예제 #1
0
     $courses_proposed = eF_getTableData("module_hcd_skills LEFT OUTER JOIN module_hcd_course_offers_skill ON module_hcd_skills.skill_ID = module_hcd_course_offers_skill.skill_ID JOIN courses ON courses.id = module_hcd_course_offers_skill.courses_ID", "module_hcd_course_offers_skill.courses_ID, courses.*, count(module_hcd_course_offers_skill.skill_ID) as skills_offered", "module_hcd_course_offers_skill.skill_ID IN ('" . $skills_missing . "') AND module_hcd_course_offers_skill.courses_ID NOT IN ('" . $alredy_attending . "') and courses.archive=0 and courses.active=1", "", "module_hcd_course_offers_skill.courses_ID ORDER BY skills_offered DESC");
     if (isset($_GET['sort'])) {
         isset($_GET['order']) ? $order = $_GET['order'] : ($order = 'asc');
         $courses_proposed = eF_multiSort($courses_proposed, $_GET['sort'], $order);
     }
     if (isset($_GET['filter'])) {
         $courses_proposed = eF_filterData($courses_proposed, $_GET['filter']);
     }
     $smarty->assign("T_PROPOSED_COURSES_SIZE", sizeof($courses_proposed));
     if (isset($_GET['limit']) && eF_checkParameter($_GET['limit'], 'int')) {
         isset($_GET['offset']) && eF_checkParameter($_GET['offset'], 'int') ? $offset = $_GET['offset'] : ($offset = 0);
         $courses_proposed = array_slice($courses_proposed, $offset, $limit);
     }
     foreach ($courses_proposed as $key => $proposed_course) {
         $obj = new EfrontCourse($proposed_course['courses_ID']);
         $courses_proposed[$key]['link'] = $obj->toHTMLTooltipLink(basename($_SERVER['PHP_SELF']) . '?ctg=courses&edit_course=' . $proposed_course['id']);
         $courses_proposed[$key]['direction_name'] = $directionsPaths[$proposed_course['directions_ID']];
         $courses_proposed[$key]['languages_NAME'] = $languages[$proposed_course['languages_NAME']];
     }
     $smarty->assign("T_PROPOSED_COURSES_DATA", $courses_proposed);
     $smarty->display('administrator.tpl');
     exit;
 }
 try {
     if (isset($_GET['postAjaxRequest'])) {
         if ($_SESSION['s_type'] == 'administrator') {
             $user = EfrontUserFactory::factory($_GET['user']);
         } else {
             $user = EfrontUserFactory::factory($_SESSION['s_login']);
         }
         if (isset($_GET['add_lesson'])) {