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


PHP JRequest::getInt方法代码示例

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


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

示例1: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/users.php';
     // Load the submenu.
     UsersHelper::addSubmenu(JRequest::getCmd('view', 'users'));
     $view = JRequest::getCmd('view', 'users');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     if (!$this->canView($view)) {
         JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         return;
     }
     // Check for edit form.
     if ($view == 'user' && $layout == 'edit' && !$this->checkEditId('com_users.edit.user', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));
         return false;
     } elseif ($view == 'group' && $layout == 'edit' && !$this->checkEditId('com_users.edit.group', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', false));
         return false;
     } elseif ($view == 'level' && $layout == 'edit' && !$this->checkEditId('com_users.edit.level', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', false));
         return false;
     }
     return parent::display();
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:43,代码来源:controller.php

示例2: getState

 function getState($property = null)
 {
     if (!$this->__state_set) {
         $option = JRequest::getCmd('option');
         $app =& JFactory::getApplication();
         $context = $option . '.' . $this->getName();
         $this->setState('filter_published', $app->getUserStateFromRequest($context . '.filter_published', 'filter_published', 0, 'int'));
         $this->setState('filter_catid', $app->getUserStateFromRequest($context . '.filter_catid', 'filter_catid', 0, 'int'));
         $this->setState('filter_species', $app->getUserStateFromRequest($context . '.filter_species', 'filter_species', 0, 'word'));
         $this->setState('filter_location_state', $app->getUserStateFromRequest($context . '.filter_location_state', 'filter_location_state', 0, 'word'));
         $this->setState('filter_adoption_status', $app->getUserStateFromRequest($context . '.filter_adoption_status', 'filter_adoption_status', 0, 'word'));
         $this->setState('filter_real_time_need', $app->getUserStateFromRequest($context . '.filter_real_time_need', 'filter_real_time_need', 0, 'word'));
         $this->setState('filter_real_time_status', $app->getUserStateFromRequest($context . '.filter_real_time_status', 'filter_real_time_status', 0, 'word'));
         $this->setState('filter_search', $app->getUserStateFromRequest($context . '.filter_search', 'filter_search', ''));
         $this->setState('filter_order', $app->getUserStateFromRequest($context . '.filter_order', 'filter_order', 'title', 'cmd'));
         $this->setState('filter_order_Dir', $app->getUserStateFromRequest($context . '.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word'));
         $limit = $app->getUserStateFromRequest($context . '.limit', 'limit', $app->getCfg('list_limit', 5), 'int');
         //strange limitstart
         //	$limitstart	= $app->getUserStateFromRequest( $context.'.limitstart', 'limitstart', 0, 'int' );
         $limitstart = JRequest::getInt('limitstart', 0, '', 'int');
         $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
         $this->setState('limit', $limit);
         $this->setState('limitstart', $limitstart);
         $this->__state_set = true;
     }
     return parent::getState($property);
 }
开发者ID:snellcode,项目名称:ARCNA-Animals,代码行数:27,代码来源:animals.php

示例3: process

 function process()
 {
     if (!$this->isAllowed('lists', 'filter')) {
         return;
     }
     JRequest::checkToken() or die('Invalid Token');
     $filid = JRequest::getInt('filid');
     if (!empty($filid)) {
         $this->store();
     }
     $filterClass = acymailing_get('class.filter');
     $filterClass->subid = JRequest::getString('subid');
     $filterClass->execute(JRequest::getVar('filter'), JRequest::getVar('action'));
     if (!empty($filterClass->report)) {
         if (JRequest::getCmd('tmpl') == 'component') {
             echo acymailing_display($filterClass->report, 'info');
             $js = "setTimeout('redirect()',2000); function redirect(){window.top.location.href = 'index.php?option=com_acymailing&ctrl=subscriber'; }";
             $doc = JFactory::getDocument();
             $doc->addScriptDeclaration($js);
             return;
         } else {
             $app = JFactory::getApplication();
             foreach ($filterClass->report as $oneReport) {
                 $app->enqueueMessage($oneReport);
             }
         }
     }
     return $this->edit();
 }
开发者ID:unrealprojects,项目名称:journal,代码行数:29,代码来源:filter.php

示例4: save

	function save() {
		$app = JFactory::getApplication ();
		$db = JFactory::getDBO ();
		if (!JRequest::checkToken()) {
			$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' );
			$app->redirect ( KunenaRoute::_($this->baseurl, false) );
			return;
		}

		$iconname = JRequest::getString ( 'topiciconname' );
		$filename = JRequest::getString ( 'topiciconslist' );
		$published = JRequest::getInt ( 'published' );
		$ordering = JRequest::getInt ( 'ordering', 0 );
		$topiciconid = JRequest::getInt( 'topiciconid', 0 );

		/*if ( !$topiciconid ) {
			$db->setQuery ( "INSERT INTO #__kunena_topics_icons SET name = '$iconname', filename = '$filename', published = '$published', ordering ='$ordering'" );
			$db->query ();
			if (KunenaError::checkDatabaseError()) return;
		} else {
			$db->setQuery ( "UPDATE #__kunena_topics_icons SET name = '$iconname', filename = '$filename', published = '$published', ordering ='$ordering' WHERE id = '$topiciconid'" );
			$db->query ();
			if (KunenaError::checkDatabaseError()) return;
		}*/

		$app->enqueueMessage ( JText::_('COM_KUNENA_TOPICICON_SAVED') );
		$app->redirect ( KunenaRoute::_($this->baseurl, false) );
	}
开发者ID:rich20,项目名称:Kunena,代码行数:28,代码来源:topicicons.php

示例5: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     $client = JRequest::getWord('client', 'admin');
     $model = $this->getModel();
     $this->document->setTitle(WFText::_('WF_PREFERENCES_TITLE'));
     $this->document->addStyleSheet('templates/system/css/system.css');
     $component = WFExtensionHelper::getComponent();
     $xml = JPATH_COMPONENT . '/models/preferences.xml';
     // get params definitions
     $params = new WFParameter($component->params, $xml, 'preferences');
     $params->addElementPath(JPATH_COMPONENT . '/elements');
     if (WFModel::authorize('admin')) {
         $form = $model->getForm('permissions');
     } else {
         $form = null;
     }
     $this->assign('params', $params);
     $this->assign('permissons', $form);
     $this->addStyleSheet('components/com_jce/media/css/preferences.css');
     $this->addScript('components/com_jce/media/js/preferences.js');
     if (JRequest::getInt('close') == 1) {
         $this->addScriptDeclaration('jQuery(document).ready(function($){$.jce.Preferences.close();});');
     } else {
         $this->addScriptDeclaration('jQuery(document).ready(function($){$.jce.Preferences.init();});');
     }
     parent::display($tpl);
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:28,代码来源:view.html.php

示例6: display

 function display($tpl = null)
 {
     $lists = array();
     $condition = $this->get('condition');
     $optionFields = $this->get('optionFields');
     $allFields = $this->get('allFields');
     foreach ($allFields as $field) {
         foreach ($optionFields as $i => $optionField) {
             if ($field->ComponentId == $optionField->ComponentId) {
                 $optionField->ComponentName = $field->PropertyValue;
                 $optionFields[$i] = $optionField;
                 break;
             }
         }
     }
     $actions = array(JHTML::_('select.option', 'show', JText::_('RSFP_CONDITION_SHOW')), JHTML::_('select.option', 'hide', JText::_('RSFP_CONDITION_HIDE')));
     $lists['action'] = JHTML::_('select.genericlist', $actions, 'action', '', 'value', 'text', $condition->action);
     $blocks = array(JHTML::_('select.option', 1, JText::_('RSFP_CONDITION_BLOCK')), JHTML::_('select.option', 0, JText::_('RSFP_CONDITION_FIELD')));
     $lists['block'] = JHTML::_('select.genericlist', $blocks, 'block', '', 'value', 'text', $condition->block);
     $conditions = array(JHTML::_('select.option', 'all', JText::_('RSFP_CONDITION_ALL')), JHTML::_('select.option', 'any', JText::_('RSFP_CONDITION_ANY')));
     $lists['condition'] = JHTML::_('select.genericlist', $conditions, 'condition', '', 'value', 'text', $condition->condition);
     $operators = array(JHTML::_('select.option', 'is', JText::_('RSFP_CONDITION_IS')), JHTML::_('select.option', 'is_not', JText::_('RSFP_CONDITION_IS_NOT')));
     $lists['allfields'] = JHTML::_('select.genericlist', $allFields, 'component_id', '', 'ComponentId', 'PropertyValue', $condition->component_id);
     $this->lang = $this->get('lang');
     $this->operators = $operators;
     $this->allFields = $allFields;
     $this->optionFields = $optionFields;
     $this->formId = $this->get('formId');
     $this->close = JRequest::getInt('close');
     $this->condition = $condition;
     $this->lists = $lists;
     parent::display($tpl);
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:33,代码来源:view.html.php

示例7: save

 function save()
 {
     $mainframe = JFactory::getApplication();
     $id = JRequest::getInt("id");
     $deliveryTimes = JSFactory::getTable('deliveryTimes', 'jshop');
     $post = JRequest::get("post");
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeSaveDeliveryTime', array(&$post));
     if (!$deliveryTimes->bind($post)) {
         JError::raiseWarning("", _JSHOP_ERROR_BIND);
         $this->setRedirect("index.php?option=com_jshopping&controller=deliverytimes");
         return 0;
     }
     if (!$deliveryTimes->store()) {
         JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
         $this->setRedirect("index.php?option=com_jshopping&controller=deliverytimes");
         return 0;
     }
     $dispatcher->trigger('onAfterSaveDeliveryTime', array(&$deliveryTimes));
     if ($this->getTask() == 'apply') {
         $this->setRedirect("index.php?option=com_jshopping&controller=deliverytimes&task=edit&id=" . $deliveryTimes->id);
     } else {
         $this->setRedirect("index.php?option=com_jshopping&controller=deliverytimes");
     }
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:25,代码来源:deliverytimes.php

示例8: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_mijopolls/assets/css/mijopolls.css');
     $title = $this->get('Title');
     $t_title = $title ? JText::_('COM_MIJOPOLLS_VOTES_FOR') . ': ' . $title : JText::_('COM_MIJOPOLLS_SELECT_POLL');
     JToolBarHelper::title($t_title, 'mijopolls');
     JToolBarHelper::deleteList(JText::_('COM_MIJOPOLLS_DELETE_CONFIRM'), "deleteVotes", JText::_('COM_MIJOPOLLS_DELETE'), true);
     JToolBarHelper::divider();
     JToolBarHelper::preferences('com_mijopolls', 500);
     $this->mainframe = JFactory::getApplication();
     $this->option = JRequest::getWord('option');
     $filter_order = $this->mainframe->getUserStateFromRequest($this->option . '.votes.filter_order', 'filter_order', 'v.date', 'cmd');
     $filter_order_Dir = $this->mainframe->getUserStateFromRequest($this->option . '.votes.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $this->mainframe->getUserStateFromRequest($this->option . '.votes.search', 'search', '', 'string');
     // Get data from the model
     $lists = $this->get('List');
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->title = $title;
     $this->lists = $lists;
     $this->votes = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $this->poll_id = JRequest::getInt('id', 0);
     parent::display($tpl);
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:29,代码来源:view.html.php

示例9: __construct

 function __construct()
 {
     parent::__construct();
     $this->projectid = JRequest::getInt("p", 0);
     $this->teamid = JRequest::getInt("tid", 0);
     $this->getTeam();
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:7,代码来源:rivals.php

示例10: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $document =& JFactory::getDocument();
     $this->_addScripts();
     if ($this->published) {
         jimport('joomla.utilities.date');
         //$this->config = & $this->get('ShareConfig', 'Config');
         $this->assign('setstate', JobBoardHelper::renderJobBoard());
         if ($this->config->use_location) {
             $job_location = $this->data->country_name != 'COM_JOBBOARD_DB_ANYWHERE_CNAME' ? ', ' . $this->data->city : ', ' . JText::_('WORK_FROM_ANYWHERE');
         } else {
             $job_location = '';
         }
         $ref_num = $this->data->ref_num != '' ? ' (' . JText::_('COM_JOBBOARD_ENT_REF') . ': ' . $this->data->ref_num . ')' : '';
         $document->setTitle(JText::_('EMAIL_JOB') . ': ' . $this->data->job_title . $job_location . $ref_num);
     } else {
         $document->setTitle(JText::_('COM_JOBBOARD_JOB_DISABLED'));
     }
     $this->itemid = JRequest::getInt('Itemid');
     $this->user_entry_point = 'com_users';
     if (version_compare(JVERSION, '2.5.0', 'ge') || version_compare(JVERSION, '1.7.0', 'ge') || version_compare(JVERSION, '1.6.0', 'ge')) {
         $this->user_entry_point = 'com_users';
     } elseif (version_compare(JVERSION, '1.5.0', 'ge')) {
         $this->user_entry_point = 'com_user';
     }
     $retries = $app->getUserState('com_jobboard.member.retry', 0, 'int');
     $this->retries = $retries;
     parent::display($tpl);
 }
开发者ID:Rayvid,项目名称:joomla-jobboard,代码行数:30,代码来源:view.html.php

示例11: getInventoryFilter

 /**
  * Collect the filters for the query
  * @author RolandD
  * @author Max Milbers
  */
 private function getInventoryFilter()
 {
     /* Check some filters */
     $filters = array();
     if ($search = JRequest::getVar('filter_inventory', false)) {
         $search = '"%' . $this->_db->escape($search, true) . '%"';
         //$search = $this->_db->Quote($search, false);
         $filters[] = '`#__virtuemart_products`.`product_name` LIKE ' . $search;
     }
     if (JRequest::getInt('stockfilter', 0) == 1) {
         $filters[] = '`#__virtuemart_products`.`product_in_stock` > 0';
     }
     if ($catId = JRequest::getInt('virtuemart_category_id', 0) > 0) {
         $filters[] = '`#__virtuemart_categories`.`virtuemart_category_id` = ' . $catId;
     }
     $published = JRequest::getvar('filter_published');
     if ($published === '1') {
         $filters[] = "`#__virtuemart_products`.`published` = 1 ";
     } else {
         if ($published === '0') {
             $filters[] = "`#__virtuemart_products`.`published` = 0 ";
         }
     }
     $filters[] = '(`#__virtuemart_shoppergroups`.`default` = 1 OR `#__virtuemart_shoppergroups`.`default` is NULL)';
     return ' WHERE ' . implode(' AND ', $filters) . $this->_getOrdering();
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:31,代码来源:inventory.php

示例12: licenseDocumentForm

    function licenseDocumentForm(&$links, &$paths, &$data, $inline = 0)
    {
        $action = _taskLink('license_result', JRequest::getInt('gid', 0), array('bid' => $data->id));
        ob_start();
        ?>
		<form action="<?php 
        echo DOCMAN_Compat::sefRelToAbs($action);
        ?>
" method="POST" enctype="multipart/form-data">
            <input type="hidden" name="inline" value="<?php 
        echo $inline;
        ?>
" />
			<input type="radio" name="agree" value="0" checked /><?php 
        echo _DML_DONT_AGREE;
        ?>
			<input type="radio" name="agree" value="1" /><?php 
        echo _DML_AGREE;
        ?>
<br /><br />
			<input name="submit" value="<?php 
        echo _DML_PROCEED;
        ?>
" type="submit" />
		</form>

		<?php 
        $html = ob_get_contents();
        ob_end_clean();
        return $html;
    }
开发者ID:janssit,项目名称:www.ondernemenddiest.be,代码行数:31,代码来源:download.html.php

示例13: getRedirectToItemAppend

 /**
  * Gets the URL arguments to append to an item redirect.
  *
  * @param     int       $id         The primary key id for the item.
  * @param     string    $url_var    The name of the URL variable for the id.
  *
  * @return    string                The arguments to append to the redirect URL.
  */
 protected function getRedirectToItemAppend($id = null, $url_var = 'id')
 {
     // Need to override the parent method completely.
     $tmpl = JRequest::getCmd('tmpl');
     $layout = JRequest::getCmd('layout');
     $item_id = JRequest::getInt('Itemid');
     $return = $this->getReturnPage();
     $append = '';
     // Setup redirect info.
     if ($tmpl) {
         $append .= '&tmpl=' . $tmpl;
     }
     if ($layout) {
         $append .= '&layout=' . $layout;
     }
     if ($id) {
         $append .= '&' . $id . '=' . $id;
     }
     if ($item_id) {
         $append .= '&Itemid=' . $item_id;
     }
     if ($return) {
         $append .= '&return=' . base64_encode($return);
     }
     return $append;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:34,代码来源:milestones.php

示例14: populateState

 function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     if ($layout = $app->input->get('layout')) {
         $this->context .= '.' . $layout;
     }
     $filer_auto = $this->getUserStateFromRequest($this->context . '.filter.author.id', 'filter_author_id', '');
     $filer_search = $this->getUserStateFromRequest($this->context . '.filler.search', 'filter_search', '');
     $filert_order = $this->getUserStateFromRequest($this->context . '.filter.order', 'filter_order', '');
     $filert_order_dir = $this->getUserStateFromRequest($this->context . '.filert.order.dir', 'filter_order_Dir', '');
     $limit = $this->getUserStateFromRequest($this->context . 'limit', 'limit', '');
     $limitstartt = $this->getUserStateFromRequest($this->context . 'limitstart', 'limitstart', '');
     $filter_published = $this->getUserStateFromRequest($this->context . 'filter_published', 'filter_published', '');
     $id_cm = $this->getUserStateFromRequest($this->context . '.id_cm', 'id', '');
     $this->setState('status', $filter_published);
     $this->setState('id_cm', $id_cm);
     // $this->setState('autho',$filer_auto);
     $this->setState('lab1', $filert_order);
     $this->setState('lab2', $filert_order_dir);
     $this->setState('search', $filer_search);
     $this->setState('autho', $filer_auto);
     if (isset($_POST['cid'])) {
         $this->setState('id_input', $_POST['cid']);
     }
     $this->setState('detail2', JRequest::getInt('id'));
     $this->setState('limi', $limit);
     $this->setState('limitstar', $limitstartt);
 }
开发者ID:nvthuong11,项目名称:tz_pinboard,代码行数:28,代码来源:board.php

示例15: save

 function save()
 {
     $id = JRequest::getInt("id");
     $configdisplayprice = JSFactory::getTable('configDisplayPrice', 'jshop');
     $post = JRequest::get("post");
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeSaveConfigDisplayPrice', array(&$post));
     if (!$post['countries_id']) {
         JError::raiseWarning("", _JSHOP_ERROR_BIND);
         $this->setRedirect("index.php?option=com_jshopping&controller=configdisplayprice&task=edit&id=" . $post['id']);
         return 0;
     }
     if (!$configdisplayprice->bind($post)) {
         JError::raiseWarning("", _JSHOP_ERROR_BIND);
         $this->setRedirect("index.php?option=com_jshopping&controller=configdisplayprice");
         return 0;
     }
     $configdisplayprice->setZones($post['countries_id']);
     if (!$configdisplayprice->store()) {
         JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
         $this->setRedirect("index.php?option=com_jshopping&controller=configdisplayprice");
         return 0;
     }
     updateCountConfigDisplayPrice();
     $dispatcher->trigger('onAftetSaveConfigDisplayPrice', array(&$configdisplayprice));
     if ($this->getTask() == 'apply') {
         $this->setRedirect("index.php?option=com_jshopping&controller=configdisplayprice&task=edit&id=" . $configdisplayprice->id);
     } else {
         $this->setRedirect("index.php?option=com_jshopping&controller=configdisplayprice");
     }
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:configdisplayprice.php


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