当前位置: 首页>>代码示例>>PHP>>正文


PHP Get::sett方法代码示例

本文整理汇总了PHP中Get::sett方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::sett方法的具体用法?PHP Get::sett怎么用?PHP Get::sett使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Get的用法示例。


在下文中一共展示了Get::sett方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadMenu

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;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:25,代码来源:menu_login.php

示例2: tagslist

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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:tags.php

示例3: gettabledataTask

 /**
  * extract the data to load into policiess table
  */
 public function gettabledataTask()
 {
     $startIndex = Get::req('startIndex', DOTY_INT, 0);
     $results = Get::req('results', DOTY_INT, Get::sett('visuItem'));
     $rowsPerPage = Get::req('rowsPerPage', DOTY_INT, $results);
     $sort = Get::req('sort', DOTY_STRING, "");
     $dir = Get::req('dir', DOTY_STRING, "asc");
     $filter = Get::req('filter', DOTY_STRING, "");
     //get total from database and validate the results count
     $total = $this->model->getPoliciesTotal($filter);
     if ($startIndex >= $total) {
         if ($total < $results) {
             $startIndex = 0;
         } else {
             $startIndex = $total - $results;
         }
     }
     $pagination = array('startIndex' => $startIndex, 'results' => $results, 'sort' => $sort, 'dir' => $dir);
     $list = $this->model->getPoliciesList($pagination, $filter);
     //format models' data
     $records = array();
     if (is_array($list)) {
         foreach ($list as $record) {
             $records[] = array('id' => (int) $record->id_policy, 'name' => highlightText($record->name, $filter), 'is_assigned' => $record->is_assigned, 'mod' => 'ajax.adm_server.php?r=adm/privacypolicy/mod&id=' . (int) $record->id_policy, 'del' => 'ajax.adm_server.php?r=adm/privacypolicy/del&id=' . (int) $record->id_policy);
         }
     }
     if (is_array($records)) {
         $output = array('startIndex' => $startIndex, 'recordsReturned' => count($records), 'sort' => $sort, 'dir' => $dir, 'totalRecords' => $total, 'pageSize' => $rowsPerPage, 'records' => $records);
     } else {
         $output['success'] = false;
     }
     echo $this->json->encode($output);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:36,代码来源:PrivacypolicyAdmController.php

示例4: modglossarygui

 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('&', '&amp;', $object_glos->back_url) . '&amp;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');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:28,代码来源:glossary.php

