function drawCalendar() { checkPerm('view'); $size = importVar('size', false, 'max'); $width = "90%"; if ($size == "min") { $width = "200px"; } addCss('calendar_' . $size); YuiLib::load('base,dragdrop'); Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true); Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true); //permissions = permissions granted to the logged user according to his/her level and role // 2 => can create/delete/modify all events // 1 => can create/delete/modify only own events // 0 => can view only $permissions = 0; if (checkPerm('mod', true)) { $permissions = 2; } elseif (checkPerm('personal', true)) { $permissions = 1; } //mode="edit" => events can be added and edited according to given permissions //mode="view" => events can only be viewed regardless the permissions $GLOBALS['page']->add('<script type="text/javascript">' . ' setup_cal( null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head'); $GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content'); }
function classEventMain() { $res = ""; $out =& $GLOBALS["page"]; $out->setWorkingZone("content"); $lang =& DoceboLanguage::createInstance("classevent", "lms"); $back_ui_url = "index.php?modname=classevent&op=main"; $title_arr = array(); $title_arr[$back_ui_url] = $lang->def("_CLASS_EVENT"); $res .= getTitleArea($title_arr, "classevent"); $res .= "<div class=\"std_block\">\n"; require_once $GLOBALS["where_framework"] . "/lib/resources/lib.timetable.php"; $tt = new TimeTable(); $permissions = 2; $size = isset($_GET["size"]) ? $_GET["size"] : "max"; addCss('windows'); addCss('calendar_' . $size, "lms"); //addAjaxJs(); //addScriptaculousJs(); YuiLib::load(array('my_window' => 'windows.js')); $GLOBALS['page']->add("\n" . '<script type="text/javascript" src="' . $GLOBALS['where_lms_relative'] . '/modules/calendar/calendar.js"></script>' . "\n", 'page_head'); $GLOBALS['page']->add("\n" . '<script type="text/javascript" src="' . $GLOBALS['where_lms_relative'] . '/modules/calendar/calendar_helper.js"></script>' . "\n", 'page_head'); require_once $GLOBALS["where_lms"] . "/lib/lib.classroom.php"; $cm = new ClassroomManager(); $class_arr = $cm->getClassroomArray(); $GLOBALS['page']->add('<script type="text/javascript">' . ' setup_url(\'' . $GLOBALS['where_lms_relative'] . '/ajax.server.php?mn=calendar&\',\'lms_classroom\',\'lms_classroom\'); ' . ' setup_mode("edit",' . $permissions . ',"' . Docebo::user()->getUserId() . '"); ' . '</script>', 'page_head'); $width = "90%"; if ($size == "min") { $width = "200px"; } $res .= "\n"; $res .= "<div class=\"std_block\" style=\"margin:auto;width:" . $width . ";\">\n"; $res .= "<p>" . $lang->def("_SELECT_CLASSROOM") . ": <select name=\"classroom_selected\" id=\"classroom_selected\" onChange=\"updateCalendar(cal.date);\"><option value=\"\">(" . $lang->def("_SELECT_ALL") . ")</option>"; while (list($key, $value) = each($class_arr)) { $res .= "<option value=\"" . htmlentities($key) . "\">" . htmlentities($value) . "</option>"; } $res .= "</select></p>"; $res .= "</div>\n"; $res .= "\n" . '<div id="displayCalendar" style="margin: auto; clear: both; width:' . $width . '"></div>'; $res .= "</div>\n"; $out->add($res); require_once _base_ . '/lib/lib.dialog.php'; setupHrefDialogBox('a[href*=del]'); }
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ defined('_FINDEX_') or die('Access Denied'); include "libs/php_file_tree.php"; $spot_file = "../themes/{$folder}/theme_details.php"; if (file_exists($spot_file)) { include "{$spot_file}"; } addCss("apps/app_theme/libs/styles/default/default.css"); ?> <script language="javascript" type="text/javascript"> $(document).ready(function() { $("#tree-theme").find("ul").hide(); $(".pft-directory a").click(function(){ $(this).parent().toggleClass('active'); }); $(".thmfile").click(function(){ var name = $(this).html(); var src = $(this).attr('src'); $('.file-title').html(": " + name); $("#save-file").attr('name',"../../../"+src+"/"+name); $.ajax({ url: "apps/app_theme/libs/check_file.php", data: "src="+src+"&name="+name,
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'apps/app_contact/theme/css/style.css');
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_article_archive/style.css');
function externalCourselist() { require_once $GLOBALS['where_lms'] . '/modules/coursecatalogue/lib.coursecatalogue.php'; require_once _base_ . '/lib/lib.form.php'; require_once _base_ . '/lib/lib.user_profile.php'; require_once _base_ . '/lib/lib.navbar.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.preassessment.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.catalogue.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.coursepath.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.course.php'; require_once _base_ . '/lib/lib.urlmanager.php'; $url =& UrlManager::getInstance('login'); $url->setStdQuery('modname=login&op=courselist'); addCss('style_tab', 'lms'); login_coursecatalogueJsSetup(); $GLOBALS['page']->add('<!--[if lt IE 7.]> <script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/lib/lib.pngfix.js"></script> <![endif]-->', 'page_head'); $lang =& DoceboLanguage::createInstance('catalogue'); $lang_c =& DoceboLanguage::createInstance('course'); // list of tab --------------------------------------------------------------------------- $tab_list = array('time' => $lang->def('_TAB_VIEW_TIME'), 'category' => $lang->def('_TAB_VIEW_CATEGORY'), 'all' => $lang->def('_ALL')); if (Get::sett('use_coursepath') == '1') { $tab_list['pathcourse'] = $lang->def('_COURSEPATH'); } if (Get::sett('use_social_courselist') == 'on') { $tab_list['mostscore'] = $lang->def('_TAB_VIEW_MOSTSCORE'); $tab_list['popular'] = $lang->def('_TAB_VIEW_MOSTPOPULAR'); $tab_list['recent'] = $lang->def('_TAB_VIEW_RECENT'); } $tab_selected = unserialize(urldecode(Get::sett('tablist_coursecatalogue'))); foreach ($tab_list as $tab_code => $v) { if (!isset($tab_selected[$tab_code])) { unset($tab_list[$tab_code]); } } reset($tab_list); // tab selected for courses ------------------------------------------------------------- $first_coursecatalogue_tab = Get::sett('first_coursecatalogue_tab', key($tab_list)); if (!isset($tab_list[$first_coursecatalogue_tab])) { $first_coursecatalogue_tab = key($tab_list); } if (isset($_GET['tab']) || isset($_POST['tab'])) { $selected_tab = $_SESSION['cc_tab'] = Get::req('tab', DOTY_MIXED, $first_coursecatalogue_tab); } elseif (isset($_SESSION['cc_tab'])) { $selected_tab = $_SESSION['cc_tab']; } else { $selected_tab = $first_coursecatalogue_tab; } $GLOBALS['page']->add('<div id="coursecatalogue_tab_container">' . '<ul class="flat_tab">', 'content'); foreach ($tab_list as $key => $tab_name) { $GLOBALS['page']->add('<li' . ($selected_tab == $key ? ' class="now_selected"' : '') . '>' . '<a href="' . $url->getUrl('tab=' . $key) . '"><span>' . $tab_name . '</span></a></li>', 'content'); } $GLOBALS['page']->add('</ul>' . '</div>' . '<div class="std_block" id="coursecatalogue">', 'content'); switch ($selected_tab) { case "pathcourse": displayCoursePathList($url, $selected_tab); break; /* case "time" : { displayTimeCourseList($url, $selected_tab); };break;*/ /* case "time" : { displayTimeCourseList($url, $selected_tab); };break;*/ default: displayCourseList($url, $selected_tab); } $GLOBALS['page']->add('</div>', 'content'); // end of function ---------------------------------------------------------------- }
function userCourseList(&$url, $use_tab = true, $page_add = true) { YuiLib::load(array('animation' => 'animation-min.js', 'dragdrop' => 'dragdrop-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'my_window' => 'windows.js'), array('container/assets/skins/sam' => 'container.css', 'button/assets/skins/sam' => 'button.css')); if ($page_add) { addJs($GLOBALS['where_lms_relative'] . '/modules/coursecatalogue/', 'ajax.coursecatalogue.js'); } require_once _base_ . '/lib/lib.form.php'; require_once _base_ . '/lib/lib.user_profile.php'; require_once _base_ . '/lib/lib.navbar.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.preassessment.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.catalogue.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.course.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.coursereport.php'; require_once $GLOBALS['where_lms'] . '/lib/lib.coursepath.php'; require_once $GLOBALS["where_framework"] . "/lib/lib.ajax_comment.php"; require_once $GLOBALS['where_lms'] . '/lib/lib.classroom.php'; // pre-loading coursepath ------------------------------------------------------------------ $path_man = new CoursePath_Manager(); // search for the coursepath ---------------------------------------------------------- $user_coursepath = $path_man->getUserSubscriptionsInfo(getLogUserId(), true); $coursepath = $path_man->getCoursepathAllInfo(array_keys($user_coursepath)); if (!empty($coursepath)) { // find structures of the course path --------------------------------------------- $path_courses = $path_man->getPathStructure(array_keys($coursepath)); $cp_info = $path_man->getAllCoursesInfo($path_courses['all_paths']); /*echo "<pre>\n\n"; print_r($cp_info); echo "\n\n</pre>";*/ } // ------------------------------------------------------------------------ $course_stats = array('total' => 0, 'u_can_enter' => 0, 'with_status' => array(CST_AVAILABLE => 0, CST_EFFECTIVE => 0, CST_CONCLUDED => 0, CST_CANCELLED => 0), 'with_ustatus' => array(_CUS_SUBSCRIBED => 0, _CUS_BEGIN => 0, _CUS_END => 0, _CUS_SUSPEND => 0), 'with_wstatus' => array(_CUS_RESERVED => 0, _CUS_WAITING_LIST => 0), 'with_ulevel' => array(), 'expiring' => 0, 'cert_relesable' => 0); // ------------------------------------------------------------------------ $filter = importVar('filter', false, 'total'); if ($filter == 'level') { $filter_level = importVar('filter_on', true, 0); } $current_tab = importVar('current_tab', false, 'lo_plan'); if ($use_tab && $page_add) { addCss('style_tab'); $lo_plan = importVar('lo_plan', false, 0); $lo_history = importVar('lo_history', false, 0); if ($lo_plan != 0) { $current_tab = 'lo_plan'; } if ($lo_history != 0) { $current_tab = 'lo_history'; } } if ($use_tab && $page_add) { addCss('style_tab'); $lo_plan = importVar('lo_plan', false, 0); $lo_history = importVar('lo_history', false, 0); if ($lo_plan != 0) { $current_tab = 'lo_plan'; } if ($lo_history != 0) { $current_tab = 'lo_history'; } } require_once $GLOBALS['where_lms'] . '/lib/lib.certificate.php'; $cert = new Certificate(); $released = $cert->certificateReleased(getLogUserId()); $available_cert = $cert->certificateForCourses(false, false); // cahce classroom ----------------------------------------------------------------- $classroom_man = new ClassroomManager(); $classrooms = $classroom_man->getClassroomNameList(); $lang =& DoceboLanguage::createInstance('catalogue'); $lang_c =& DoceboLanguage::createInstance('course'); $man_course = new Man_Course(); $subcourse_list = sql_query("" . " SELECT u.idCourse, u.edition_id, level, u.date_inscr, u.date_first_access, " . "\t\tu.date_complete, u.status AS user_status, u.waiting, u.edition_id " . " FROM " . $GLOBALS['prefix_lms'] . "_courseuser AS u" . " WHERE idUser = '******'"); $subscription = array(); while ($cinfo = mysql_fetch_assoc($subcourse_list)) { $subscription['course'][$cinfo['idCourse']] = $cinfo; if ($cinfo['edition_id'] != 0) { $subscription['edition'][$cinfo['idCourse']][$cinfo['edition_id']] = $cinfo; } } // searching courses --------------------------------------------------------------- $select_course = "" . " SELECT c.idCourse, c.course_type, c.idCategory, c.code, c.name, c.description, c.lang_code, c.difficult, " . "\tc.subscribe_method, c.date_begin, c.date_end, c.max_num_subscribe, " . "\tc.selling, c.prize, c.create_date, c.status AS course_status, c.course_edition, " . "\tc.classrooms, c.img_othermaterial, c.course_demo, c.course_vote, " . "\tc.can_subscribe, c.sub_start_date, c.sub_end_date, c.valid_time, c.userStatusOp, c.show_result, u.status AS user_status, u.level " . ", c.use_logo_in_courselist, c.img_course, c.direct_play "; $from_course = " FROM " . $GLOBALS['prefix_lms'] . "_course AS c " . "\t JOIN " . $GLOBALS['prefix_lms'] . "_courseuser AS u "; $where_course = " c.idCourse = u.idCourse " . " AND u.idUser = '******' " . " AND ( c.status <> '" . CST_PREPARATION . "' OR u.level > 3 )" . " AND c.course_type <> 'assessment' "; $selected_year = 0; $selected_search = ''; if (isset($_POST['apply_filter'])) { if ($_POST['year']) { $where_course .= " AND c.create_date BETWEEN '" . $_POST['year'] . "-01-01 00:00:00' AND '" . $_POST['year'] . "-12-31 23:59:59'"; $selected_year = $_POST['year']; } if ($_POST['search'] !== '') { $where_course .= " AND c.name LIKE '%" . $_POST['search'] . "%'"; $selected_search = $_POST['search']; } } $group_by_course = " GROUP BY c.idCourse "; $order_course = " ORDER BY "; $tablist = Get::sett('tablist_mycourses', ''); if ($tablist != '') { $arr_order_course = explode(',', $tablist); $arr_temp = array(); foreach ($arr_order_course as $key => $value) { switch ($value) { case 'status': $arr_temp[] = ' u.status '; break; case 'code': $arr_temp[] = ' c.code '; break; case 'name': $arr_temp[] = ' c.name '; break; } } $order_course = $order_course . implode(', ', $arr_temp); } if ($order_course == " ORDER BY ") { //default without parameter $order_course .= " u.status, c.name "; } // apply search filter -------------------------------------------------------------- $all_lang = Docebo::langManager()->getAllLangCode(); $re_course = sql_query($select_course . $from_course . " WHERE " . $where_course . $group_by_course . $order_course); // retrive editions ---------------------------------------------------------------- $select_edition = " SELECT e.* "; $from_edition = " FROM " . $GLOBALS["prefix_lms"] . "_course_editions AS e " . " JOIN " . $GLOBALS["prefix_lms"] . "_courseuser AS u "; $where_edition = " WHERE e.status <> '" . CST_PREPARATION . "' AND e.id_edition = u.edition_id "; $re_edition = sql_query($select_edition . $from_edition . $where_edition); // -------------------------------------------------------------------------------- $editions = array(); if ($re_edition) { while ($edition_elem = mysql_fetch_assoc($re_edition)) { $edition_elem['classrooms'] = isset($classrooms[$edition_elem['classrooms']]) ? $classrooms[$edition_elem['classrooms']] : ''; $editions[$edition_elem["id_course"]][$edition_elem["id_course"]] = $edition_elem; } } $man_courseuser = new Man_CourseUser(); $ax_comm = new AjaxComment('course', 'lms'); $comment_count = $ax_comm->getResourceCommentCount(); $user_score = $man_courseuser->getUserCourseScored(getLogUserId()); // ----------------------------------------------------------------------------- $needed_info_for = array(); if (!empty($subscription['course'])) { $id_course_list = array_keys($subscription['course']); // find last access to the courses --------------------------------------------------------------------- require_once $GLOBALS['where_lms'] . '/lib/lib.track_user.php'; $last_access_courses = TrackUser::getLastAccessToCourse(getLogUserId()); // retrive unreaded advice ----------------------------------------------------------------------------- require_once $GLOBALS['where_lms'] . '/lib/lib.advice.php'; $advices = Man_Advice::getCountUnreaded(getLogUserId(), $id_course_list, $last_access_courses); // retrive unreaded forum messages --------------------------------------------------------------------- require_once $GLOBALS['where_lms'] . '/lib/lib.forum.php'; $forums = Man_Forum::getCountUnreaded(getLogUserId(), $id_course_list, $last_access_courses); // retrive new lesson ---------------------------------------------------------------------------------- require_once $GLOBALS['where_lms'] . '/lib/lib.orgchart.php'; $org_chart = OrganizationManagement::getCountUnreaded(getLogUserId(), $id_course_list, $last_access_courses); if (!empty($path_courses['all_items'])) { $needed_info_for = array_diff($path_courses['all_items'], $id_course_list); } $first_is_scorm = OrganizationManagement::objectFilter($id_course_list, 'scormorg'); $enroll_list = sql_query("" . " SELECT u.idCourse, u.edition_id, COUNT(*) as number " . " FROM " . $GLOBALS['prefix_lms'] . "_courseuser AS u" . " WHERE u.idCourse IN (" . implode($id_course_list, ',') . ") " . " AND u.level = '3'" . " AND u.status IN ('" . _CUS_CONFIRMED . "', '" . _CUS_SUBSCRIBED . "', '" . _CUS_BEGIN . "', '" . _CUS_END . "', '" . _CUS_SUSPEND . "', '" . _CUS_WAITING_LIST . "')" . " AND u.absent = '0'" . " GROUP BY u.idCourse, u.edition_id "); $enrolled = array(); while ($cinfo = mysql_fetch_assoc($enroll_list)) { $enrolled[$cinfo['idCourse']][$cinfo['edition_id']] = $cinfo['number']; } } // search pre-assessment ----------------------------------------------------------- $select_assess = "" . " SELECT c.idCourse, c.course_type, c.idCategory, c.code, c.name, c.description, c.lang_code, c.difficult, " . "\tc.subscribe_method, c.date_begin, c.date_end, c.max_num_subscribe, " . "\tc.selling, c.prize, c.create_date, c.status AS course_status, c.course_edition, " . "\tc.classrooms, c.img_othermaterial, c.course_demo, c.course_vote, " . "\tc.can_subscribe, c.sub_start_date, c.sub_end_date, c.valid_time, c.userStatusOp, " . "\tu.level, u.date_inscr, u.date_first_access, u.date_complete, u.status AS user_status, u.waiting, c.advance, u.waiting "; $from_assess = " FROM " . $GLOBALS['prefix_lms'] . "_course AS c " . "\t JOIN " . $GLOBALS['prefix_lms'] . "_courseuser AS u "; $where_assess = " c.idCourse = u.idCourse " . " AND u.idUser = '******' " . " AND c.course_type = 'assessment' " . " AND ( c.status <> '" . CST_PREPARATION . "' OR u.level > 3 ) " . ($filter == 'level' ? " AND level = '" . $filter_level . "'" : ""); //." AND ( u.status <> '"._CUS_END."' OR u.level > 3 ) "; $preass_list = sql_query($select_assess . $from_assess . " WHERE " . $where_assess . " ORDER BY c.name "); // pre assessment list --------------------------------------------------------------------------------------- $i = 0; if (mysql_num_rows($preass_list) && $current_tab == 'lo_plan') { if ($page_add) { $GLOBALS['page']->add('<div id="mycourse_asses">' . '<h1>' . $lang_c->def('_ASSESSMENT_LIST') . '</h1>', 'content'); } while ($cinfo = mysql_fetch_assoc($preass_list)) { $cinfo['user_score'] = isset($user_score[$cinfo['idCourse']]) ? $user_score[$cinfo['idCourse']] : NULL; if (isset($comment_count[$cinfo['idCourse']])) { $cinfo['comment_count'] = $comment_count[$cinfo['idCourse']]; } if ($page_add) { $GLOBALS['page']->add(dashmyassess($url, $lang_c, $cinfo, $i++), 'content'); } } if ($page_add) { $GLOBALS['page']->add('</div>', 'content'); } } // page intest ------------------------------------------------------------ require_once $GLOBALS['where_lms'] . '/lib/lib.levels.php'; $lvl = CourseLevel::getLevels(); $title = $lang->def('_COURSE_LIST'); switch ($filter) { case "access": $title = $lang->def('_COURSE_YOU_CAN_ACCESS'); break; case "expiring": $title = $lang->def('_COURSE_EXPIRING'); break; case "subscribed": $title = $lang->def('_COURSE_SUBSCRIBED'); break; case "begin": $title = $lang->def('_COURSE_BEGIN'); break; case "end": $title = $lang->def('_COURSE_END'); break; case "level": $title = str_replace('[level]', $lvl[$_GET['filter_on']], $lang->def('_COURSE_AS')); break; } if ($page_add) { $GLOBALS['page']->add('<div id="mycourse_list">' . '<h1>' . $title . '</h1>', 'content'); } $i = 0; $direct_play = false; while ($cinfo = mysql_fetch_assoc($re_course)) { $access = Man_Course::canEnterCourse($cinfo); if ($cinfo['direct_play'] == 1) { $direct_play = true; } $course_stats['total']++; if ($cinfo['user_status'] == _CUS_RESERVED || $cinfo['user_status'] == _CUS_WAITING_LIST) { $course_stats['with_wstatus'][$cinfo['user_status']]++; } elseif ($access['can']) { $course_stats['u_can_enter']++; } if (isset($course_stats['with_ustatus'][$cinfo['user_status']])) { $course_stats['with_ustatus'][$cinfo['user_status']]++; } else { $course_stats['with_ustatus'][$cinfo['user_status']] = 1; } if (!isset($course_stats['with_ulevel'][$cinfo['level']])) { $course_stats['with_ulevel'][$cinfo['level']] = 1; } else { $course_stats['with_ulevel'][$cinfo['level']]++; } if (isset($available_cert[$cinfo['idCourse']])) { while (list($id_cert, $certificate) = each($available_cert[$cinfo['idCourse']])) { if (!isset($released[$id_cert]) && $cert->canRelease($certificate[CERT_AV_STATUS], $cinfo['user_status'])) { $course_stats['cert_relesable']++; } } } } if (mysql_num_rows($re_course)) { mysql_data_seek($re_course, 0); } while ($cinfo = mysql_fetch_assoc($re_course)) { $cinfo['edition_list'] = isset($editions[$cinfo['idCourse']]) ? $editions[$cinfo['idCourse']] : array(); $cinfo['user_score'] = isset($user_score[$cinfo['idCourse']]) ? $user_score[$cinfo['idCourse']] : NULL; $cinfo['enrolled'] = isset($enrolled[$cinfo['idCourse']]) ? $enrolled[$cinfo['idCourse']] : false; if (isset($comment_count[$cinfo['idCourse']])) { $cinfo['comment_count'] = $comment_count[$cinfo['idCourse']]; } $cinfo['classrooms'] = isset($classrooms[$cinfo['classrooms']]) ? $classrooms[$cinfo['classrooms']] : ''; // advertising -------------------------------------------------------------------------------------------- $cinfo['to_read']['advice'] = isset($advices[$cinfo['idCourse']]) ? $advices[$cinfo['idCourse']] : 0; $cinfo['to_read']['forum'] = isset($forums[$cinfo['idCourse']]) ? $forums[$cinfo['idCourse']] : 0; $cinfo['to_read']['lobj'] = isset($org_chart[$cinfo['idCourse']]) ? $org_chart[$cinfo['idCourse']] : 0; // 10 days in the future $range = time() + 10 * 24 * 60 * 60; $expiring = false; if ($cinfo['date_end'] != '0000-00-00') { $time_end = fromDatetimeToTimestamp($cinfo['date_end']); if ($range > $time_end) { $expiring = true; $course_stats['expiring']++; } } if ($cinfo['valid_time'] != '0' && $cinfo['valid_time'] != '' && $cinfo['date_first_access'] != '') { $time_first_access = fromDatetimeToTimestamp($cinfo['date_first_access']); if ($range > $time_first_access + $cinfo['valid_time'] * 24 * 3600) { $expiring = true; $course_stats['expiring']++; } } if (isset($first_is_scorm[$cinfo['idCourse']])) { $cinfo['first_is_scorm'] = $first_is_scorm[$cinfo['idCourse']]; } else { $cinfo['first_is_scorm'] = false; } $access = Man_Course::canEnterCourse($cinfo); // -------------------------------------------------------------------- if (!isset($path_courses['all_items'][$cinfo['idCourse']])) { // the course is not related with a coursepath, so i can print it -------------- if ($filter == 'level') { if ($subscription['course'][$cinfo['idCourse']]['level'] == $filter_level) { $dash = dashmycourse($url, $lang_c, $subscription, $cinfo, $i++); } else { $dash = ''; } } else { $dash = dashmycourse($url, $lang_c, $subscription, $cinfo, $i++); } if ($use_tab == true) { if ($course_stats['with_ustatus'][_CUS_END] == $course_stats['total']) { $current_tab = 'lo_history'; } if ($current_tab == 'lo_history') { if ($cinfo['user_status'] == _CUS_END && $page_add) { $GLOBALS['page']->add($dash, 'content'); } } else { if (($cinfo['user_status'] != _CUS_END || $cinfo['level'] >= 4) && $page_add) { $GLOBALS['page']->add($dash, 'content'); } } } else { switch ($filter) { case "access": if ($access['can'] && $page_add) { $GLOBALS['page']->add($dash, 'content'); } break; case "expiring": if ($expiring && $page_add) { $GLOBALS['page']->add($dash, 'content'); } break; case "subscribed": if ($cinfo['user_status'] == _CUS_SUBSCRIBED && $page_add) { $GLOBALS['page']->add($dash, 'content'); } break; case "begin": if ($cinfo['user_status'] == _CUS_BEGIN && $page_add) { $GLOBALS['page']->add($dash, 'content'); } break; case "end": if ($cinfo['user_status'] == _CUS_END && $page_add) { $GLOBALS['page']->add($dash, 'content'); } break; case "level": if ($_GET['filter_on'] == $cinfo['level'] && $page_add) { $GLOBALS['page']->add($dash, 'content'); } break; default: if ($page_add) { $GLOBALS['page']->add($dash, 'content'); } } } } else { // the course is related with a coursepath, so i must wait to print it ---------- //$cinfo['prerequisites'] = $path_courses['all_items'][$cinfo['idCourse']]; // <- useless? //$courses =array($cinfo['idCourse']=>$cinfo); $prere = $cp_info[$cinfo['idCourse']]["prerequisites"]; if ($path_man->checkPrerequisites($prere, $subscription)) { $cinfo['prerequisites_satisfied'] = true; } else { $cinfo['prerequisites_satisfied'] = false; } if ($filter == 'level') { if ($subscription['course'][$cinfo['idCourse']]['level'] == $filter_level) { $course_cache[$cinfo['idCourse']] = dashmycourse($url, $lang_c, $subscription, $cinfo, 1, true, 4); } else { $course_cache[$cinfo['idCourse']] = ''; } } else { $course_cache[$cinfo['idCourse']] = dashmycourse($url, $lang_c, $subscription, $cinfo, 1, true, 4); } } // end else-if ------------------------------------------------------- } // end while ------------------------------------------------------------ if ($direct_play && $page_add) { $GLOBALS['page']->add('' . ' <link href="' . getPathTemplate() . '/style/shadowbox.css" rel="stylesheet" type="text/css" />' . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/shadowbox/shadowbox-yui.js"></script>' . "\n" . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/shadowbox/shadowbox.js"></script>' . "\n", 'page_head'); $GLOBALS['page']->add('<script type="text/javascript"> YAHOO.util.Event.onDOMReady(function() { var options = { listenOverlay:false, overlayOpacity:"0.8", loadingImage:"' . getPathImage('lms') . 'standard/loading.gif", overlayBgImage:"' . getPathImage('lms') . 'standard/overlay-85.png", text: {close: "' . Lang::t('_CLOSE') . '", cancel: "' . Lang::t('_UNDO') . '", loading:"' . Lang::t('_LOADING') . '" }, onOpen: function (gallery) { window.onbeforeunload = function() { return "' . Lang::t('_CONFIRM_EXIT', 'organization', 'lms') . '"; } } }; Shadowbox.init(options); Shadowbox.close = function() { window.frames[\'shadowbox_content\'].uiPlayer.closePlayer(true, window); } }); </script>'); } if ($course_stats['total'] == 0 && $page_add) { $GLOBALS['page']->add('' . '<b>' . $lang->def('_NO_COURSE') . '</b> ' . '<br />', 'content'); } if ($page_add) { $GLOBALS['page']->add('</div>', 'content'); } // Coursepath -------------------------------------------------------------- if (!empty($coursepath)) { // find structures of the course path ---------------------------------- $path_slot = $path_man->getPathSlot(array_keys($coursepath)); // coursepath list ----------------------------------------------------- if ($page_add) { $GLOBALS['page']->add('<div id="mycoursepath_list">' . '<h1>' . $lang->def('_COURSEPATH_LIST') . '</h1>', 'content'); } $i = 0; // find course basilar information ------------------------------------- if (!empty($needed_info_for)) { $course_info = $man_course->getAllCourses(false, false, $needed_info_for); } else { $course_info = array(); } while (list($id_path, $path) = each($coursepath)) { $html = '<div class="coursepath_container coursepath_container_simple">'; $html .= '<h2>' . ($path[COURSEPATH_CODE] != '' ? '[' . $path[COURSEPATH_CODE] . '] ' : '') . $path[COURSEPATH_NAME] . '</h2>'; if (!isset($path_courses[$id_path]) || empty($path_courses[$id_path])) { $html .= $lang->def('_NO_COURSE_ASSIGNED_TO_COURSEPATH') . '<br />'; } else { // display the slots foreach ($path_slot[$id_path] as $id_slot => $slot_info) { if ($id_slot == 0) { $html .= '<h3>' . $lang->def('_MANDATORY') . '</h3>'; if (!empty($path_courses[$id_path][$id_slot])) { $html .= '<ul class="coursepath_mainslot">'; } } else { if ($slot_info['min_selection'] > 0 && $slot_info['max_selection'] > 0) { $title = str_replace(array('[min_selection]', '[max_selection]'), array($slot_info['min_selection'], $slot_info['max_selection']), $lang->def('_COURSE_PATH_SLOT_MIN_MAX')); } elseif ($slot_info['max_selection'] > 0) { $title = str_replace('[max_selection]', $slot_info['max_selection'], $lang->def('_COURSE_PATH_SLOT_MAX')); } else { $title = $lang->def('_COURSE_PATH_SLOT'); } $html .= '<h3>' . $title . '</h3>'; if (!empty($path_courses[$id_path][$id_slot])) { $html .= '<ul class="coursepath_otherslot">'; } } while (list($id) = each($path_courses[$id_path][$id_slot])) { if (isset($course_cache[$id])) { $html .= '<li>' . $course_cache[$id] . '</li>'; } else { $html .= '<li>' . dashAcourse($id, 4) . '</li>'; } } if (!empty($path_courses[$id_path][$id_slot])) { $html .= '</ul>'; } } } $html .= '</div>'; if ($page_add) { $GLOBALS['page']->add($html, 'content'); } } if ($page_add) { $GLOBALS['page']->add('</div>', 'content'); } } if ($course_stats['cert_relesable'] < 0) { $course_stats['cert_relesable'] = 0; } return $course_stats; }
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_menu/css/style.css');
<?php /** * @version 1.0.0 * @package Article NextPrev * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt */ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_article_nextprev/theme/style.css');
function addScriptaculousJs() { return; if (!isset($GLOBALS["page"])) { return; } addCss('windows', 'framework'); addAjaxJs(); if (!isset($GLOBALS["_js_cache"])) { $GLOBALS["_js_cache"] = array(); } if (!in_array('_scriptacolus_js', $GLOBALS["_js_cache"])) { $GLOBALS["_js_cache"][] = '_scriptacolus_js'; $GLOBALS["page"]->add('<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/scriptaculous/src/scriptaculous.js"></script>' . "\n" . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/scriptaculous/lib/prototype.improvements.js "></script>' . "\n" . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/scriptaculous/src/scriptaculous.js"></script>' . "\n" . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/scriptaculous/src/windows.js"></script>' . "\n" . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/scriptaculous/src/HelpBalloon.js"></script>' . "\n" . '<script type="text/javascript" src="' . $GLOBALS['where_framework_relative'] . '/addons/scriptaculous/src/notice.js"></script>' . "\n" . '<script type="text/javascript">' . ' setImgBalloonPath(\'' . getPathImage('fw') . 'balloon/images/\');' . '</script>', "page_head"); } }
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'apps/app_user/theme/style.css');
defined("IN_FORMA") or die('Direct access is forbidden.'); /* ======================================================================== \ | FORMA - The E-Learning Suite | | | | Copyright (c) 2013 (Forma) | | http://www.formalms.org | | License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt | | | | from docebo 4.0.5 CE 2008-2012 (c) docebo | | License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt | \ ======================================================================== */ if (Docebo::user()->isAnonymous()) { die('You can\'t access!'); } addCss("style_wiki", "fw"); addCss("style_wiki_lms", "lms"); require_once $GLOBALS["where_lms"] . "/lib/lib.wiki.php"; function &cwaSetup() { $res = new LmsWikiAdmin(); $res->urlManagerSetup("modname=wiki&op=main"); $res->setCourseId($_SESSION["idCourse"]); return $res; } function &cwpSetup($wiki_id) { $res = new LmsWikiPublic($wiki_id); $res->setInternalPerm("edit", checkPerm('edit', true)); return $res; } function wikiMain()
$adminManager = new AdminPreference(); $p_dr->intersectGroupFilter($adminManager->getAdminTree(Docebo::user()->getIdSt())); } $re_people = $p_dr->getAllRowsIdst(); $user_selected = array(); if (!$re_people) { return $user_selected; } while (list($idst) = sql_fetch_row($re_people)) { $user_selected[$idst] = $idst; } return $user_selected; } } //little class for filter box management addCss('style_filterbox'); class ReportBox { var $id = ''; var $title = ''; var $description = ''; var $body = ''; var $footer = ''; var $title_css = 'filter_details'; var $collapsed = false; var $show_collapse_cmd = false; function ReportBox($id = '') { $this->id = $id; } //...
} if ($seconds < 10) { $seconds = '0' . $seconds; } $tot_time = ($hours != 0 ? $hours . 'h ' : '') . $minutes . 'm '; //.$seconds.'s '; Util::get_js(Get::rel_path('lms') . '/lib/lib.track_user.js', true, true); $GLOBALS['page']->add('<script type="text/javascript">' . ' userCounterStart(' . (int) $partial_time_sec . ', ' . (int) $tot_time_sec . ');' . '</script>' . "\n", 'page_head'); $user_stats['head'][0] = Lang::t('_PARTIAL_TIME', 'course'); $user_stats['body'][0] = '<span id="partial_time">' . $partial_time . '</span>'; $user_stats['head'][1] = Lang::t('_TOTAL_TIME', 'course'); $user_stats['body'][1] = '<span id="total_time">' . $tot_time . '</span>'; } } if (Docebo::course()->getValue('show_who_online') == _SHOW_INSTMSG) { addCss('instmsg'); addJs('addons/yui/my_window/', 'windows.js'); addJs($GLOBALS['where_lms_relative'] . '/modules/instmsg/', 'instmsg.js'); $GLOBALS['page']->add('<script type="text/javascript">' . " setup_instmsg( '" . Docebo::user()->getIdSt() . "', " . "'" . $userid . "', " . "'" . getPathImage('fw') . "' ); " . '</script>' . "\n", 'page_head'); $user_stats['head'][2] = Lang::t('_WHOIS_ONLINE', 'course'); $user_stats['body'][2] = '<b id="user_online_n">' . '<a id="open_users_list" href="javascript:void(0)">' . TrackUser::getWhoIsOnline($_SESSION['idCourse']) . '</a></b>'; } elseif (Docebo::course()->getValue('show_who_online') == _SHOW_COUNT) { $user_stats['head'][2] = Lang::t('_WHOIS_ONLINE', 'course'); $user_stats['body'][2] = '<b id="user_online_n">' . TrackUser::getWhoIsOnline($_SESSION['idCourse']) . '</b>'; } $all_stats = '<div id="accordion"><h3>'; $all_stats .= '<span class="tempo">' . Lang::t('_TOTAL_TIME', 'course') . ': ' . $tot_time . ' '; // get status count value if (Docebo::course()->getValue('show_progress') == 1) { require_once $GLOBALS['where_lms'] . '/lib/lib.stats.php'; $total = getNumCourseItems($_SESSION['idCourse'], FALSE, getLogUserId(), FALSE);
function view_report_certificate() { checkPerm('view'); require_once _lms_ . '/lib/lib.certificate.php'; require_once _lms_ . '/lib/lib.course.php'; $out =& $GLOBALS['page']; $out->setWorkingZone('content'); $lang =& DoceboLanguage::createInstance('certificate', 'lms'); $deletion = importVar('deletion', true, 0); if ($deletion) { switch ($deletion) { case 1: $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL'))); break; case 2: $out->add(getErrorUi($lang->def('_OPERATION_FAILURE'))); break; case 3: $out->add(getErrorUi($lang->def('_OPERATION_FAILURE'))); break; } } $certificate = new Certificate(); $id_certificate = importVar('id_certificate', true, 0); $id_course = importVar('id_course', true, 0); $selection = importVar('selection', false, array()); //all possible selected values $selected = importVar('selected', false, array()); //effectively selected values with checkbox $sel = importVar('old_selection', false, ''); //selected values from previous table pages if ($sel != '') { $total_selection = explode(',', $sel); } else { $total_selection = array(); } //update total selection foreach ($selection as $key => $val) { if (in_array($val, $selected)) { if (!in_array($val, $total_selection)) { $total_selection[] = $val; } } else { $index = array_search($val, $total_selection); if ($index !== false) { array_splice($total_selection, $index, 1); } } } $search_filter = importVar('filter', false, ''); $only_released = importVar('only_released', true, 0); //which command? if (importVar('search_button', false, false) !== false) { } if (importVar('reset_button', false, false) !== false) { $search_filter = ''; $only_released = 0; } if (importVar('print_button', false, false) !== false) { } $numtablerows = $GLOBALS['framework']['visuItem']; $tb = new Table($numtablerows, $lang->def('_CERTIFICATE_VIEW_CAPTION'), $lang->def('_CERTIFICATE_VIEW_CAPTION')); $tb->initNavBar('ini', 'button'); $ini = $tb->getSelectedElement(); $tca = $GLOBALS['prefix_lms'] . "_certificate_assign as ca"; $tcc = $GLOBALS['prefix_lms'] . "_certificate_course as cc"; $tcu = $GLOBALS['prefix_lms'] . "_courseuser as cu"; $tu = $GLOBALS['prefix_fw'] . "_user as u"; $where = ""; if ($search_filter != '') { $where .= " AND (u.userid LIKE '%" . $search_filter . "%' OR u.lastname LIKE '%" . $search_filter . "%' OR u.firstname LIKE '%" . $search_filter . "%') "; } if ($only_released > 0) { $where = " AND ca.on_date " . ($only_released == 1 ? "IS NOT" : "IS") . " NULL "; } //$where .= " AND ".$aval_status." ".($only_released==1 ? "<" : ">=")." cu.status "; list($aval_status) = sql_fetch_row(sql_query("SELECT available_for_status FROM " . $tcc . " " . " WHERE id_certificate='" . (int) $id_certificate . "' AND id_course='" . (int) $id_course . "'")); switch ($aval_status) { case AVS_ASSIGN_FOR_ALL_STATUS: $aval_status = " 1 "; break; case AVS_ASSIGN_FOR_STATUS_INCOURSE: $aval_status = " cu.status = " . _CUS_BEGIN . " "; break; case AVS_ASSIGN_FOR_STATUS_COMPLETED: $aval_status = " cu.status = " . _CUS_END . " "; break; } list($totalrows) = sql_fetch_row(sql_query("SELECT COUNT(*) " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . $where)); $query = "SELECT u.userid, u.firstname, u.lastname, cu.date_complete, ca.on_date, cu.idUser as id_user, cu.status " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . $where . " ORDER BY u.userid LIMIT " . $ini . ", " . $numtablerows; $res = sql_query($query); $from = Get::req('from', DOTY_MIXED, ''); $back_ui = getBackUi('index.php?r=lms/pcourse/certificate&id_course=' . (int) $id_course, $lang->def('_BACK')); $out->add(getTitleArea(array('index.php?r=lms/pcourse/certificate&id_course=' . (int) $id_course => $lang->def('_CERTIFICATE_ASSIGN_STATUS', 'course'), $lang->def('_CERTIFICATE_REPORT_COURSE_CERT')), 'certificate')); $out->add('<div class="std_block">' . $back_ui); $numrows = sql_num_rows($res); $downloadables = array(); if ($numrows > 0) { $clang =& DoceboLanguage::CreateInstance('course', 'lms'); $type_h = array('image', '', '', '', '', '', '', 'image', 'image'); $cont_h = array('', $lang->def('_USERNAME'), $lang->def('_LASTNAME'), $lang->def('_FIRSTNAME'), $clang->def('_STATUS'), $lang->def('_DATE'), $lang->def('_RELASE_DATE'), Get::img('course/certificate.png', Lang::t('_TITLE_VIEW_CERT', 'certificate')), Get::img('standard/delete.png', Lang::t('_DEL', 'certificate'))); $tb->setColsStyle($type_h); $tb->addHead($cont_h); $acl_man =& $GLOBALS['current_user']->getAclManager(); $arr_status = array(_CUS_CONFIRMED => $clang->def('_USER_STATUS_CONFIRMED'), _CUS_SUBSCRIBED => $clang->def('_USER_STATUS_SUBS'), _CUS_BEGIN => $clang->def('_USER_STATUS_BEGIN'), _CUS_END => $clang->def('_USER_STATUS_END'), _CUS_SUSPEND => $clang->def('_USER_STATUS_SUSPEND')); //foreach($report_info as $info_report) while ($info = sql_fetch_assoc($res)) { $cont = array(); $can_assign = (bool) ($info['on_date'] == ''); $input_id = $info['id_user']; $sel_cell_content = ''; $label_open = ''; $label_close = ''; if ($can_assign) { $input = '<input type="hidden" id="selection_' . $input_id . '" name="selection[' . $input_id . ']" value="' . $input_id . '"/> '; if (in_array($input_id, $total_selection)) { $checked = ' checked="checked"'; } else { $checked = ''; } $sel_cell_content .= $input . '<input type="checkbox" id="selected_' . $input_id . '" name="selected[' . $input_id . ']" value="' . $input_id . '"' . $checked . '/>'; $label_open = '<label for="selected_' . $input_id . '">'; $label_close = '</label>'; } $userid = $acl_man->relativeId($info['userid']); $cont[] = $sel_cell_content; $cont[] = $label_open . ($search_filter != '' ? highlightText($userid, $search_filter) : $userid) . $label_close; $cont[] = $label_open . ($search_filter != '' ? highlightText($info['lastname'], $search_filter) : $info['lastname']) . $label_close; $cont[] = $label_open . ($search_filter != '' ? highlightText($info['firstname'], $search_filter) : $info['firstname']) . $label_close; $cont[] = $arr_status[$info['status']]; $cont[] = $info['date_complete']; $cont[] = $info['on_date']; $url = 'index.php?modname=pcertificate&certificate_id=' . $id_certificate . '&course_id=' . $id_course . '&user_id=' . $info['id_user']; $dl_url = $url . "&op=send_certificate"; if ($can_assign) { $downloadables[] = 'dl_single_' . $input_id; } $cont[] = '<a href="' . ($can_assign ? "javascript:;" : $dl_url) . '" id="dl_single_' . $input_id . '">' . Get::img('course/certificate.png', Lang::t('_TITLE_VIEW_CERT', 'certificate')) . ($can_assign ? $lang->def('_GENERATE') : $lang->def('_DOWNLOAD')) . '</a>'; $cont[] = $can_assign ? "" : '<a href="' . $url . '&op=del_report_certificate">' . Get::img('standard/delete.png', Lang::t('_DEL', 'certificate')) . '</a>'; $tb->addBody($cont); } require_once _base_ . '/lib/lib.dialog.php'; setupHrefDialogBox('a[href*=del_report_certificate]'); $form = new Form(); $form_url = "index.php?modname=pcertificate&op=view_report_certificate&id_certificate=" . (int) $id_certificate . "&id_course=" . (int) $id_course; $out->add($form->openForm("certificates_emission", $form_url)); $out->add($form->getHidden('old_selection', 'old_selection', implode(',', $total_selection))); //search filter ... $release_options = array($lang->def('_ALL') => 0, $lang->def('_ONLY_RELEASED') => 1, $lang->def('_ONLY_TO_RELEASE') => 2); /* $out->add($form->getOpenFieldset($lang->def('_SEARCH_FILTER'))); $out->add($form->getTextfield($lang->def('_FILTER'), "filter", "filter", 255, $search_filter)); $out->add($form->getRadioSet($lang->def('_RELEASE_OPTIONS'), 'only_released', 'only_released', $release_options, $only_released).'<div class="no_float"></div>'); $out->add($form->openButtonSpace()); $out->add($form->getButton("search_button", "search_button", $lang->def('_SEARCH'))); $out->add($form->getButton("reset_button", "reset_button", $lang->def('_UNDO'))); $out->add($form->closeButtonSpace()); $out->add($form->getCloseFieldset()); */ $print_button_1 = '<div><a id="print_selected_button_1" href="javascript:;">' . Get::img('course/certificate.png', Lang::t('_GENERATE_ALL_SELECTED', 'certificate')) . Lang::t('_GENERATE_ALL_SELECTED', 'certificate') . '</a></div>'; $print_button_2 = '<div><a id="print_selected_button_2" href="javascript:;">' . Get::img('course/certificate.png', Lang::t('_GENERATE_ALL_SELECTED', 'certificate')) . Lang::t('_GENERATE_ALL_SELECTED', 'certificate') . '</a></div>'; cout('<div class="quick_search_form">' . Form::getInputTextfield("_FILTER", "filter", "filter", $search_filter, '', 255, '') . Form::getButton("search_button", "search_button", Lang::t('_SEARCH', 'standard'), "search_b") . Form::getButton("reset_button", "reset_button", Lang::t('_RESET', 'standard'), "reset_b") . '<br />' . '<br />' . $lang->def('_RELEASE_OPTIONS') . ': ' . Form::getInputRadio('only_released_0', 'only_released', '0', $only_released == 0, '') . ' <label class="label_normal" for="only_released_0">' . Lang::t('_ALL', 'certificate') . '</label>' . ' ' . Form::getInputRadio('only_released_1', 'only_released', '1', $only_released == 1, '') . ' <label class="label_normal" for="only_released_1">' . Lang::t('_ONLY_RELEASED', 'certificate') . '</label>' . ' ' . Form::getInputRadio('only_released_2', 'only_released', '2', $only_released == 2, '') . ' <label class="label_normal" for="only_released_2">' . Lang::t('_ONLY_TO_RELEASE', 'certificate') . '</label>' . Form::closeForm() . '</div>', 'content'); $navbar = $tb->getNavBar($ini, $totalrows); $out->add($print_button_1 . '<br />' . $navbar . $tb->getTable() . $navbar . '<br />' . $print_button_2); $out->add($form->closeForm()); } else { $out->add($lang->def('_NO_USER_FOR_CERTIFICATE')); } $out->add($back_ui . '</div>'); addCss('style_menu', 'lms'); Util::get_js(Get::rel_path('lms') . '/modules/pcertificate/pcertificate.js', true, true); $script = 'var ajax_url="ajax.server.php?plf=lms&mn=pcertificate"; var _STOP="' . $lang->def('_STOP') . '"; ' . 'var glob_id_certificate = ' . (int) $id_certificate . ', glob_id_course = ' . (int) $id_course . ';' . 'var single_list = [' . (count($downloadables) ? '"' . implode('","', $downloadables) . '"' : '') . ']; ' . 'var reload_url = "' . str_replace('&', '&', isset($form_url) ? $form_url : '') . '", _ERROR_PARSE = "' . $lang->def('_OPERATION_FAILURE') . '", _SUCCESS = "' . $lang->def('_OPERATION_SUCCESSFUL') . '";'; $out->add('<script type="text/javascript">' . $script . '</script>', 'page_head'); }
<?php /** * @version 1.5.0 * @package Related Article * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt */ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_article_related/theme/style.css');
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_comment/theme/style.css');
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_article_list/style.css');
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_user/style.css');
<?php /** * @version 1.5.0 * @package Article NextPrev * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt */ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'modules/mod_article_tags/theme/style.css');
<?php /** * @version 1.5.0 * @package Fi pdf * @copyright Copyright (C) 2012 Fiyo Developers. * @license GNU/GPL, see LICENSE.txt **/ defined('_FINDEX_') or die('Access Denied'); $id = app_param('id'); $view = app_param('view'); addCss(FUrl . '/apps/app_pdf/style/default.css'); switch ($view) { case 'category': require "apps/app_pdf/view/category.php"; break; case 'item': require "apps/app_pdf/view/item.php"; break; case 'pdf': require "apps/app_pdf/view/category.php"; break; default: require "apps/app_pdf/view/default.php"; break; }
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'apps/app_comment/theme/css/style.css'); addCss(FUrl . 'apps/app_article/theme/css/style.css');
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt */ defined('_FINDEX_') or die('Access Denied'); addCss(FUrl . 'apps/app_search/theme/css/style.css');
function view_report_certificate() { checkPerm('view'); require_once _lms_ . '/lib/lib.certificate.php'; require_once _lms_ . '/lib/lib.course.php'; $out =& $GLOBALS['page']; $out->setWorkingZone('content'); $lang =& DoceboLanguage::createInstance('certificate', 'lms'); $deletion = importVar('deletion', true, 0); if ($deletion) { switch ($deletion) { case 1: $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL'))); break; case 2: $out->add(getErrorUi($lang->def('_OPERATION_FAILURE'))); break; case 3: $out->add(getErrorUi($lang->def('_OPERATION_FAILURE'))); break; } } $certificate = new Certificate(); $id_certificate = importVar('id_certificate', true, 0); $id_course = importVar('id_course', true, 0); $selection = importVar('selection', false, array()); //all possible selected values $selected = importVar('selected', false, array()); //effectively selected values with checkbox $sel = importVar('old_selection', false, ''); //selected values from previous table pages if ($sel != '') { $total_selection = explode(',', $sel); } else { $total_selection = array(); } //update total selection foreach ($selection as $key => $val) { if (in_array($val, $selected)) { if (!in_array($val, $total_selection)) { $total_selection[] = $val; } } else { $index = array_search($val, $total_selection); if ($index !== false) { array_splice($total_selection, $index, 1); } } } $search_filter = importVar('filter', false, ''); $only_released = importVar('only_released', true, 0); //which command? if (importVar('search_button', false, false) !== false) { } if (importVar('reset_button', false, false) !== false) { $search_filter = ''; $only_released = 0; } if (importVar('print_button', false, false) !== false) { } $numtablerows = Get::sett('visuItem', 25); $tb = new Table($numtablerows, $lang->def('_CERTIFICATE_VIEW_CAPTION'), $lang->def('_CERTIFICATE_VIEW_CAPTION')); $tb->initNavBar('ini', 'button'); $ini = $tb->getSelectedElement(); $ini_param = Get::req('ini', DOTY_MIXED, array()); //floor($ini / Get::sett('visuItem', 25)); if (empty($ini_param)) { $ini_param = 1; } else { list($ini_param) = each($ini_param); } $tca = $GLOBALS['prefix_lms'] . "_certificate_assign as ca"; $tcc = $GLOBALS['prefix_lms'] . "_certificate_course as cc"; $tcu = $GLOBALS['prefix_lms'] . "_courseuser as cu"; $tu = $GLOBALS['prefix_fw'] . "_user as u"; $where = ""; if ($search_filter != '') { $where .= " AND (u.userid LIKE '%" . $search_filter . "%' OR u.lastname LIKE '%" . $search_filter . "%' OR u.firstname LIKE '%" . $search_filter . "%') "; } if ($only_released > 0) { $where = " AND ca.on_date " . ($only_released == 1 ? "IS NOT" : "IS") . " NULL "; } //$where .= " AND ".$aval_status." ".($only_released==1 ? "<" : ">=")." cu.status "; list($aval_status) = sql_fetch_row(sql_query("SELECT available_for_status FROM " . $tcc . " " . " WHERE id_certificate='" . (int) $id_certificate . "' AND id_course='" . (int) $id_course . "'")); switch ($aval_status) { case AVS_ASSIGN_FOR_ALL_STATUS: $aval_status = " 1 "; break; case AVS_ASSIGN_FOR_STATUS_INCOURSE: $aval_status = " cu.status = " . _CUS_BEGIN . " "; break; case AVS_ASSIGN_FOR_STATUS_COMPLETED: $aval_status = " cu.status = " . _CUS_END . " "; break; } list($totalrows) = sql_fetch_row(sql_query("SELECT COUNT(*) " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . $where)); $query = "SELECT u.userid, u.firstname, u.lastname, cu.date_complete, ca.on_date, cu.idUser as id_user, cu.status " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . $where . " ORDER BY u.userid LIMIT " . $ini . ", " . $numtablerows; //cout('<pre>'.print_r($_POST, true).'</pre>'); //cout($query); $res = sql_query($query); $from = Get::req('from', DOTY_MIXED, ''); if ($from === 'course') { $back_ui = getBackUi('index.php?r=alms/course/certificate&id_course=' . (int) $id_course, $lang->def('_BACK')); $out->add(getTitleArea(array('index.php?r=alms/course/certificate&id_course=' . (int) $id_course => $lang->def('_CERTIFICATE_ASSIGN_STATUS', 'course'), $lang->def('_COURSES')), 'certificate')); } else { $back_ui = getBackUi('index.php?modname=certificate&op=report_certificate&id_certificate=' . (int) $id_certificate, $lang->def('_BACK')); $out->add(getTitleArea(array('index.php?modname=certificate&op=certificate' => $lang->def('_TITLE_CERTIFICATE'), 'index.php?modname=certificate&op=report_certificate&id_certificate=' . (int) $id_certificate => $lang->def('_COURSES'), $lang->def('_CERTIFICATE_VIEW_CAPTION')), 'certificate')); } $out->add('<div class="std_block">' . $back_ui); $numrows = sql_num_rows($res); $downloadables = array(); if ($numrows > 0) { $clang =& DoceboLanguage::CreateInstance('course', 'lms'); $type_h = array('image', '', '', '', '', '', '', 'image', 'image'); $cont_h = array('', $lang->def('_USERNAME'), $lang->def('_LASTNAME'), $lang->def('_FIRSTNAME'), $clang->def('_STATUS'), $lang->def('_DATE'), $lang->def('_RELASE_DATE'), Get::sprite('subs_pdf', Lang::t('_TITLE_VIEW_CERT', 'certificate')), Get::sprite('subs_del', Lang::t('_DEL', 'certificate'))); $tb->setColsStyle($type_h); $tb->addHead($cont_h); $acl_man =& $GLOBALS['current_user']->getAclManager(); $arr_status = array(_CUS_CONFIRMED => $clang->def('_USER_STATUS_CONFIRMED'), _CUS_SUBSCRIBED => $clang->def('_USER_STATUS_SUBS'), _CUS_BEGIN => $clang->def('_USER_STATUS_BEGIN'), _CUS_END => $clang->def('_USER_STATUS_END'), _CUS_SUSPEND => $clang->def('_USER_STATUS_SUSPEND')); //foreach($report_info as $info_report) while ($info = sql_fetch_assoc($res)) { $cont = array(); $can_assign = (bool) ($info['on_date'] == ''); $input_id = $info['id_user']; $sel_cell_content = ''; $label_open = ''; $label_close = ''; if ($can_assign) { $input = '<input type="hidden" id="selection_' . $input_id . '" name="selection[' . $input_id . ']" value="' . $input_id . '"/> '; if (in_array($input_id, $total_selection)) { $checked = ' checked="checked"'; } else { $checked = ''; } $sel_cell_content .= $input . '<input type="checkbox" id="selected_' . $input_id . '" name="selected[' . $input_id . ']" value="' . $input_id . '"' . $checked . '/>'; $label_open = '<label for="selected_' . $input_id . '">'; $label_close = '</label>'; } $userid = $acl_man->relativeId($info['userid']); $cont[] = $sel_cell_content; $cont[] = $label_open . ($search_filter != '' ? highlightText($userid, $search_filter) : $userid) . $label_close; $cont[] = $label_open . ($search_filter != '' ? highlightText($info['lastname'], $search_filter) : $info['lastname']) . $label_close; $cont[] = $label_open . ($search_filter != '' ? highlightText($info['firstname'], $search_filter) : $info['firstname']) . $label_close; $cont[] = $arr_status[$info['status']]; $cont[] = $info['date_complete']; $cont[] = $info['on_date']; $url = 'index.php?modname=certificate&certificate_id=' . $id_certificate . '&course_id=' . $id_course . '&user_id=' . $info['id_user']; $dl_url = $url . "&op=send_certificate"; if ($can_assign) { $downloadables[] = 'dl_single_' . $input_id; } $cont[] = $can_assign ? '<a id="dl_single_' . $input_id . '" class="ico-wt-sprite subs_pdf" href="javascript:;" title="' . $lang->def('_GENERATE') . '"><span>' . $lang->def('_GENERATE') . '</span></a>' : '<a id="dl_single_' . $input_id . '" class="ico-wt-sprite subs_pdf" href="' . $dl_url . '" title="' . $lang->def('_DOWNLOAD') . '"><span>' . $lang->def('_DOWNLOAD') . '</span></a>'; $cont[] = $can_assign ? '' : Get::sprite_link('subs_del', $url . '&op=del_report_certificate', Lang::t('_DEL', 'certificate')); $tb->addBody($cont); } require_once _base_ . '/lib/lib.dialog.php'; setupHrefDialogBox('a[href*=del_report_certificate]'); //search filter ... $release_options = array($lang->def('_ALL') => 0, $lang->def('_RELEASED') => 1, $lang->def('_TO_RELEASE') => 2); //search and store all non-available certificates $all_selection = array(); $query = "SELECT cu.idUser as id_user " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . ($search_filter != '' ? " AND (u.userid LIKE '%" . $search_filter . "%' OR u.lastname LIKE '%" . $search_filter . "%' OR u.firstname LIKE '%" . $search_filter . "%') " : "") . " AND ca.on_date IS NULL "; $res = sql_query($query); while (list($id_user) = sql_fetch_row($res)) { $all_selection[] = $id_user; } //--- $form = new Form(); $submit_url = "index.php?modname=certificate&op=view_report_certificate&id_certificate=" . (int) $id_certificate . "&id_course=" . (int) $id_course; $out->add($form->openForm("certificates_emission", $submit_url) . $form->getHidden('old_selection', 'old_selection', implode(',', $total_selection)) . $form->getHidden('all_selection', 'all_selection', implode(',', $all_selection)) . $form->getHidden('active_text_filter', 'active_text_filter', $search_filter) . $form->getHidden('active_only_released', 'active_only_released', $only_released) . $form->getHidden('active_ini', 'active_ini', $ini_param) . '<div class="quick_search_form">' . '<div class="simple_search_box">' . Form::getInputTextfield("search_t", "filter", "filter", $search_filter, '', 255, '') . Form::getButton("search_button", "search_button", Lang::t('_SEARCH', 'standard'), "search_b") . Form::getButton("reset_button", "reset_button", Lang::t('_RESET', 'standard'), "reset_b") . '</div>' . '<a id="advanced_search" class="advanced_search" href="javascript:;">' . Lang::t("_ADVANCED_SEARCH", 'standard') . '</a>' . '<div id="certificate_release_as" class="advanced_search_options" style="display: ' . ($only_released != 0 ? 'block' : 'none') . '">' . Form::getRadioHoriz(Lang::t('_FILTER', 'certificate'), 'only_released', 'only_released', $release_options, $only_released) . '</div>' . '</div>' . '<script type="text/javascript">' . 'YAHOO.util.Event.addListener("advanced_search", "click", function(e){ var el = YAHOO.util.Dom.get("certificate_release_as"); if (el.style.display != \'block\') el.style.display = \'block\'; else el.style.display = \'none\'; });' . '</script>', 'content'); $delgen_url = 'index.php?modname=certificate&op=del_gen_certificate' . '&id_certificate=' . (int) $id_certificate . '&id_course=' . (int) $id_course; $delgen_txt = Lang::t('_DELETE_ALL_GENERATED', 'certificate'); $print_button_1 = '<div>' . '<a id="print_selected_button_1" href="javascript:;">' . Get::img('course/certificate.png', Lang::t('_GENERATE_ALL_SELECTED', 'certificate')) . Lang::t('_GENERATE_ALL_SELECTED', 'certificate') . '</a>' . '</div>'; $print_button_2 = '<div><a id="print_selected_button_2" href="javascript:;">' . Get::img('course/certificate.png', Lang::t('_GENERATE_ALL_SELECTED', 'certificate')) . Lang::t('_GENERATE_ALL_SELECTED', 'certificate') . '</a>' . '</div>'; $print_button_1 .= Lang::t('_SELECT', 'directory') . ': '; $print_button_2 .= Lang::t('_SELECT', 'directory') . ': '; /* $print_button_1 .= ' <a href="javascript:;" id="select_page_1">'.Lang::t('_SELECT_PAGE', 'standard').'</a>'; $print_button_2 .= ' <a href="javascript:;" id="select_page_2">'.Lang::t('_SELECT_PAGE', 'standard').'</a>'; $print_button_1 .= ' <a href="javascript:;" id="unselect_page_1">'.Lang::t('_UNSELECT_PAGE', 'standard').'</a>'; $print_button_2 .= ' <a href="javascript:;" id="unselect_page_2">'.Lang::t('_UNSELECT_PAGE', 'standard').'</a>'; */ $print_button_1 .= ' <a href="javascript:;" id="select_all_1">' . Lang::t('_ALL_PAGES', 'directory') . '</a>'; $print_button_2 .= ' <a href="javascript:;" id="select_all_2">' . Lang::t('_ALL_PAGES', 'directory') . '</a>'; $print_button_1 .= ' <a href="javascript:;" id="unselect_all_1">' . Lang::t('_NONE', 'directory') . '</a>'; $print_button_2 .= ' <a href="javascript:;" id="unselect_all_2">' . Lang::t('_NONE', 'directory') . '</a>'; $navbar = $tb->getNavBar($ini, $totalrows); $out->add($print_button_1 . '<br />' . $navbar . $tb->getTable() . $navbar . '<br />' . $print_button_2); $out->add($form->closeForm()); } else { $out->add($lang->def('_NO_CONTENT')); } $out->add($back_ui . '</div>'); addCss('style_menu', 'lms'); Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true); Util::get_js(Get::rel_path('lms') . '/admin/modules/certificate/certificate.js?rnd=' . time(), true, true); //addJs($GLOBALS['where_lms_relative'].'/admin/modules/certificate/', 'certificate.js'); $script = 'var ajax_url="ajax.adm_server.php?plf=lms&mn=certificate"; var _STOP="' . $lang->def('_STOP') . '"; ' . 'var glob_id_certificate = ' . (int) $id_certificate . ', glob_id_course = ' . (int) $id_course . ';' . 'var single_list = [' . (count($downloadables) ? '"' . implode('","', $downloadables) . '"' : '') . ']; ' . 'var reload_url = "' . str_replace('&', '&', isset($submit_url) ? $submit_url : '') . '", ' . '_ERROR_PARSE = "' . $lang->def('_OPERATION_FAILURE') . '", _SUCCESS = "' . $lang->def('_OPERATION_SUCCESSFUL') . '", ' . '_AREYOUSURE="' . Lang::t('_AREYOUSURE', 'standard') . '";'; $out->add('<script type="text/javascript">' . $script . '</script>', 'page_head'); }
function adminManager_assignCmsContent($admin_idst) { checkPerm('view'); if ($admin_idst < 1) { return FALSE; } if (isset($_POST["save"])) { adminManager_saveCmsContent($admin_idst); die; } require_once _base_ . '/lib/lib.form.php'; require_once $GLOBALS["where_cms"] . "/lib/lib.tree_perm.php"; require_once $GLOBALS["where_cms"] . "/admin/modules/content/class.content_selector.php"; $res = ""; $out =& $GLOBALS["page"]; $out->setWorkingZone("content"); $lang =& DoceboLanguage::createInstance("admin_manager", "framework"); $form = new Form(); $ctp = new CmsTreePermissions("content"); addCss("base-old-treeview", "cms"); $res .= getTitleArea($lang->def('_ADMIN_MANAGMENT'), 'admin_managmer', $lang->def('_ADMIN_MANAGMENT')); $res .= "<div class=\"std_block\">\n"; $tree = new contentDb(); $content_sel = new Selector_Content_TreeView($tree, FALSE); $content_sel->parsePositionData($_POST, $_POST, $_POST); $content_sel->setNodePerm($ctp->loadAllNodePerm($admin_idst)); $url = "index.php?modname=admin_manager&op=assign_cmscontent&adminidst=" . $admin_idst; $res .= $form->openForm("main_form", $url); $res .= $content_sel->load(); $res .= $form->openButtonSpace(); $res .= $form->getButton('save', 'save', $lang->def('_SAVE')); $res .= $form->getButton('undo_pref', 'undo_pref', $lang->def('_UNDO')); $res .= $form->closeButtonSpace(); $res .= $form->closeForm(); $res .= "</div>\n"; $out->add($res); }
function doimportquest(&$url) { require_once _lms_ . '/lib/lib.quest_bank.php'; $lang_t =& DoceboLanguage::createInstance('test'); $qb_man = new QuestBankMan(); $file_format = Get::pReq('file_format', DOTY_INT, 0); $file_encode = Get::pReq('file_encode', DOTY_ALPHANUM, 'utf-8'); $file_readed = file($_FILES['import_file']['tmp_name']); $quest_category = Get::req('quest_category', DOTY_INT, 0); addCss('style_yui_docebo'); $title = array($url->getUrl() => $lang_t->def('_QUEST_BANK', 'menu_course'), $lang_t->def('_IMPORT')); cout(getTitleArea($title, 'quest_bank') . '<div class="std_block">' . getBackUi($url->getUrl(), $lang_t->def('_BACK')), 'content'); $import_result = $qb_man->import_quest($file_readed, $file_format, 0, $quest_category); cout('<table clasS="type-one" id="import_result">' . '<caption>' . $lang_t->def('_IMPORT') . '</caption>', 'content'); cout('<thead>', 'content'); cout('<tr class="type-one-header">' . '<th>' . $lang_t->def('_QUEST_TYPE') . '</th>' . '<th>' . $lang_t->def('_SUCCESS') . '</th>' . '<th>' . $lang_t->def('_FAIL') . '</th>' . '</tr>', 'content'); cout('</thead>', 'content'); cout('<tbody>', 'content'); foreach ($import_result as $type_quest => $i_result) { cout('<tr>' . '<td>' . $lang_t->def('_QUEST_' . strtoupper($type_quest)) . '</td>' . '<td>' . (isset($i_result['success']) ? $i_result['success'] : '') . '</td>' . '<td>' . (isset($i_result['fail']) ? $i_result['fail'] : '') . '</td>' . '</tr>', 'content'); } cout('</tbody>', 'content'); cout('</table>', 'content'); cout('</div>', 'content'); }