示例#1
0
 function modglossarygui($object_glos = NULL)
 {
     checkPerm('view', false, 'storage');
     $lang =& DoceboLanguage::createInstance('glossary');
     require_once _base_ . '/lib/lib.table.php';
     $tableGlossary = new Table(Get::sett('visuItem'), '', $lang->def('_GLOSSARY_SUMMARY'));
     $tableGlossary->initNavBar('ini', 'link');
     $ini = $tableGlossary->getSelectedElement();
     $back_coded = htmlentities(urlencode($object_glos->back_url));
     list($title) = sql_fetch_row(sql_query("\r\n\tSELECT title\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossary \r\n\tWHERE idGlossary = '" . $object_glos->getId() . "'"));
     $reTerm = sql_query("\r\n\tSELECT idTerm, term \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossaryterm \r\n\tWHERE idGlossary = '" . $object_glos->getId() . "' \r\n\tORDER BY term \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
     list($num_of_term) = sql_fetch_row(sql_query("\r\n\tSELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossaryterm\r\n\tWHERE idGlossary = '" . $object_glos->getId() . "'"));
     if ($title == '') {
         $_SESSION['last_error'] = $lang->def('_FILEUNSPECIFIED');
         Util::jump_to(Util::str_replace_once('&', '&', $object_glos->back_url) . '&create_result=0');
     }
     $GLOBALS['page']->add(getTitleArea($lang->def('_GLOSSARY'), 'glossary', $lang->def('_GLOSSARY')) . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $object_glos->back_url) . '&amp;mod_result=0', $lang->def('_BACK')) . '<b>' . $lang->def('_GLOSSARY') . ' : ' . $title . '</b><br /><br />' . '<div class="mod_container">' . '<a href="index.php?modname=glossary&amp;op=modglossary&amp;idGlossary=' . $object_glos->getId() . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_MOD_TITLE') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /> ' . $lang->def('_MOD_TITLE') . '</a>' . '</div><br />', 'content');
     $contentArray = array($lang->def('_TERM'), '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '" />');
     $typeArray = array('', 'image', 'image');
     $GLOBALS['page']->add($tableGlossary->addHead($contentArray, $typeArray));
     while (list($idTerm, $term) = sql_fetch_row($reTerm)) {
         $content = array($term, '<a href="index.php?modname=glossary&amp;op=modterm&amp;idTerm=' . $idTerm . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_MOD') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /></a>', '<a href="index.php?modname=glossary&amp;op=delterm&amp;idTerm=' . $idTerm . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_DEL') . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
         $tableGlossary->addBody($content);
     }
     $tableGlossary->addActionAdd('<a href="index.php?modname=glossary&amp;op=addterm&amp;idGlossary=' . $object_glos->getId() . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_ADDTERM') . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADDTERM') . '</a>');
     $tableGlossary->setLink('index.php?modname=glossary&amp;op=modglossarygui' . '&amp;idGlossary=' . $object_glos->getId() . '&amp;back_url=' . $back_coded);
     $GLOBALS['page']->add($tableGlossary->getTable() . $tableGlossary->getNavBar($ini, $num_of_term) . '</div>', 'content');
 }
 public function init()
 {
     $this->id_date = Get::req('id_date', DOTY_INT, 0);
     $this->model = new PresenceLms($_SESSION['idCourse'], $this->id_date);
     $this->json = new Services_JSON();
     $this->permissions = array('view' => true);
 }
示例#3
0
 /**
  * Returns an singleton instance of this class
  * @return
  */
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new Get();
     }
     return self::$instance;
 }
示例#4
0
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');
}
示例#5
0
 function show()
 {
     global $page, $db, $user, $fs, $proj;
     $page->setTitle($fs->prefs['page_title'] . L('reports'));
     $events = array(1 => L('taskopened'), 13 => L('taskreopened'), 2 => L('taskclosed'), 3 => L('taskedited'), 14 => L('assignmentchanged'), 29 => L('events.useraddedtoassignees'), 4 => L('commentadded'), 5 => L('commentedited'), 6 => L('commentdeleted'), 7 => L('attachmentadded'), 8 => L('attachmentdeleted'), 11 => L('relatedadded'), 12 => L('relateddeleted'), 9 => L('notificationadded'), 10 => L('notificationdeleted'), 17 => L('reminderadded'), 18 => L('reminderdeleted'));
     $user_events = array(30 => L('created'), 31 => L('deleted'));
     $page->assign('events', $events);
     $page->assign('user_events', $user_events);
     $sort = strtoupper(Get::enum('sort', array('desc', 'asc')));
     $where = array();
     $params = array();
     $orderby = '';
     switch (Get::val('order')) {
         case 'type':
             $orderby = "h.event_type {$sort}, h.event_date {$sort}";
             break;
         case 'user':
             $orderby = "user_id {$sort}, h.event_date {$sort}";
             break;
         case 'date':
         default:
             $orderby = "h.event_date {$sort}, h.event_type {$sort}";
     }
     foreach (Get::val('events', array()) as $eventtype) {
         $where[] = 'h.event_type = ?';
         $params[] = $eventtype;
     }
     $where = '(' . implode(' OR ', $where) . ')';
     if ($proj->id) {
         $where = $where . 'AND (t.project_id = ?  OR h.event_type > 29) ';
         $params[] = $proj->id;
     }
     if (($fromdate = Req::val('fromdate')) || Req::val('todate')) {
         $where .= ' AND ';
         $todate = Req::val('todate');
         if ($fromdate) {
             $where .= ' h.event_date > ?';
             $params[] = Flyspray::strtotime($fromdate) + 0;
         }
         if ($todate && $fromdate) {
             $where .= ' AND h.event_date < ?';
             $params[] = Flyspray::strtotime($todate) + 86400;
         } else {
             if ($todate) {
                 $where .= ' h.event_date < ?';
                 $params[] = Flyspray::strtotime($todate) + 86400;
             }
         }
     }
     $histories = array();
     if (count(Get::val('events'))) {
         if (Get::num('event_number') > 0) {
             $db->setLimit(Get::num('event_number'));
         }
         $histories = $db->x->getAll("SELECT h.*, t.*, p.project_prefix\n                                             FROM {history} h\n                                        LEFT JOIN {tasks} t ON h.task_id = t.task_id\n                                        LEFT JOIN {projects} p ON t.project_id = p.project_id\n                                            WHERE {$where}\n                                         ORDER BY {$orderby}", null, $params);
     }
     $page->assign('histories', $histories);
     $page->assign('sort', $sort);
     $page->pushTpl('reports.tpl');
 }
 public function showTask()
 {
     $model = new SettingAdm();
     $regroup = $model->getRegroupUnit();
     $active_tab = Get::req('active_tab', DOTY_MIXED, 1);
     $this->render('show', array('model' => $model, 'regroup' => $regroup, 'active_tab' => $active_tab));
 }