示例5: _resolveOrder

 /**
  * 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);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:43,代码来源:ElearningLms.php

示例6: gethistorydata

 public function gethistorydata()
 {
     $start_index = Get::req('startIndex', DOTY_INT, 0);
     $results = Get::req('results', DOTY_MIXED, Get::sett('visuItem', 25));
     $sort = Get::req('sort', DOTY_MIXED, 'title');
     $dir = Get::req('dir', DOTY_MIXED, 'asc');
     $model = new CommunicationAlms();
     $communications = $model->findAllReaded(0, 0, 'publish_date', 'DESC', Docebo::user()->getId(), array('viewer' => Docebo::user()->getArrSt()));
     while (list($id, $comm) = each($communications)) {
         //$communications[$id]['publish_date'] = Format::dateDistance($comm['publish_date']);
         switch ($comm['type_of']) {
             case "none":
                 $communications[$id]['play'] = '<a class="ico-wt-sprite subs_unread" href="index.php?r=communication/play&amp;id_comm=' . $comm['id_comm'] . '"><span>' . Lang::t('_MARK_AS_READ', 'communication') . '</span></a>';
                 break;
             case "file":
                 $communications[$id]['play'] = '<a class="ico-wt-sprite subs_download" href="index.php?r=communication/play&amp;id_comm=' . $comm['id_comm'] . '"><span>' . Lang::t('_DOWNLOAD', 'communication') . '</span></a>';
                 break;
             case "scorm":
                 $communications[$id]['play'] = '<a class="ico-wt-sprite subs_play" rel="lightbox" href="index.php?r=communication/play&amp;id_comm=' . $comm['id_comm'] . '" title="' . $comm['title'] . '"><span>' . Lang::t('_PLAY', 'communication') . '</span></a>';
                 break;
         }
     }
     $result = array('totalRecords' => count($communications), 'startIndex' => $start_index, 'sort' => $sort, 'dir' => $dir, 'rowsPerPage' => $results, 'results' => count($communications), 'records' => $communications);
     $this->data = $this->json->encode($result);
     echo $this->data;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:CommunicationLmsController.php

示例7: getLabelsTask

 public function getLabelsTask()
 {
     $start_index = Get::req('startIndex', DOTY_INT, 0);
     $results = Get::req('results', DOTY_MIXED, Get::sett('visuItem', 25));
     $sort = Get::req('sort', DOTY_MIXED, 'title');
     $dir = Get::req('dir', DOTY_MIXED, 'asc');
     $labels = $this->model->getLabels($start_index, $results, $sort, $dir);
     $total_label = $this->model->getTotalLabelsCount();
     $list = array();
     $first = true;
     $count = count($labels);
     $counter = 0;
     foreach ($labels as $value) {
         $position = "";
         if ($first) {
             $position .= 'first';
             $first = false;
         }
         $counter++;
         if ($counter == $count) {
             $position .= 'last';
         }
         $list[] = array('id_common_label' => $value[LABEL_ID_COMMON], 'title' => $value[LABEL_TITLE], 'description' => $this->_formatDescription($value[LABEL_DESCRIPTION], 100), 'position' => $position, 'sequence' => $value[LABEL_SEQUENCE], 'mod' => '<a href="index.php?r=alms/label/mod&amp;id_common_label=' . $value[LABEL_ID_COMMON] . '" title="' . Lang::t('_MOD', 'label') . '">' . Get::img('standard/edit.png', Lang::t('_MOD', 'label')) . '</a>', 'del' => 'ajax.adm_server.php?r=alms/label/dellabel&id_common_label=' . $value[LABEL_ID_COMMON]);
     }
     $result = array('totalRecords' => $total_label, 'startIndex' => $start_index, 'sort' => $sort, 'dir' => $dir, 'rowsPerPage' => $results, 'results' => count($list), 'records' => $list);
     echo $this->json->encode($result);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:LabelAlmsController.php

示例8: getBoxContent

 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;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:30,代码来源:class.dashboard_framework.php

示例9: gettimeperiodslistTask

 public function gettimeperiodslistTask()
 {
     //read input data (table parameters and filter)
     $startIndex = Get::req('startIndex', DOTY_INT, 0);
     $results = Get::req('results', DOTY_INT, Get::sett('visuItem'));
     $rowsPerPage = Get::req('rowsPerPage', DOTY_INT, $results);
     $sort = Get::req('sort', DOTY_STRING, "");
     $dir = Get::req('dir', DOTY_STRING, "asc");
     $filter_text = Get::req('filter_text', DOTY_STRING, '');
     $searchFilter = array('text' => $filter_text);
     //calculate total records to display
     $total = $this->model->getTimePeriodsTotal($searchFilter);
     if ($startIndex >= $total) {
         if ($total < $results) {
             $startIndex = 0;
         } else {
             $startIndex = $total - $results;
         }
     }
     //get records from DB and format data
     $list = $this->model->getTimePeriodsList($startIndex, $results, $sort, $dir, $searchFilter);
     $output_records = array();
     if (is_array($list) && count($list) > 0) {
         foreach ($list as $record) {
             $output_records[] = array('id' => (int) $record->id_period, 'title' => Layout::highlight($record->title, $filter_text), 'label' => Layout::highlight($record->label, $filter_text), 'start_date' => Format::date($record->start_date, "date"), 'end_date' => Format::date($record->end_date, "date"), 'mod' => 'ajax.adm_server.php?r=alms/timeperiods/mod&id=' . (int) $record->id_period, 'del' => 'ajax.adm_server.php?r=alms/timeperiods/del&id=' . (int) $record->id_period);
         }
     }
     //prepare the output for the datatable
     $output = array('totalRecords' => $total, 'startIndex' => $startIndex, 'sort' => $sort, 'dir' => $dir, 'rowsPerPage' => $rowsPerPage, 'results' => count($output_records), 'records' => $output_records);
     echo $this->json->encode($output);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:TimeperiodsAlmsController.php

示例10: notes

    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');
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:59,代码来源:notes.php

示例11: _query

 function _query($query)
 {
     $re = sql_query($query);
     if (Get::sett('do_debug') == 'on' && isset($GLOBALS['page'])) {
         $GLOBALS['page']->add('<!-- ' . $query . ' :: ' . mysql_error() . ' -->', 'debug');
     }
     return $re;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:lib.quest_bank.php

示例12: getlist

    public function getlist()
    {
        $id_category = Get::req('id_category', DOTY_INT, 0);
        $show_descendants = Get::req('descendants', DOTY_INT, 0) > 0;
        $start_index = Get::req('startIndex', DOTY_INT, 0);
        $results = Get::req('results', DOTY_MIXED, Get::sett('visuItem', 25));
        $sort = Get::req('sort', DOTY_MIXED, 'title');
        $dir = Get::req('dir', DOTY_MIXED, 'asc');
        $filter_text = Get::req('filter_text', DOTY_STRING, "");
        $filter = array('text' => $filter_text);
        $total_comm = $this->model->total($filter, $id_category, $show_descendants);
        $array_comm = $this->model->findAll($start_index, $results, $sort, $dir, $filter, $id_category, $show_descendants);
        $comm_id_arr = array();
        foreach ($array_comm as $key => $value) {
            $type = $array_comm[$key]['type_of'];
            if ($type == 'file') {
                $comm_id_arr[] = $value['id_comm'];
            }
        }
        require_once _lms_ . '/lib/lib.kbres.php';
        $kbres = new KbRes();
        $categorized_file_items = $kbres->getCategorizedResources($comm_id_arr, "file", "communication", true);
        $categorized_file_items_id = !empty($categorized_file_items) ? array_keys($categorized_file_items) : array();
        $list = array();
        foreach ($array_comm as $key => $value) {
            $array_comm[$key]['id'] = $value['id_comm'];
            if ($filter_text) {
                $array_comm[$key]['title'] = highlightText($value['title'], $filter_text);
                $array_comm[$key]['description'] = highlightText($value['description'], $filter_text);
            }
            $array_comm[$key]['publish_date'] = Format::date($value['publish_date'], 'date');
            $type = $array_comm[$key]['type_of'];
            if ($type == 'file' || $type == 'scorm') {
                if ($type == 'scorm' || in_array($value['id_comm'], $categorized_file_items_id)) {
                    $array_comm[$key]['categorize'] = '<a class="ico-sprite subs_categorize" title="' . Lang::t('_CATEGORIZE', 'kb') . '"
						href="index.php?r=alms/communication/categorize&id_comm=' . $value['id_comm'] . '"><span>' . Lang::t('_CATEGORIZE', 'kb') . '</span></a>';
                } else {
                    $array_comm[$key]['categorize'] = '<a class="ico-sprite fd_notice" title="' . Lang::t('_NOT_CATEGORIZED', 'kb') . '"
						href="index.php?r=alms/communication/categorize&id_comm=' . $value['id_comm'] . '"><span>' . Lang::t('_NOT_CATEGORIZED', 'kb') . '</span></a>';
                }
            } else {
                $array_comm[$key]['categorize'] = '';
            }
            if ($value['access_entity']) {
                $array_comm[$key]['user'] = '<a class="ico-sprite subs_user" title="' . Lang::t('_ASSIGN_USERS', 'communication') . '"
					href="index.php?r=alms/communication/mod_user&id_comm=' . $value['id_comm'] . '&load=1"><span>' . Lang::t('_ASSIGN_USERS', 'communication') . '</span></a>';
            } else {
                $array_comm[$key]['user'] = '<a class="ico-sprite fd_notice" title="' . Lang::t('_NO_USER_SELECTED', 'communication') . '"
					href="index.php?r=alms/communication/mod_user&id_comm=' . $value['id_comm'] . '&load=1"><span>' . Lang::t('_ASSIGN_USERS', 'communication') . '</span></a>';
            }
            $array_comm[$key]['edit'] = '<a class="ico-sprite subs_mod" href="index.php?r=alms/communication/edit&id_comm=' . $value['id_comm'] . '"><span>' . Lang::t('_MOD', 'communication') . '</span></a>';
            $array_comm[$key]['del'] = 'ajax.adm_server.php?r=alms/communication/del&id_comm=' . $value['id_comm'];
        }
        $result = array('totalRecords' => $total_comm, 'startIndex' => $start_index, 'sort' => $sort, 'dir' => $dir, 'rowsPerPage' => $results, 'results' => count($array_comm), 'records' => $array_comm);
        $this->data = $this->json->encode($result);
        echo $this->data;
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:57,代码来源:CommunicationAlmsController.php

示例13: regional_settings

function regional_settings()
{
    checkPerm('view');
    /*funAdminAccess('lang','OP');
    	$newPerm = funAdminAccess('addlang', 'NEW', true);
    	$modPerm = funAdminAccess('modlang', 'MOD', true);
    	$remPerm = funAdminAccess('dellang', 'REM', true);*/
    $write_perm = true;
    $mod_perm = true;
    $rem_perm = true;
    require_once _base_ . "/lib/lib.table.php";
    $out =& $GLOBALS['page'];
    $lang =& DoceboLanguage::createInstance('admin_regset', 'framework');
    $regset = new RegionalSettingsManager();
    $out->setWorkingZone("content");
    $out->add(getTitleArea($lang->def("_REGIONAL_SETTINGS"), "regset"));
    $out->add("<div class=\"std_block\">\n");
    $ini = importVar("ini", true, 0);
    $arr = $regset->getAllRegions();
    $table = new Table(Get::sett('visuItem'));
    $out->add($table->OpenTable(""));
    $head = array($lang->def("_REGION_CODE"), $lang->def("_DESCRIPTION"), '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def("_MOD") . '" title="' . $lang->def("_MOD") . '" />', '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def("_DEL") . '" title="' . $lang->def("_DEL") . '" />');
    $head_type = array('', '', 'img', 'img');
    $out->add($table->WriteHeader($head, $head_type));
    $tot = count($arr) < $ini + Get::sett('visuItem') ? count($arr) : $ini + Get::sett('visuItem');
    for ($i = $ini; $i < $tot; $i++) {
        $rowcnt = array();
        $rowcnt[] = $arr[$i];
        $rowcnt[] = $regset->getRegionInfo($arr[$i], "description");
        if ($mod_perm) {
            $btn = "<a href=\"index.php?modname=regional_settings&amp;op=editregion&amp;id=" . $arr[$i] . "\">";
            $btn .= "<img src=\"" . getPathImage() . "standard/edit.png\" ";
            $btn .= "alt=\"" . $lang->def("_MOD") . "\" title=\"" . $lang->def("_MOD") . " " . $arr[$i] . "\" />";
            $btn .= "</a>\n";
            $rowcnt[] = $btn;
        } else {
            $rowcnt[] = "&nbsp;";
        }
        if ($rem_perm && !$regset->getRegionInfo($arr[$i], "default")) {
            $btn = "<a href=\"\">";
            $btn .= "<img src=\"" . getPathImage() . "standard/delete.png\" ";
            $btn .= "alt=\"" . $lang->def("_DEL") . "\" title=\"" . $lang->def("_DEL") . " " . $arr[$i] . "\" />";
            $btn .= "</a>\n";
            $rowcnt[] = $btn;
        } else {
            $rowcnt[] = "&nbsp;";
        }
        $out->add($table->writeRow($rowcnt));
    }
    if ($write_perm) {
        $out->add($table->WriteAddRow('<a href="index.php?modname=regional_settings&amp;op=addregion">
		 <img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD') . '</a>'));
    }
    $out->add($table->CloseTable());
    $out->add($table->WriteNavBar('', 'index.php?modname=regional_settings&amp;op=regset&amp;ini=', $ini, count($arr)));
    $out->add("</div>\n");
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:57,代码来源:regional_settings.php

示例14: compileRequired

 public function compileRequired()
 {
     $check_privacy_policy = Get::sett('request_mandatory_fields_compilation', 'off') != 'off';
     $id_user = Docebo::user()->getIdSt();
     $policy_checked = $this->getAcceptingPolicy($id_user);
     require_once _adm_ . '/lib/lib.field.php';
     $fieldlist = new FieldList();
     $fields_checked = $fieldlist->checkUserMandatoryFields($id_user);
     return !$policy_checked && $check_privacy_policy || !$fields_checked;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:PrecompileLms.php

示例15: show

 public function show()
 {
     $model = new ClassroomLms();
     if (Get::sett('on_usercourse_empty') === 'on') {
         $conditions_t = array('cu.iduser = :id_user');
         $params_t = array(':id_user' => (int) Docebo::user()->getId());
         $cp_courses = $model->getUserCoursePathCourses(Docebo::user()->getIdst());
         if (!empty($cp_courses)) {
             $conditions_t[] = "cu.idCourse NOT IN (" . implode(",", $cp_courses) . ")";
         }
         $courselist_t = $model->findAll($conditions_t, $params_t);
         if (empty($courselist_t)) {
             Util::jump_to('index.php?r=lms/catalog/show&sop=unregistercourse');
         }
     }
     require_once _lms_ . '/lib/lib.middlearea.php';
     $ma = new Man_MiddleArea();
     $block_list = array();
     if ($ma->currentCanAccessObj('user_details_short')) {
         $block_list['user_details_short'] = true;
     }
     if ($ma->currentCanAccessObj('user_details_full')) {
         $block_list['user_details_full'] = true;
     }
     if ($ma->currentCanAccessObj('credits')) {
         $block_list['credits'] = true;
     }
     if ($ma->currentCanAccessObj('news')) {
         $block_list['news'] = true;
     }
     $tb_label = $ma->currentCanAccessObj('tb_label');
     if (!$tb_label) {
         $_SESSION['id_common_label'] = 0;
     } else {
         $id_common_label = Get::req('id_common_label', DOTY_INT, -1);
         if ($id_common_label >= 0) {
             $_SESSION['id_common_label'] = $id_common_label;
         } elseif ($id_common_label == -2) {
             $_SESSION['id_common_label'] = -1;
         }
         $block_list['labels'] = true;
     }
     if ($tb_label && $_SESSION['id_common_label'] == -1) {
         require_once _lms_ . '/admin/models/LabelAlms.php';
         $label_model = new LabelAlms();
         $user_label = $label_model->getLabelForUser(Docebo::user()->getId());
         $this->render('_labels', array('block_list' => $block_list, 'label' => $user_label));
     } else {
         if (!empty($block_list)) {
             $this->render('_tabs_block', array('block_list' => $block_list));
         } else {
             $this->render('_tabs', array());
         }
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:55,代码来源:ClassroomLmsController.php


注:本文中的Get::sett方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。