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


PHP Get::req方法代码示例

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


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

示例1: loadBody

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

示例2: mod

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

示例3: showTask

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

示例4: init

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

示例5: 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&op=tags&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

示例6: delete_message

 public function delete_message()
 {
     $success = false;
     $id = Get::req('id', DOTY_INT, -1);
     if ($id > 0) {
         $success = $this->model->deleteMessage($id);
     }
     $output = array('success' => $success);
     echo $this->json->encode($output);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:MessageLmsController.php

示例7: del

 public function del()
 {
     //Course info
     $id_course = Get::req('id_course', DOTY_INT, 0);
     $id_edition = Get::req('id_edition', DOTY_INT, 0);
     $model = new EditionLms($id_course, $id_edition);
     $res = array('success' => $model->delEdition());
     $this->data = $this->json->encode($res);
     echo $this->data;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:EditionLmsController.php

示例8: editTask

 public function editTask()
 {
     YuiLib::load('colorpicker');
     $id = Get::req('id', DOTY_INT, -1);
     if ($id > 0) {
         $params = array('id' => $id, 'data' => $this->model->getTemplateData($id));
     } else {
         $params = array('error' => Lang::t('_INVALID_TEMPLATE', 'template'));
     }
     $this->render("edit", $params);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:11,代码来源:TemplatelayoutAdmController.php

示例9: set

 /**
  * Set the new fields and policy acceptance, than jump to the proper page
  */
 public function set()
 {
     $id_user = Docebo::user()->getIdst();
     require_once _adm_ . '/lib/lib.field.php';
     $fl = new FieldList();
     $fl->storeFieldsForUser($id_user);
     $accept_policy = Get::req('accept_policy', DOTY_INT, 0) > 0;
     $this->model->setAcceptingPolicy($id_user, $accept_policy);
     $policy_checked = $this->model->getAcceptingPolicy($id_user);
     $fields_checked = $fl->checkUserMandatoryFields($id_user);
     if ($fields_checked && $policy_checked) {
         //send alert
         Util::jump_to($this->jump_url);
     } else {
         //send alert
         Util::jump_to('index.php?r=precompile/show&res=err');
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:21,代码来源:PrecompileLmsController.php

示例10: getNextStep

 public function getNextStep($current_step)
 {
     $version = Get::req('start_version', DOTY_ALPHANUM, '3603');
     if (version_compare($version, '3600', '>=') && version_compare($version, '4000', '<')) {
         //docebo ce v 3.x.x => go to step 3 (config upgrade )
         $next_step = $current_step + 1;
     } else {
         if (version_compare($version, '4000', '>=') && version_compare($version, '5000', '<')) {
             //docebo ce v 4.x.x => go to step 3 (config upgrade )
             $next_step = $current_step + 1;
         } else {
             // forma v1.x => skip step 3 and 4 (config upgrade, db upgrade from 3 to 4)
             $next_step = $current_step + 1;
             // upgrade config via plugin
         }
     }
     return $next_step;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:18,代码来源:Step2Controller.php

示例11: _profileBackUrl

 protected function _profileBackUrl()
 {
     $id_user = Get::req('id_user', DOTY_INT, 0);
     $type = Get::req('type', DOTY_STRING, 'false');
     $from = Get::req('from', DOTY_INT, 0);
     $back_my_friend = Get::req('back', DOTY_INT, 0);
     if ($type !== 'false') {
         if ($from == 0) {
             return getBackUi('index.php?modname=profile&op=profile&id_user=' . $id_user . '&ap=goprofile', Lang::t('_BACK', 'standard'));
         } else {
             return getBackUi('index.php?modname=myfiles&op=myfiles&working_area=' . $type, Lang::t('_BACK', 'standard'));
         }
     }
     if ($back_my_friend) {
         return getBackUi('index.php?modname=myfriends&op=myfriends', Lang::t('_BACK', 'standard'));
     }
     return false;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:18,代码来源:ProfileLmsController.php

示例12: showTask

 public function showTask()
 {
     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());
         }
     }
     require_once _lms_ . '/lib/lib.middlearea.php';
     $ma = new Man_MiddleArea();
     $this->render('pluginslist', array('pluginslist' => $pluginslist));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:43,代码来源:PluginsLmsController.php

示例13: dontReplaceBaseUrl

function dontReplaceBaseUrl($field_name, $req_admin = TRUE)
{
    $res = FALSE;
    if (Docebo::user()->isAnonymous()) {
        return $res;
    }
    $level_id = Docebo::user()->getUserLevelId();
    if ($req_admin && $level_id != ADMIN_GROUP_GODADMIN && $level_id != ADMIN_GROUP_ADMIN) {
        return $res;
    }
    $platform = Get::cur_plat();
    $modname = Get::req('modname', DOTY_ALPHANUM, "");
    $op = Get::req('op', DOTY_ALPHANUM, "");
    $res = false;
    if (isset($GLOBALS['clean_url'][$platform . _sep_ . $modname . _sep_ . $op . _sep_ . $field_name])) {
        $res = TRUE;
    }
    return $res;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:19,代码来源:lib.donotdo.php

示例14: init

 public function init()
 {
     checkPerm('subscribe', false, 'pcourse', 'lms');
     require_once _base_ . '/lib/lib.json.php';
     //Course info
     $this->id_course = Get::req('id_course', DOTY_INT, 0);
     $this->id_edition = Get::req('id_edition', DOTY_INT, 0);
     $this->id_date = Get::req('id_date', DOTY_INT, 0);
     $this->model = new SubscriptionAlms($this->id_course, $this->id_edition, $this->id_date);
     $this->json = new Services_JSON();
     $this->acl_man = Docebo::user()->getAclManager();
     $this->db = DbConn::getInstance();
     $this->permissions = array('subscribe_course' => checkPerm('subscribe', true, 'pcourse', 'lms'), 'subscribe_coursepath' => false, 'moderate' => checkPerm('moderate', true, 'pcourse'));
     $this->link = 'lms/psubscription';
     $this->link_course = 'lms/pcourse';
     $this->link_edition = 'lms/pedition';
     $this->link_classroom = 'lms/pclassroom';
     $this->_mvc_name = 'subscription';
     $this->checkAdminLimit();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:20,代码来源:PsubscriptionLmsController.php

示例15: gettabledataTask

 function gettabledataTask()
 {
     //read from input and prepare filter and pagination variables
     $id_category = Get::req('id_category', DOTY_INT, 0);
     $descendants = Get::req('descendants', DOTY_INT, 0) > 0 ? true : false;
     $startIndex = Get::req('startIndex', DOTY_INT, 0);
     $results = Get::req('results', DOTY_INT, Get::sett('visuItem', 25));
     $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);
     //get total from database and validate the results count
     $total = $this->competences_model->getCompetencesTotal($id_category, $descendants, $searchFilter);
     if ($startIndex >= $total) {
         if ($total < $results) {
             $startIndex = 0;
         } else {
             $startIndex = $total - $results;
         }
     }
     //set pagination argument
     $pagination = array('startIndex' => $startIndex, 'results' => $results, 'sort' => $sort, 'dir' => $dir);
     //read records from database
     $list = $this->competences_model->getCompetencesList($id_category, $descendants, $pagination, $searchFilter);
     //prepare the data for sending
     $output_results = array();
     if (is_array($list) && count($list) > 0) {
         foreach ($list as $idst => $record) {
             //format description field
             $description = strip_tags($record->description);
             if (strlen($description) > 200) {
                 $description = substr($description, 0, 197) . '...';
             }
             //prepare output record
             $output_results[] = array('id' => $record->id_competence, 'name' => Layout::highlight($record->name, $filter_text), 'description' => Layout::highlight($description, $filter_text), 'typology' => $record->typology, 'type' => $record->type);
         }
     }
     $output = array('totalRecords' => $total, 'startIndex' => $startIndex, 'sort' => $sort, 'dir' => $dir, 'rowsPerPage' => $rowsPerPage, 'results' => count($list), 'records' => $output_results);
     echo $this->json->encode($output);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:41,代码来源:CompetenceselectorWidgetController.php


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