示例#7
0
 /**
  * Load css and yui file
  * @return null
  * @param $js Array[optional]
  * @param $css Array[optional]
  */
 public static function load($module_list = false, $noprint = false)
 {
     $module_list = 'base,autocomplete,charts,tabview,table,treeview,colorpicker';
     if (strpos($module_list, 'base') !== false) {
         $module_list = 'base,' . $module_list;
     }
     $list = explode(',', $module_list);
     $js_load = array();
     $css_load = array();
     foreach ($list as $k => $module) {
         if (isset(self::$_css_map[$module])) {
             $css_load = array_unique(array_merge($css_load, self::$_css_map[$module]));
         }
         if (isset(self::$_js_map[$module])) {
             $js_load = array_unique(array_merge($js_load, self::$_js_map[$module]));
         }
     }
     // remove js alredy loaded
     $css_load = array_diff($css_load, self::$_css_loaded);
     $js_load = array_diff($js_load, self::$_js_loaded);
     if (empty($css_load) && empty($js_load)) {
         return '';
     }
     // load new css
     $to_load = '';
     if (!empty($css_load)) {
         $to_load .= '<!-- yui css -->';
         foreach ($css_load as $k => $filename) {
             $to_load .= Util::get_css(Get::tmpl_path('base') . 'yui-skin/' . $filename, true);
         }
     }
     // load new js
     if (!empty($js_load)) {
         $to_load .= '<!-- yui js -->';
         foreach ($js_load as $k => $filename) {
             $to_load .= Util::get_js('/addons/yui/' . $filename);
             if ($filename == 'utilities/utilities.js') {
                 $to_load .= "\n" . '<script type="text/javascript"> YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); YAHOO.util.Connect.startEvent.subscribe(function() { YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); });</script>';
             }
             if ($filename == 'charts/charts-min.js') {
                 $to_load .= "\n" . '<script type="text/javascript"> YAHOO.widget.Chart.SWFURL = "' . Get::rel_path('base') . '/addons/yui/charts/assets/charts.swf"; </script>';
             }
         }
         if (Lang::direction() == 'rtl') {
             $to_load .= Util::get_js('/addons/yui/yui-rtl.js');
         }
     }
     // add loaded file to the cache
     if (!empty($css_load)) {
         self::$_css_loaded = array_merge(self::$_css_loaded, $css_load);
     }
     if (!empty($js_load)) {
         self::$_js_loaded = array_merge(self::$_js_loaded, $js_load);
     }
     if (function_exists('cout') && !$noprint) {
         cout($to_load, 'page_head');
     } else {
         return $to_load;
     }
 }
示例#8
0
function tagslist()
{
    require_once _base_ . '/lib/lib.table.php';
    require_once $GLOBALS['where_framework'] . '/lib/lib.tags.php';
    $lang =& DoceboLanguage::createInstance('tags', 'framework');
    $id_tag = Get::req('id_tag', DOTY_INT, 0);
    $tag_name = Get::req('tag', DOTY_STRING, '');
    $filter = Get::req('filter', DOTY_STRING, '');
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
    $nav_bar->setLink('index.php?modname=tags&amp;op=tags&amp;id_tag=' . $id_tag);
    $ini = $nav_bar->getSelectedElement();
    $tags = new Tags('*');
    $resources = $tags->getResourceByTags($id_tag, false, false, $ini, Get::sett('visuItem'));
    $GLOBALS['page']->add(getTitleArea(array($lang->def('_TAGS')), 'tags') . '<div class="std_block">' . '<div class="tag_list">', 'content');
    while (list(, $res) = each($resources['list'])) {
        $link = $res['permalink'];
        $delim = strpos($link, '?') === false ? '?' : '&';
        if (strpos($link, '#') === false) {
            $link = $link . $delim . 'sop=setcourse&sop_idc=' . $res['id_course'];
        } else {
            $link = str_replace('#', $delim . 'sop=setcourse&sop_idc=' . $res['id_course'] . '#', $link);
        }
        $GLOBALS['page']->add('' . '<h2>' . '<a href="' . $link . '">' . $res['title'] . '</a>' . '</h2>' . '<p>' . $res['sample_text'] . '</p>' . '<div class="tag_cloud">' . '<span>' . $lang->def('_TAGS') . ' : </span>' . '<ul><li>' . implode('</li><li>', $res['related_tags']) . '</li></ul>' . '</div>' . '<br />', 'content');
    }
    $GLOBALS['page']->add('</div>' . $nav_bar->getNavBar($ini, $resources['count']) . '</div>', 'content');
}
示例#9
0
 public function validate()
 {
     $_SESSION['adm_info'] = Get::pReq('adm_info');
     $_SESSION['lang_install'] = Get::pReq('lang_install');
     $this->saveConfig();
     return true;
 }
