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


PHP JRequest::setVar方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     global $mainframe, $option;
     $cid = JRequest::getVar('cid_user');
     if (!is_array($cid)) {
         $mainframe->redirect('index.php?option=' . $option);
         return;
     }
     $user_id = $cid[0];
     $model = $this->getModel('user');
     $model->load($user_id);
     $this->_setToolBar();
     $say = JText::sprintf('USER_RESOURCES_TITLE', $model->user->username);
     $root_node = JText::_('RESOURCES_TREE_ROOT_NODE');
     $nowdate = JFactory::getDate();
     $str_now = JHTML::_('date', $nowdate->toMySQL(), '%Y-%m-%d %H:%M:%S');
     $this->assign('nowdate', $str_now);
     $this->assign('say', $say);
     $this->assign('root_node', $root_node);
     $this->assignRef('uid', $user_id);
     $this->assignRef('option', $option);
     //hide the menu
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
开发者ID:laiello,项目名称:yrm,代码行数:25,代码来源:view.resources.php

示例2: saveForm

 function saveForm()
 {
     $rule = new stdClass();
     $rule->ruleid = acymailing_getCID('ruleid');
     if (empty($rule->ruleid)) {
         $this->database->setQuery('SELECT max(ordering) FROM `#__acymailing_rules`');
         $rule->ordering = intval($this->database->loadResult()) + 1;
     }
     $rule->executed_on = '';
     $rule->action_message = '';
     $rule->action_user = '';
     $formData = JRequest::getVar('data', array(), '', 'array');
     foreach ($formData['rule'] as $column => $value) {
         acymailing_secureField($column);
         if (is_array($value)) {
             $rule->{$column} = serialize($value);
         } else {
             $rule->{$column} = strip_tags($value);
         }
     }
     $ruleid = $this->save($rule);
     if (!$ruleid) {
         return false;
     }
     JRequest::setVar('ruleid', $ruleid);
     return true;
 }
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:27,代码来源:rules.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = NewsfeedsHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) {
         JToolBarHelper::apply('newsfeed.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('newsfeed.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         JToolBarHelper::custom('newsfeed.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('newsfeed.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
开发者ID:akksi,项目名称:jcg,代码行数:33,代码来源:view.html.php

示例4: edit

 /**
  * display the edit form
  * @return void
  */
 function edit()
 {
     JRequest::setVar('view', 'guild');
     JRequest::setVar('layout', 'form');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
开发者ID:dnaoverride,项目名称:RaidPlanner,代码行数:11,代码来源:guilds.php

示例5: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = JDownloadsHelper::getActions();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     $title = $isNew ? JText::_('COM_JDOWNLOADS_LICEDIT_ADD') : JText::_('COM_JDOWNLOADS_LICEDIT_EDIT');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . $title, 'jdlicenses');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('license.apply');
         JToolBarHelper::save('license.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('license.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('license.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('license.cancel');
     } else {
         JToolBarHelper::cancel('license.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.license', true);
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:37,代码来源:view.html.php

示例6: edit

 function edit()
 {
     $title = JRequest::getVar("title", "");
     $advertiser_id = JRequest::getVar("advertiser_id", "");
     $approved = JRequest::getVar("approved", "");
     $target_url = JRequest::getVar("target_url", "");
     $image_url = JRequest::getVar("image_url", "");
     $image_content = JRequest::getVar("image_content", "");
     $ad_headline = JRequest::getVar("ad_headline", "");
     $ad_text = JRequest::getVar("ad_text", "");
     $ad_start_date = JRequest::getVar("ad_start_date", "");
     $ad_end_date = JRequest::getVar("ad_end_date", "");
     $_SESSION["title"] = $title;
     $_SESSION["advertiser_id"] = $advertiser_id;
     $_SESSION["approved"] = $approved;
     $_SESSION["target_url"] = $target_url;
     $_SESSION["image_content"] = $image_content;
     $_SESSION["ad_headline"] = $ad_headline;
     $_SESSION["ad_text"] = $ad_text;
     $_SESSION["ad_start_date"] = $ad_start_date;
     $_SESSION["ad_end_date"] = $ad_end_date;
     JRequest::setVar("hidemainmenu", 1);
     $view = $this->getView("adagencyJomsocial", "html");
     $view->setLayout("editForm");
     $view->setModel($this->_model, true);
     $adagencyConfig = $this->getModel('adagencyConfig');
     $view->setModel($adagencyConfig);
     $view->editForm();
 }
开发者ID:politik86,项目名称:test2,代码行数:29,代码来源:adagencyJomsocial.php

示例7: display

 /**
  * Return JSON encoded data for Statistic page
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $params = $app->getParams();
     jimport('joomla.environment.request');
     /* validating request */
     $guild_id = $params->get('guild_id', '0');
     $groups = $params->get('allowed_groups');
     $by_chars = $params->get('stats_by_chars', 0);
     $show_rating = $params->get('show_rating', 0);
     if ($guild_id != 0) {
         JRequest::setVar('guild_id', $guild_id, 'get', true);
     }
     if ($by_chars == 0) {
         JRequest::setVar('character_id', 0, 'get', true);
     }
     if ($show_rating != 0) {
         JRequest::setVar('show_rating', 1, 'get', true);
     }
     if (JRequest::getVar('group_id', '', 'get', 'int') != '') {
         if (!in_array(JRequest::getVar('group_id', '', 'get', 'int'), $groups)) {
             JRequest::setVar('group_id', '', 'get', true);
         }
     }
     /* load backend controller */
     JLoader::register('RaidPlannerControllerStats', JPATH_ADMINISTRATOR . '/components/com_raidplanner/controllers/stats.php');
     $tmp = new RaidPlannerControllerStats();
     $tmp->display();
 }
开发者ID:dnaoverride,项目名称:RaidPlanner,代码行数:32,代码来源:view.json.php

示例8: display

 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $model = $this->getModel();
     $total = $model->getTotalGroups();
     if ($limitstart > $total - $limit) {
         $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
         JRequest::setVar('limitstart', $limitstart);
     }
     $extraFieldGroups = $model->getGroups();
     $this->assignRef('rows', $extraFieldGroups);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png');
     JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     if (K2_JVERSION != '15') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar = JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     parent::display($tpl);
 }
开发者ID:grchis,项目名称:Site-Auto,代码行数:35,代码来源:view.html.php

示例9: getListQuery

    /**
     * Method to get a JDatabaseQuery object for retrieving the data set from a database.
     *
     * @return	object	A JDatabaseQuery object or string to retrieve the data set.
     */
    protected function getListQuery()
    {
        if (JRequest::getVar('filterStr') != '') {
            $whereStr = 'a.szulo = 0 and a.megnevezes like "%' . JRequest::getVar('filterStr') . '%"';
        } else {
            $whereStr = 'a.szulo = 0';
        }
        if (JRequest::getVar('order') != '') {
            $order = JRequest::getVar('order');
        } else {
            $order = '1';
            JRequest::setVar('order', '1');
        }
        $query = 'select a.id,
                     a.megnevezes, 
                     sum(sz.vita1 + sz.vita2) vita,
                     sum(szavazas) szavazas,
                     sum(lezart) lezart,
                     a.allapot
    from #__temakorok a
    left outer join (
       /* közvetlenül a témakörhöz tartozó szavazások
       SELECT sz2.temakor_id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart  
       FROM #__temakorok t1 
       LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id
       WHERE t1.szulo=0

       /* első szintű alketegoriákhoz tartozó szavazások */
       UNION ALL
       SELECT t2.id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart  
       FROM #__temakorok t2
       LEFT OUTER JOIN #__temakorok t1 ON t1.szulo = t2.id 
       LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id
       WHERE t2.szulo=0
       
       /* második szintű alketegoriákhoz tartozó szavazások */
       UNION ALL
       SELECT t3.id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart  
       FROM #__temakorok t3
       LEFT OUTER JOIN #__temakorok t2 ON t2.szulo = t3.id 
       LEFT OUTER JOIN #__temakorok t1 ON t1.szulo = t2.id 
       LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id
       WHERE t3.szulo=0
       
       /* harmadik szintű alketegoriákhoz tartozó szavazások */
       UNION ALL
       SELECT t4.id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart  
       FROM #__temakorok t4
       LEFT OUTER JOIN #__temakorok t3 ON t3.szulo = t4.id 
       LEFT OUTER JOIN #__temakorok t2 ON t2.szulo = t3.id 
       LEFT OUTER JOIN #__temakorok t1 ON t1.szulo = t2.id 
       LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id
       WHERE t4.szulo=0
    
    ) sz ON sz.temakor_id = a.id    
    where ' . $whereStr . '
    group by a.id, a.megnevezes  
    order by ' . $order . ',1';
        return $query;
    }
开发者ID:madcsaba,项目名称:li-de,代码行数:65,代码来源:temakoroklist_rossz.php

示例10: listing

 function listing()
 {
     JRequest::setVar('tmpl', 'component');
     $statsClass = acymailing_get('class.stats');
     $statsClass->saveStats();
     header('Cache-Control: no-store, no-cache, must-revalidate');
     header('Cache-Control: post-check=0, pre-check=0', false);
     header('Pragma: no-cache');
     header("Expires: Wed, 17 Sep 1975 21:32:10 GMT");
     ob_end_clean();
     JPluginHelper::importPlugin('acymailing');
     $this->dispatcher = JDispatcher::getInstance();
     $results = $this->dispatcher->trigger('acymailing_getstatpicture');
     $picture = reset($results);
     if (empty($picture)) {
         $picture = 'media/com_acymailing/images/statpicture.png';
     }
     $picture = ltrim(str_replace(array('\\', '/'), DS, $picture), DS);
     $imagename = ACYMAILING_ROOT . $picture;
     $handle = fopen($imagename, 'r');
     if (!$handle) {
         exit;
     }
     header("Content-type: image/png");
     $contents = fread($handle, filesize($imagename));
     fclose($handle);
     echo $contents;
     exit;
 }
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:29,代码来源:stats.php

示例11: display

 function display()
 {
     if (!JRequest::getCmd('view')) {
         JRequest::setVar('view', 'comment');
     }
     parent::display();
 }
开发者ID:optimosolution,项目名称:marhk,代码行数:7,代码来源:comment.php

示例12: add

 function add()
 {
     $swt = JRequest::getVar('swt', '');
     JRequest::setVar('view', 'swtturnierinfo');
     JRequest::setVar('swt', $swt);
     parent::display();
 }
开发者ID:kbaerthel,项目名称:com_clm,代码行数:7,代码来源:swtturnier.php

示例13: display

 function display($cachable = false, $urlparams = array())
 {
     // set default view if not set
     JRequest::setVar("view", JFactory::getApplication()->input->get("view", "Dashboard"));
     // call parent behavior
     parent::display($cachable, $urlparams);
 }
开发者ID:jehanryan,项目名称:Flotech,代码行数:7,代码来源:controller.php

示例14: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = RedirectHelper::getActions();
     JToolBarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINK'), 'redirect');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('link.apply');
         JToolBarHelper::save('link.save');
     }
     // This component does not support Save as Copy due to uniqueness checks.
     // While it can be done, it causes too much confusion if the user does
     // not change the Old URL.
     if ($canDo->get('core.edit') && $canDo->get('core.create')) {
         JToolBarHelper::save2new('link.save2new');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('link.cancel');
     } else {
         JToolBarHelper::cancel('link.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER_EDIT');
 }
开发者ID:NavaINT1876,项目名称:ccustoms,代码行数:30,代码来源:view.html.php

示例15: display

 public function display($cachable = false, $url_params = false)
 {
     $user =& JFactory::getUser();
     $view = JRequest::getVar("view");
     if ($view == 'advancedopenportal') {
         JRequest::setVar("view", "listcases");
         $view = "listcases";
     }
     if (SugarCasesConnection::isValidPortalUser($user) && !SugarCasesConnection::isUserBlocked($user)) {
         parent::display($cachable, $url_params);
     } else {
         if (!$user->id) {
             $msg = JText::_('COM_ADVANCEDOPENPORTAL_LOGIN_REQUIRED');
         } elseif (SugarCasesConnection::isUserBlocked($user)) {
             $msg = JText::_('COM_ADVANCEDOPENPORTAL_PORTAL_USER_BLOCKED');
         } else {
             $msg = JText::_('COM_ADVANCEDOPENPORTAL_NO_PORTAL_ACCOUNT');
         }
         if ($view != 'listcases') {
             JFactory::getApplication()->redirect(JURI::base(), $msg, 'error');
         } else {
             JFactory::getApplication()->enqueueMessage($msg, 'error');
             parent::display($cachable, $url_params);
         }
     }
 }
开发者ID:salesagility,项目名称:SuiteCRM-Portal-Joomla,代码行数:26,代码来源:controller.php


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