示例#10
0
 public function getTransaction($start_index, $results, $sort, $dir, $filter = false)
 {
     $query = "SELECT t.id_trans, t.date_creation, t.date_activated, t.paid, SUM(ti.price) as price, u.userid, u.firstname, u.lastname" . " FROM %adm_transaction as t" . " JOIN %adm_transaction_info as ti ON t.id_trans = ti.id_trans" . " JOIN %adm_user as u ON t.id_user = u.idst" . " WHERE 1";
     $query .= " GROUP BY t.id_trans";
     switch ($sort) {
         case 'userid':
             $query .= " ORDER BY u.userid " . $dir;
             break;
         case 'firstname':
             $query .= " ORDER BY u.firstname " . $dir;
             break;
         case 'lastname':
             $query .= " ORDER BY u.lastname " . $dir;
             break;
         case 'date_creation':
             $query .= " ORDER BY t.date_creation " . $dir;
             break;
         case 'date_activated':
             $query .= " ORDER BY t.date_activated " . $dir;
             break;
     }
     $start_index === false ? '' : ($query .= " LIMIT " . $start_index . ", " . $results);
     $result = sql_query($query);
     $res = array();
     while ($row = sql_fetch_assoc($result)) {
         $row['userid'] = $this->acl_man->relativeId($row['userid']);
         $row['date_creation'] = Format::date($row['date_creation'], 'datetime');
         $row['date_activated'] = Format::date($row['date_activated'], 'datetime');
         $row['paid'] = $row['paid'] == 1 ? Get::img('standard/status_active.png', Lang::t('_ACTIVATED', 'transaction')) : Get::img('standard/status_deactive.png', Lang::t('_NOT_ACTIVATED', 'transaction'));
         $row['edit'] = '<a href="index.php?r=alms/transaction/mod&amp;id_trans=' . $row['id_trans'] . '" title="' . Lang::t('_MOD', 'transaction') . '">' . Get::img('standard/edit.png', Lang::t('_MOD', 'transaction')) . '</a>';
         $res[] = $row;
     }
     return $res;
 }
示例#11
0
 /**
  * This function return the correct order to use when you wish to diplay the a
  * course list for the user.
  * @param <array> $t_name the table name to use as a prefix for the field, if false is passed no prefix will e used
  *							we need a prefix for the course user rows and a prefix for the course table
  *							array('u', 'c')
  * @return <string> the order to use in a ORDER BY clausole
  */
 protected function _resolveOrder($t_name = array('', ''))
 {
     // read order for the course from database
     if ($this->_t_order == false) {
         $t_order = Get::sett('tablist_mycourses', false);
         if ($t_order != false) {
             $arr_order_course = explode(',', $t_order);
             $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;
                 }
             }
             $t_order = implode(', ', $arr_temp);
         } else {
             $t_order = '?u.status, ?c.name';
         }
         // save a class copy of the resolved list
         $this->_t_order = $t_order;
     }
     foreach ($t_name as $key => $value) {
         if ($value != '') {
             $t_name[$key] = $value . '.';
         }
     }
     return str_replace(array('?u.', '?c.'), $t_name, $this->_t_order);
 }
示例#12
0
function tpl_list_heading($colname, $format = "<th%s>%s</th>")
{
    global $proj, $page;
    $imgbase = '<img src="%s" alt="%s" />';
    $class = '';
    $html = eL($colname);
    if ($colname == 'comments' || $colname == 'attachments') {
        $html = sprintf($imgbase, $page->get_image(substr($colname, 0, -1)), $html);
    }
    if (Get::val('order') == $colname) {
        $class = ' class="orderby"';
        $sort1 = Get::safe('sort', 'desc') == 'desc' ? 'asc' : 'desc';
        $sort2 = Get::safe('sort2', 'desc');
        $order2 = Get::safe('order2');
        $html .= '&nbsp;&nbsp;' . sprintf($imgbase, $page->get_image(Get::val('sort')), Get::safe('sort'));
    } else {
        $sort1 = 'desc';
        if (in_array($colname, array('project', 'tasktype', 'category', 'openedby', 'assignedto'))) {
            $sort1 = 'asc';
        }
        $sort2 = Get::safe('sort', 'desc');
        $order2 = Get::safe('order');
    }
    $new_order = array('order' => $colname, 'sort' => $sort1, 'order2' => $order2, 'sort2' => $sort2);
    $html = sprintf('<a title="%s" href="%s">%s</a>', eL('sortthiscolumn'), Filters::noXSS(CreateURL('index', $proj->id, null, array_merge($_GET, $new_order))), $html);
    return sprintf($format, $class, $html);
}
示例#13
0
 function loadBody()
 {
     switch ($GLOBALS['op']) {
         case 'showresults':
             $id_course = Get::req('id_course', DOTY_INT, false);
             $_SESSION['idCourse'] = $id_course;
             Util::jump_to('index.php?modname=organization&op=showresults&idcourse=' . $id_course);
             break;
         case "mycourses":
         case "unregistercourse":
             require_once $GLOBALS['where_lms'] . '/modules/' . $this->module_name . '/course.php';
             require_once _base_ . '/lib/lib.urlmanager.php';
             $url =& UrlManager::getInstance('course');
             $url->setStdQuery('r=' . _after_login_);
             mycourses($url);
             break;
         case "donwloadmaterials":
             downloadMaterials();
             break;
         default:
             require_once $GLOBALS['where_lms'] . '/modules/' . $this->module_name . '/infocourse.php';
             infocourseDispatch($GLOBALS['op']);
             break;
     }
 }
function do_private_post($content, $results)
{
    global $config, $speak;
    $results = Mecha::O($results);
    $results = $config->is->post ? Get::postHeader($results->path, POST . DS . $config->page_type, '/', $config->page_type . ':') : false;
    if ($results === false) {
        return $speak->plugin_private_post->description;
    }
    $s = isset($results->fields->pass) ? $results->fields->pass : "";
    if (strpos($s, ':') !== false) {
        $s = explode(':', $s, 2);
        if (isset($s[1])) {
            $speak->plugin_private_post->hint = ltrim($s[1]);
        }
        // override password hint
        $s = $s[0];
    }
    $hash = md5($s . PRIVATE_POST_SALT);
    $html = Notify::read(false) . '<div class="overlay--' . File::B(__DIR__) . '"></div><form class="form--' . File::B(__DIR__) . '" action="' . $config->url . '/' . File::B(__DIR__) . '/do:access" method="post">' . NL;
    $html .= TAB . Form::hidden('token', Guardian::token()) . NL;
    $html .= TAB . Form::hidden('_', $hash) . NL;
    $html .= TAB . Form::hidden('kick', $config->url_current) . NL;
    $html .= TAB . '<p>' . $speak->plugin_private_post->hint . '</p>' . NL;
    $html .= TAB . '<p>' . Form::text('access', "", $speak->password . '&hellip;', array('autocomplete' => 'off')) . ' ' . Form::button($speak->submit, null, 'submit') . '</p>' . NL;
    $html .= '</form>' . O_END;
    if ($results && isset($results->fields->pass) && trim($results->fields->pass) !== "") {
        if (!Guardian::happy() && Session::get('is_allow_post_access') !== $hash) {
            return $html;
        }
    }
    return $content;
}
 function getBoxContent()
 {
     $html = array();
     if (!checkPerm('view_org_chart', true, 'directory', 'framework')) {
         return $html;
     }
     require_once _base_ . '/lib/lib.userselector.php';
     $user_dir = new UserSelector();
     $user_stats = $user_dir->getUsersStats();
     $lang =& DoceboLanguage::createInstance('dashboard', 'framework');
     if (Get::sett('welcome_use_feed') == 'on') {
         require_once _base_ . '/lib/lib.fsock_wrapper.php';
         $fp = new Fsock();
         $released_version = $fp->send_request('http://www.formalms.org/versions/release.txt');
         if (!$fp) {
             $released_version = '<strong class="old_release">' . $lang->def('_UNKNOWN_RELEASE') . '</strong>';
         } else {
             if ($released_version == false) {
                 $released_version = '<strong class="ok_release">' . $lang->def('_UNKNOWN_RELEASE') . '</strong>';
             }
             if ($released_version == Get::sett('core_version')) {
                 $released_version = '<strong class="ok_release">' . $released_version . '</strong>';
             } else {
                 $released_version = '<strong class="old_release">' . $released_version . ' (' . $lang->def('_NEW_RELEASE_AVAILABLE') . ')</strong>';
             }
         }
     }
     $html[] = '<h2 class="inline">' . $lang->def('_USERS_PANEL') . '</h2>' . '<p>' . $lang->def('_TOTAL_USER') . ': <b>' . ($user_stats['all'] - 1) . '</b>;<br />' . $lang->def('_SUSPENDED') . ': <b>' . $user_stats['suspended'] . '</b>;<br />' . (checkPerm('approve_waiting_user', true, 'directory', 'framework') ? $lang->def('_WAITING_USERS') . ': <b>' . $user_stats['waiting'] . '</b>;' : '') . '</p><p>' . $lang->def('_SUPERADMIN_USER') . ': <b>' . $user_stats['superadmin'] . '</b>;<br />' . $lang->def('_ADMIN_USER') . ': <b>' . $user_stats['admin'] . '</b>;<br />' . $lang->def('_PUBLIC_ADMIN_USER') . ': <b>' . $user_stats['public_admin'] . '</b>;' . '</p><p>' . $lang->def('_REG_TODAY') . ': <b>' . $user_stats['register_today'] . '</b>;<br />' . $lang->def('_REG_YESTERDAY') . ': <b>' . $user_stats['register_yesterday'] . '</b>;<br />' . $lang->def('_REG_LASTSEVENDAYS') . ': <b>' . $user_stats['register_7d'] . '</b>;' . '</p><p>' . $lang->def('_INACTIVE_USER') . ': <b>' . $user_stats['inactive_30d'] . '</b>;<br />' . $lang->def('_ONLINE_USER') . ': <b>' . $user_stats['now_online'] . '</b>;' . '</p><p>' . $lang->def('_CORE_VERSION') . ': <b>' . Get::sett('core_version') . '</b>;<br />' . (Get::sett('welcome_use_feed') == 'on' ? $lang->def('_LAST_RELEASED') . ': ' . $released_version . ';' : '') . '</p>';
     return $html;
 }
示例#16
0
 function ChatBooking($module, $prefix = FALSE, $dbconn = NULL)
 {
     $this->prefix = $prefix !== FALSE ? $prefix : $GLOBALS["prefix_scs"];
     $this->dbconn = $dbconn;
     $this->platform = Get::cur_plat();
     $this->module = $module;
 }
示例#17
0
 function server_info()
 {
     $lang =& DoceboLanguage::createInstance('configuration', 'framework');
     $php_conf = ini_get_all();
     $intest = '<div>' . '<div class="label_effect">';
     $html = '<div class="conf_line_title">' . $lang->def('_SERVERINFO') . '</div>' . config_line($lang->def('_SERVER_ADDR'), $_SERVER['SERVER_ADDR']) . config_line($lang->def('_SERVER_PORT'), $_SERVER['SERVER_PORT']) . config_line($lang->def('_SERVER_NAME'), $_SERVER['SERVER_NAME']) . config_line($lang->def('_SERVER_ADMIN'), $_SERVER['SERVER_ADMIN']) . config_line($lang->def('_SERVER_SOFTWARE'), $_SERVER['SERVER_SOFTWARE']) . '<br />' . '<div class="conf_line_title">' . $lang->def('_SERVER_MYSQL') . '</div>' . config_line($lang->def('_MYSQL_VERS'), mysql_get_server_info()) . '<br />' . '<div class="conf_line_title">' . $lang->def('_PHPINFO') . '</div>' . config_line($lang->def('_PHPVERSION'), phpversion()) . config_line($lang->def('_SAFEMODE'), $php_conf['safe_mode']['local_value'] ? $lang->def('_ON') : $lang->def('_OFF')) . config_line($lang->def('_REGISTER_GLOBAL'), $php_conf['register_globals']['local_value'] ? $lang->def('_ON') : $lang->def('_OFF')) . config_line($lang->def('_MAGIC_QUOTES_GPC'), $php_conf['magic_quotes_gpc']['local_value'] ? $lang->def('_ON') : $lang->def('_OFF')) . config_line($lang->def('_UPLOAD_MAX_FILESIZE'), $php_conf['upload_max_filesize']['local_value']) . config_line($lang->def('_POST_MAX_SIZE'), $php_conf['post_max_size']['local_value']) . config_line($lang->def('_MAX_EXECUTION_TIME'), $php_conf['max_execution_time']['local_value'] . 's') . config_line($lang->def('_LDAP'), extension_loaded('ldap') ? $lang->def('_ON') : '<span class="font_red">' . $lang->def('_OFF') . ' ' . $lang->def('_USEFULL_ONLY_IF') . '</span>') . config_line($lang->def('_PHP_TIMEZONE'), @date_default_timezone_get());
     if (version_compare(phpversion(), "5.0.0") == -1) {
         echo config_line($lang->def('_DOMXML'), extension_loaded('domxml') ? $lang->def('_ON') : '<span class="font_red">' . $lang->def('_OFF') . ' (' . $lang->def('_NOTSCORM') . ')</span>');
     }
     if (version_compare(phpversion(), "5.2.0", ">")) {
         echo config_line($lang->def('_ALLOW_URL_INCLUDE'), $php_conf['allow_url_include']['local_value'] ? '<span class="font_red">' . $lang->def('_ON') . '</span>' : $lang->def('_OFF'));
     }
     if (Get::cfg('uploadType') == 'ftp') {
         if (function_exists("ftp_connect")) {
             require_once _base_ . '/lib/lib.upload.php';
             $re_con = sl_open_fileoperations();
             echo config_line($lang->def('_UPLOADFTP'), $re_con ? $lang->def('_FTPOK') : '<span class="font_red">' . $lang->def('_FTPERR') . '</span>');
             if ($re_con) {
                 sl_close_fileoperations();
             }
         } else {
             echo config_line($lang->def('_UPLOADFTP'), '<span class="font_red">' . $lang->def('_FTPERR') . '</span>');
         }
     }
     echo '<div class="nofloat"></div><br />';
     return $html;
 }
示例#18
0
function loadMenu()
{
    $lang = DoceboLanguage::createInstance('login');
    $query = "\r\n\tSELECT idPages, title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_webpages \r\n\tWHERE publish = '1' AND language = '" . getLanguage() . "'\r\n\t";
    //if(Get::sett('home_course_catalogue') == 'off') {
    if (Get::sett('home_course_catalogue', 'off')) {
        $query .= "  AND in_home = '0' ";
    }
    $query .= " ORDER BY sequence ";
    $result = sql_query($query);
    $out = '<div class="login_menu_box">' . "\n" . '<ul class="log_list">' . "\n" . '<li class="first_row"><a class="voice" href="index.php">' . $lang->def('_HOMEPAGE') . '</a></li>';
    while (list($idPages, $title) = sql_fetch_row($result)) {
        $out .= '<li>' . '<a class="voice" href="index.php?modname=login&amp;op=readwebpages&amp;idPages=' . $idPages . '">' . $title . '</a></li>';
    }
    //if(Get::sett('activeNews') == 'link') {
    if (Get::sett('activeNews', '')) {
        $out .= '<li><a class="voice" href="index.php?modname=login&amp;op=news">' . $lang->def('_NEWS') . '</a></li>';
    }
    $lang = DoceboLanguage::createInstance('course', 'lms');
    if (Get::sett('course_block', 'on') == 'on' && Get::sett('home_course_catalogue', 'off') == 'off') {
        $out .= '<li><a class="voice" href="index.php?modname=login&amp;op=courselist">' . $lang->def('_COURSE_LIST') . '</a></li>';
    }
    $out .= '</ul>' . "\n" . '</div>' . "\n";
    return $out;
}
示例#19
0
/**
 * create a istance of a specified class of a module
 * automaticaly include the file that contains the class of the module
 *
 * @param string	$module_name 	the name og the module to istance
 * @param string 	$class_name 	the name of the class relative to the module, if not passed is 
 *									extracted from the $module_name
 * 
 * @return mixed 	the class istance
 */
function createModule($module_name, $class_name = NULL)
{
    $module_name = preg_replace('/[^a-zA-Z0-9\\-\\_]+/', '', $module_name);
    if (file_exists(_base_ . '/customscripts/' . _folder_lms_ . '/class.module/class.' . $module_name . '.php') && Get::cfg('enable_customscripts', false) == true) {
        include_once _base_ . '/customscripts/' . _folder_lms_ . '/class.module/class.' . $module_name . '.php';
        if ($class_name === NULL) {
            $class_name = 'Module_' . ucfirst($module_name);
        }
    } else {
        if (file_exists(dirname(__FILE__) . '/../class.module/class.' . $module_name . '.php')) {
            include_once dirname(__FILE__) . '/../class.module/class.' . $module_name . '.php';
            if ($class_name === NULL) {
                $class_name = 'Module_' . ucfirst($module_name);
            }
        } else {
            include_once dirname(__FILE__) . '/../class.module/class.definition.php';
            $class_name = 'LmsModule';
        }
    }
    if (Get::cfg('enable_plugins', false)) {
        if (checkIfPlugin($module_name) == "plugin") {
            include_once Get::rel_path('plugins') . '/' . $module_name . '/class/class.' . $module_name . '.php';
            $class_name = 'Module_' . ucfirst($module_name);
        }
    }
    $module_cfg = new $class_name();
    return $module_cfg;
}
示例#20
0
    function setupJs($tags_id, $private_tags = '')
    {
        if (!$this->_use_tag) {
            return '';
        }
        $lang =& DoceboLanguage::createInstance('tags', 'framework');
        $this->tags_id = $tags_id;
        YuiLib::load(array('autocomplete' => 'autocomplete-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'autocomplete.css'));
        Util::get_js(Get::rel_path('adm') . '/lib/lib.tags.js', true, true);
        // setup some thing that we need in the tag editor
        $GLOBALS['page']->add('<script type="text/javascript">' . "\n" . 'var tag_params ={
			resource_type: "' . $this->resource_type . '", 
			addr: "' . $GLOBALS['where_framework_relative'] . '/ajax.adm_server.php",
			query_append: "file=tags",
			query:"' . $tags_id . '",
			private_query:"' . $private_tags . '",
			popular_tags: "' . addslashes(implode(', ', $this->getPopularTag())) . '",
			user_tags: "' . addslashes(implode(', ', $this->getUserPopularTag(getLogUserId()))) . '", 
			lang: { tags: "' . addslashes($lang->def("_TAGS")) . '",
				tips: "' . addslashes($lang->def("_TAGS_TIPS")) . '",
				popular_tags: "' . addslashes($lang->def("_POPULAR")) . '",
				user_tags: "' . addslashes($lang->def("_YOURS")) . '",
				save: "' . addslashes($lang->def("_SAVE")) . '",
				undo: "' . addslashes($lang->def("_UNDO")) . '",
				add_tags: "' . addslashes($lang->def("_ADD_TAGS")) . '",
				update_tags: "' . addslashes($lang->def("_MOD")) . '"
			}
		};' . "\n" . '</script>', 'scripts');
    }
 public function mod()
 {
     $id_trans = Get::req('id_trans', DOTY_INT, 0);
     if (isset($_POST['undo'])) {
         Util::jump_to('index.php?r=alms/transaction/show');
     }
     if (isset($_POST['save']) || isset($_POST['not_paid'])) {
         $product_to_activate = Get::req('product', DOTY_MIXED, array());
         $id_user = Get::req('id_user', DOTY_MIXED, 0);
         if ($this->model->saveTransaction($product_to_activate, $id_trans, $id_user)) {
             $this->model->controlActivation($id_trans, isset($_POST['not_paid']));
             Util::jump_to('index.php?r=alms/transaction/show&res=ok');
         }
         Util::jump_to('index.php?r=alms/transaction/show&res=err');
     }
     $transaction_info = $this->model->getTransactionInfo($id_trans);
     $user_info = $this->acl_man->getUser($transaction_info['id_user'], false);
     $user_info[ACL_INFO_USERID] = $this->acl_man->relativeId($user_info[ACL_INFO_USERID]);
     require_once _base_ . '/lib/lib.table.php';
     $tb = new Table(false, Lang::t('_DETAILS', 'transaction'), Lang::t('_DETAILS', 'transaction'));
     $ts = array('', '', 'min-cell', 'image');
     $th = array(Lang::t('_CODE', 'transaction'), Lang::t('_NAME', 'transaction'), Lang::t('_PRICE', 'transaction'), Lang::t('_MARK_AS_PAID', 'transaction'));
     $tb->setColsStyle($ts);
     $tb->addHead($th);
     foreach ($transaction_info['product'] as $product_info) {
         $tb->addBody(array($product_info['code'], $product_info['name'], $product_info['price'], Form::getInputCheckbox('product_' . $product_info['id_course'] . '_' . $product_info['id_date'] . '_' . $product_info['id_edition'], 'product[' . $product_info['id_course'] . '_' . $product_info['id_date'] . '_' . $product_info['id_edition'] . ']', 1, $product_info['activated'], $product_info['activated'] ? ' disabled="disabled"' : '')));
     }
     $this->render('mod', array('transaction_info' => $transaction_info, 'user_info' => $user_info, 'tb' => $tb, 'id_trans' => $id_trans));
 }
示例#22
0
 function getCourseWikiTable($can_mod = FALSE, $wiki_list = FALSE)
 {
     $um =& UrlManager::getInstance();
     // $course_id =$this->getCourseId();
     $res = "";
     if ($wiki_list === FALSE || !is_array($wiki_list)) {
         $wiki_list = $this->getCourseWikiList();
     }
     $where = "wiki_id IN (" . implode(",", $wiki_list["list"]) . ")";
     $source_platform = $this->getSourcePlatform();
     $data_info = $this->wikiManager->getWikiList(FALSE, FALSE, $where, $source_platform);
     $data_arr = $data_info["data_arr"];
     $db_tot = $data_info["data_tot"];
     $tot = count($data_arr);
     for ($i = 0; $i < $tot; $i++) {
         $id = $data_arr[$i]["wiki_id"];
         $rowcnt = array();
         $rowcnt[] = $data_arr[$i]["title"];
         $url = $um->getUrl("op=show&wiki_id=" . $id);
         $res .= '<div class="list_block">';
         $res .= '<h2 class="heading"><a href="' . $url . '">' . $data_arr[$i]["title"] . '</a></h2>' . "\n";
         $res .= '<p class="content">' . $data_arr[$i]["description"] . '</p>' . "\n";
         if ($can_mod) {
             $res .= '<div class="actions">' . '<ul class="link_list_inline">' . "\n";
             $url = $um->getUrl("op=editwiki&wiki_id=" . $id);
             $res .= '<li><a class="ico-wt-sprite subs_mod" href="' . $url . '">';
             $res .= '<span>' . $this->lang->def("_MOD") . '</span></a></li>';
             $url = $um->getUrl("op=setperm&wiki_id=" . $id);
             if ($data_arr[$i]["public"] == 1 && Get::cur_plat() != 'lms') {
                 $res .= '<li><a class="ico-wt-sprite subs_users" href="' . $url . '">';
                 $res .= '<span>' . $this->lang->def("_ALT_SETPERM") . '</span></a></li>';
             }
             if ($wiki_list["data"][$id]["is_owner"] == 1) {
                 $url = $um->getUrl("op=delwiki&wiki_id=" . $id);
                 $res .= '<li><a class="ico-wt-sprite subs_del" href="' . $url . '" title="' . $this->lang->def("_DEL") . ' : ' . strip_tags($data_arr[$i]["title"]) . '">';
                 $res .= '<span>' . $this->lang->def("_DEL") . '</span></a></li>';
             }
             $res .= "</ul></div>";
         }
         $res .= "</div>\n";
         // wiki_box
     }
     if ($can_mod) {
         $res .= '<div class="table-container-below">';
         $res .= '<ul class="link_list_inline">' . "\n";
         $url = $um->getUrl("op=addwiki");
         $res .= '<li><a class="ico-wt-sprite subs_add" href="' . $url . '">';
         $res .= '<span>' . $this->lang->def("_ADD_WIKI") . '</span></a></li>';
         $url = $um->getUrl("op=selectwiki");
         $res .= '<li><a class="ico-wt-sprite subs_import" href="' . $url . '">';
         $res .= '<span>' . $this->lang->def("_SELECT_WIKI") . '</span></a></li>';
         $res .= "</ul>\n";
         $res .= "</div>\n";
         // table-container-below
         require_once _base_ . '/lib/lib.dialog.php';
         setupHrefDialogBox('a[href*=delwiki]');
     }
     return $res;
 }
示例#23
0
 function show()
 {
     global $page, $db, $fs, $proj, $user;
     $page->setTitle($fs->prefs['page_title'] . L('roadmap'));
     // Get milestones
     $list_id = $db->x->GetOne('SELECT list_id FROM {fields} WHERE field_id = ?', null, $proj->prefs['roadmap_field']);
     $milestones = array();
     if ($list_id) {
         $milestones = $db->x->getAll('SELECT list_item_id AS version_id, item_name AS version_name
                                         FROM {list_items} li
                                        WHERE list_id = ? AND version_tense = 3
                                     ORDER BY list_position ASC', null, $list_id);
     }
     $data = array();
     foreach ($milestones as $row) {
         // Get all tasks related to a milestone
         $all_tasks = $db->x->getAll('SELECT  percent_complete, is_closed, t.*
                                    FROM  {tasks} t
                               LEFT JOIN  {field_values} fv ON (fv.task_id = t.task_id AND field_id = ?)
                                   WHERE  field_value = ? AND project_id = ?', null, array($proj->prefs['roadmap_field'], $row['version_id'], $proj->id));
         $all_tasks = array_filter($all_tasks, array($user, 'can_view_task'));
         $percent_complete = 0;
         foreach ($all_tasks as $task) {
             if ($task['is_closed']) {
                 $percent_complete += 100;
             } else {
                 $percent_complete += $task['percent_complete'];
             }
         }
         $percent_complete = round($percent_complete / max(count($all_tasks), 1));
         if (count($all_tasks)) {
             $tasks = $db->x->getAll('SELECT t.task_id, item_summary, detailed_desc, mark_private, fs.field_value AS field' . $fs->prefs['color_field'] . ',
                                           opened_by, content, task_token, t.project_id, prefix_id
                                    FROM {tasks} t
                               LEFT JOIN {cache} ca ON (t.task_id = ca.topic AND ca.type = ? AND t.last_edited_time <= ca.last_updated)
                               LEFT JOIN {field_values} f ON f.task_id = t.task_id
                               LEFT JOIN {field_values} fs ON (fs.task_id = t.task_id AND fs.field_id = ?)
                                   WHERE f.field_value = ? AND f.field_id = ? AND t.project_id = ? AND is_closed = 0', null, array('rota', $fs->prefs['color_field'], $row['version_id'], $proj->prefs['roadmap_field'], $proj->id));
             $count = count($tasks);
             for ($i = 0; $i < $count; $i++) {
                 if (!$user->can_view_task($tasks[$i])) {
                     unset($tasks[$i]);
                 }
             }
         }
         $data[] = array('id' => $row['version_id'], 'open_tasks' => isset($tasks) ? $tasks : array(), 'percent_complete' => $percent_complete, 'all_tasks' => $all_tasks ? $all_tasks : array(), 'name' => $row['version_name']);
         unset($tasks);
     }
     if (Get::val('txt')) {
         $page = new FSTpl();
         header('Content-Type: text/plain; charset=UTF-8');
         $page->assign('data', $data);
         $page->display('roadmap.text.tpl');
         exit;
     } else {
         $page->assign('data', $data);
         $page->pushTpl('roadmap.tpl');
     }
 }
示例#24
0
    function notes()
    {
        checkPerm('view');
        require_once _base_ . '/lib/lib.table.php';
        $lang =& DoceboLanguage::createInstance('notes', 'lms');
        $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
        $ini = $nav_bar->getSelectedElement();
        $ord = importVar('ord');
        $inv = importVar('inv');
        switch ($ord) {
            case "tit":
                $ord = $order = 'title';
                if ($inv != 'y') {
                    $a_down = '&amp;inv=y';
                } else {
                    $order .= ' DESC';
                    $a_down = '';
                }
                break;
            default:
                $ord = $order = 'data';
                if ($inv == 'y') {
                    $a_down = '';
                } else {
                    $order .= ' DESC';
                    $a_down = '&amp;inv=y';
                }
        }
        $reNotes = sql_query("\r\n\tSELECT idNotes, data, title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' \r\n\tORDER BY {$order} \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
        list($num_notes) = sql_fetch_row(sql_query("SELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' "));
        $nav_bar->setElementTotal($num_notes);
        $img_up = '<img class="valing-middle" src="' . getPathImage() . 'standard/up_arrow.png" alt="' . $lang->def('_UP') . '"/>';
        $img_down = '<img class="valing-middle" src="' . getPathImage() . 'standard/down_arrow.png" alt="' . $lang->def('_DOWN') . '"/>';
        $tb = new Table(Get::sett('visuItem'), $lang->def('_NOTES'), $lang->def('_NOTES'));
        $contentH = array(($ord == 'data' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&amp;op=notes' . $a_down . '"> ' . $lang->def('_DATE') . '</a>', ($ord == 'title' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&amp;op=notes&amp;ord=tit' . $a_down . '">' . $lang->def('_TITLE') . '</a>', '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '" />');
        $typeH = array('min-cell', '', 'image', 'image');
        $tb->setColsStyle($typeH);
        $tb->addHead($contentH);
        while (list($idNotes, $data, $title) = sql_fetch_row($reNotes)) {
            $content = array(Format::date($data), '<a href="index.php?modname=notes&amp;op=displaynotes&amp;idNotes=' . $idNotes . '" title="' . $lang->def('_MORET') . '">' . $title . '</a>', '<a href="index.php?modname=notes&amp;op=modnotes&amp;idNotes=' . $idNotes . '">
				<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" /></a>', '<a id="delnotes_' . $idNotes . '"' . ' href="index.php?modname=notes&amp;op=delnotes&amp;idNotes=' . $idNotes . '"' . ' title="' . $lang->def('_TITLE') . ' : ' . strip_tags(str_replace(array('"', "'"), '', $title)) . '">
				<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
            $tb->addBody($content);
        }
        $tb->addActionAdd('<a href="index.php?modname=notes&amp;op=addnotes">' . '<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD_NOTES') . '</a>');
        $GLOBALS['page']->add(getTitleArea(array($lang->def('_NOTES')), 'notes') . '<div class="std_block">', 'content');
        if (isset($_POST['result'])) {
            switch ($_POST['result']) {
                case "ok":
                    $GLOBALS['page']->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')), 'content');
                case "err":
                    $GLOBALS['page']->add(getErrorUi($lang->def('_OPERATION_FAILURE')), 'content');
            }
        }
        $GLOBALS['page']->add($tb->getTable() . $nav_bar->getNavBar($ini), 'content');
        require_once _base_ . '/lib/lib.dialog.php';
        setupHrefDialogBox('a[href*=delnotes]');
        $GLOBALS['page']->add('</div>', 'content');
    }
 static function render($text, $type = null, $id = null, $instructions = null)
 {
     global $conf, $baseurl, $db;
     // Unfortunately dokuwiki also uses $conf
     $fs_conf = $conf;
     $conf = array();
     // Dokuwiki generates some notices
     error_reporting(E_ALL ^ E_NOTICE);
     if (!$instructions) {
         include_once BASEDIR . '/plugins/dokuwiki/inc/parser/parser.php';
     }
     require_once BASEDIR . '/plugins/dokuwiki/inc/common.php';
     require_once BASEDIR . '/plugins/dokuwiki/inc/parser/xhtml.php';
     // Create a renderer
     $Renderer = new Doku_Renderer_XHTML();
     if (!is_string($instructions) || strlen($instructions) < 1) {
         $modes = p_get_parsermodes();
         $Parser = new Doku_Parser();
         // Add the Handler
         $Parser->Handler = new Doku_Handler();
         // Add modes to parser
         foreach ($modes as $mode) {
             $Parser->addMode($mode['mode'], $mode['obj']);
         }
         $instructions = $Parser->parse($text);
         // Cache the parsed text
         if (!is_null($type) && !is_null($id)) {
             $fields = array('content' => serialize($instructions), 'type' => $type, 'topic' => $id, 'last_updated' => time());
             $keys = array('type', 'topic');
             //autoquote is always true on db class
             $db->Replace('{cache}', $fields, $keys);
         }
     } else {
         $instructions = unserialize($instructions);
     }
     $Renderer->smileys = getSmileys();
     $Renderer->entities = getEntities();
     $Renderer->acronyms = getAcronyms();
     $Renderer->interwiki = getInterwiki();
     $conf = $fs_conf;
     $conf['cachedir'] = FS_CACHE_DIR;
     // for dokuwiki
     $conf['fperm'] = 0600;
     $conf['dperm'] = 0700;
     // Loop through the instructions
     foreach ($instructions as $instruction) {
         // Execute the callback against the Renderer
         call_user_func_array(array(&$Renderer, $instruction[0]), $instruction[1]);
     }
     $return = $Renderer->doc;
     // Display the output
     if (Get::val('histring')) {
         $words = explode(' ', Get::val('histring'));
         foreach ($words as $word) {
             $return = html_hilight($return, $word);
         }
     }
     return $return;
 }
示例#26
0
 function RoomPermissions($room_id, $module, $prefix = FALSE, $dbconn = NULL)
 {
     $this->prefix = $prefix !== FALSE ? $prefix : $GLOBALS["prefix_scs"];
     $this->dbconn = $dbconn;
     $this->platform = Get::cur_plat();
     $this->room_id = (int) $room_id;
     $this->module = $module;
 }
示例#27
0
 function loadBody()
 {
     if (file_exists(_base_ . '/customscripts/' . _folder_lms_ . '/admin/modules/' . $this->module_name . '/' . $this->module_name . '.php') && Get::cfg('enable_customscripts', false) == true) {
         require_once _base_ . '/customscripts/' . _folder_lms_ . '/admin/modules/' . $this->module_name . '/' . $this->module_name . '.php';
     } else {
         require_once _base_ . '/' . _folder_lms_ . '/admin/modules/' . $this->module_name . '/' . $this->module_name . '.php';
     }
     reportDispatch($GLOBALS['op']);
 }
 public function init()
 {
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     //$js_path = Get::rel_path('base').'/widget/competenceselector/';
     //Util::get_js($js_path.'competenceselector.js', true, true);
 }
示例#29
0
function loginDispatch($op)
{
    switch ($op) {
        case "login":
            Util::jump_to(Get::rel_path('base') . '/index.php?modname=login&amp;op=login');
            //login();
            break;
    }
}
示例#30
0
function getFbRegisterBox()
{
    $res = '';
    $lang =& DoceboLanguage::createInstance('login', 'cms');
    $res = '<div class="container-feedback"><span class="ico-sprite fd_info"><span></span></span>
		<b>' . $lang->def('_REGISTER_WITH_FACEBOOK') . '</b>:
		<a href="index.php?modname=login&amp;op=reg_with_fb">' . Get::img('social/bt_fConnect.png', $lang->def('_REGISTER_WITH_FACEBOOK')) . '</a></div>';
    return $res;
}