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


PHP JRequest::getWord方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     // 		$this->assignRef('perms', Permissions::getInstance());
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $shoppergroup = $model->getShopperGroup();
         $this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
         $vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id);
         $this->assignRef('vendorList', $vendors);
         $this->assignRef('shoppergroup', $shoppergroup);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         JToolBarHelper::makeDefault();
         $this->loadHelper('permissions');
         $showVendors = Permissions::getInstance()->check('admin');
         $this->assignRef('showVendors', $showVendors);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shoppergroups = $model->getShopperGroups(false, true);
         $this->assignRef('shoppergroups', $shoppergroups);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:31,代码来源:view.html.php

示例2: 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

示例3: 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

示例4: display

 function display($tpl = null)
 {
     $language = JFactory::getLanguage();
     $language->load('plg_editors_jce', JPATH_ADMINISTRATOR);
     $client = JRequest::getWord('client', 'site');
     $model = $this->getModel();
     $plugin = WFExtensionHelper::getPlugin();
     $xml = WF_EDITOR_LIBRARIES . '/xml/config/editor.xml';
     $data = null;
     // get params from editor plugin
     if ($plugin->params && $plugin->params !== "{}") {
         $data = json_decode($plugin->params);
     } else {
         $component = WFExtensionHelper::getComponent();
         // get params from component "params" field (legacy)
         if ($component->params) {
             $data = json_decode($component->params);
         }
     }
     // get params definitions
     $params = new WFParameter($data, $xml, 'editor');
     $params->addElementPath(JPATH_COMPONENT . '/elements');
     $this->assign('model', $model);
     $this->assign('params', $params);
     $this->assign('client', $client);
     WFToolbarHelper::apply();
     WFToolbarHelper::save();
     WFToolbarHelper::help('config.about');
     parent::display($tpl);
 }
开发者ID:spikart,项目名称:spikart.com.ua,代码行数:30,代码来源:view.html.php

示例5: display

 /**
  * Method to display a view.
  *
  * @param	boolean	$cachable	If true, the view output will be cached
  * @param	array	$urlparams	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)
 {
     // Get the current URI to redirect to.
     $uri = JURI::getInstance();
     $redirect = base64_encode($uri);
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     if (file_exists(JPATH_CONFIGURATION . '/configuration.php') && filesize(JPATH_CONFIGURATION . '/configuration.php') > 10 && file_exists(JPATH_INSTALLATION . '/index.php')) {
         $default_view = 'remove';
     } else {
         $default_view = 'language';
     }
     $vName = JRequest::getWord('view', $default_view);
     $vFormat = $document->getType();
     $lName = JRequest::getWord('layout', 'default');
     if (strcmp($vName, $default_view) == 0) {
         JRequest::setVar('view', $default_view);
     }
     if ($view = $this->getView($vName, $vFormat)) {
         switch ($vName) {
             default:
                 $model = $this->getModel('Setup', 'JInstallationModel', array('dbo' => null));
                 break;
         }
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->document = $document;
         $view->display();
     }
     return $this;
 }
开发者ID:joomline,项目名称:Joomla2.5.999,代码行数:43,代码来源:controller.php

示例6: display

 public function display($tpl = null)
 {
     TOOLBAR_enmasse::_SMENU();
     $task = JRequest::getWord('task');
     switch ($task) {
         case 'show':
             TOOLBAR_enmasse::_BILLTEMPLATE();
             $this->arBillTmpl = JModel::getInstance('billTemplate', 'enmasseModel')->listAll();
             break;
         case 'edit':
             TOOLBAR_enmasse::_BILLTEMPLATE_EDIT();
             $cid = JRequest::getVar('cid', array(), 'method', 'array');
             if (!empty($cid)) {
                 $this->oBillTmpl = JModel::getInstance('billTemplate', 'enmasseModel')->getById($cid[0]);
                 if (!$this->oBillTmpl->id) {
                     $link = JRoute::_('index.php?option=com_enmasse&controller=billTemplate&task=show');
                     $msg = JText::_('BILL_TEMPLATE_INVALID_TEMPLATE_MSG');
                     JFactory::getApplication()->redirect($link, $msg, 'error');
                 }
             } else {
                 $link = JRoute::_('index.php?option=com_enmasse&controller=billTemplate&task=show');
                 $msg = JText::_('BILL_TEMPLATE_INVALID_TEMPLATE_MSG');
                 JFactory::getApplication()->redirect($link, $msg, 'error');
             }
             break;
     }
     parent::display($tpl);
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:28,代码来源:view.html.php

示例7: __construct

 /**
  * Constructor
  *
  * @since 1.5
  */
 function __construct()
 {
     parent::__construct();
     //Get configuration
     $app = JFactory::getApplication();
     $config = JFactory::getConfig();
     // Get the pagination request variables
     $this->setState('limit', $app->getUserStateFromRequest('com_search.limit', 'limit', $config->get('list_limit'), 'uint'));
     $this->setState('limitstart', JRequest::getUInt('limitstart', 0));
     // Get parameters.
     $params = $app->getParams();
     if ($params->get('searchphrase') == 1) {
         $searchphrase = 'any';
     } elseif ($params->get('searchphrase') == 2) {
         $searchphrase = 'exact';
     } else {
         $searchphrase = 'all';
     }
     // Set the search parameters
     $keyword = urldecode(JRequest::getString('searchword'));
     $match = JRequest::getWord('searchphrase', $searchphrase);
     $ordering = JRequest::getWord('ordering', $params->get('ordering', 'newest'));
     $this->setSearch($keyword, $match, $ordering);
     //Set the search areas
     $areas = JRequest::getVar('areas');
     $this->setAreas($areas);
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:32,代码来源:search.php

示例8: edit

 /**
  * Handle editing aliases from the aliases
  * manager. cid contains the id of the
  * alias record we want to edit. Need to be
  * turned into that of the SEF url id,
  * so as to be able to use the editurl view
  * to edit all aliases for this url
  */
 public function edit()
 {
     // hide the main menu
     JRequest::setVar('hidemainmenu', 1);
     // find and store edited item id
     $cid = JRequest::getVar('cid', array(0), 'default', 'array');
     $this->_id = $cid[0];
     // find to which url this alias record belongs to
     // get a model and ask for the matching URL record
     $model =& $this->getModel('aliases', 'Sh404sefModel');
     $url = $model->getUrlByAliasId($this->_id);
     // push that as a request var, so that we fake editing an url
     if (!empty($url) && !empty($url->id)) {
         $cid = array($url->id);
         Jrequest::setVar('cid', $cid);
     }
     // need to get the view to push the url data into it
     $viewName = JRequest::getWord('view');
     if (empty($viewName)) {
         JRequest::setVar('view', $this->_defaultView);
     }
     $document =& JFactory::getDocument();
     $viewType = $document->getType();
     $viewName = JRequest::getCmd('view');
     $this->_editView = $viewName;
     $viewLayout = JRequest::getCmd('layout', $this->_defaultLayout);
     $view =& $this->getView($viewName, $viewType, '', array('base_path' => $this->_basePath));
     // now we can push the url into the view
     $view->assign('url', $url);
     // will prevent user from editing the non-sef url
     $view->assign('noUrlEditing', true);
     // Call the base controller to do the rest
     $this->display();
 }
开发者ID:justinlyon,项目名称:scc,代码行数:42,代码来源:editalias.php

示例9: _renderStatus

 private function _renderStatus()
 {
     $date = JFactory::getDate();
     $jparam = new JConfig();
     if (!JFile::exists(JPATH_ROOT . '/administrator/components/com_community/community.xml')) {
         return false;
     }
     if (JFile::exists(JPATH_ROOT . '/administrator/components/com_community/jomsocialupdate.ini')) {
         $lastcheckdate = JFile::read(JPATH_ROOT . '/administrator/components/com_community/jomsocialupdate.ini');
     } else {
         $lastcheckdate = $date->format('Y-m-d H:i:s');
     }
     JFile::write(JPATH_ROOT . '/administrator/components/com_community/jomsocialupdate.ini', $lastcheckdate);
     $dayInterval = 1;
     // days
     $currentdate = $date->format('Y-m-d H:i:s');
     $checkVersion = strtotime($currentdate) > strtotime($lastcheckdate) + $dayInterval * 60 * 60 * 24;
     // Load language
     $lang = JFactory::getLanguage();
     $lang->load('com_community', JPATH_ROOT . '/administrator');
     $button = $this->_getButton($checkVersion);
     $html = JResponse::getBody();
     $html = str_replace('<div id="module-status">', '<div id="module-status">' . $button, $html);
     // Load AJAX library for the back end.
     $jaxScript = '';
     $noHTML = JRequest::getInt('no_html', 0);
     $format = JRequest::getWord('format', 'html');
     if (!$noHTML && $format == 'html') {
         require_once AZRUL_SYSTEM_PATH . '/pc_includes/ajax.php';
         $jax = new JAX(AZRUL_SYSTEM_LIVE . '/pc_includes');
         $jax->setReqURI(rtrim(JURI::root(), '/') . '/administrator/index.php');
         $jaxScript = $jax->getScript();
     }
     JResponse::setBody($html . $jaxScript);
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:35,代码来源:jomsocialupdate.php

示例10: display

 function display($tpl = null)
 {
     $document =& JFactory::getDocument();
     $document->addStyleSheet('components/com_acepolls/assets/css/acepolls.css');
     JToolBarHelper::title(JText::_('COM_ACEPOLLS_POLLS'), 'acepolls');
     JToolBarHelper::addNewX();
     JToolBarHelper::editListX();
     JToolBarHelper::deleteList();
     JToolBarHelper::divider();
     JToolBarHelper::publishList();
     JToolBarHelper::unpublishList();
     JToolBarHelper::divider();
     JToolBarHelper::custom('resetVotes', 'cancel.png', 'cancel.png', JText::_('COM_ACEPOLLS_RESET_VOTES'), true, false);
     JToolBarHelper::preferences('com_acepolls');
     $this->mainframe = JFactory::getApplication();
     $this->option = JRequest::getWord('option');
     $filter_order = $this->mainframe->getUserStateFromRequest($this->option . '.polls.filter_order', 'filter_order', 'm.title', 'string');
     $filter_order_Dir = $this->mainframe->getUserStateFromRequest($this->option . '.polls.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $this->mainframe->getUserStateFromRequest($this->option . '.polls.filter_state', 'filter_state', '', 'word');
     $search = $this->mainframe->getUserStateFromRequest($this->option . '.polls.search', 'search', '', 'string');
     JHTML::_('behavior.tooltip');
     // state filter
     $lists['state'] = JHTML::_('grid.state', $filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $this->get('Data'));
     $this->assignRef('pagination', $this->get('Pagination'));
     parent::display($tpl);
 }
开发者ID:vuchannguyen,项目名称:dayhoc,代码行数:34,代码来源:view.html.php

示例11: addToolbar

 function addToolbar()
 {
     $task = JRequest::getWord('task', '');
     JToolBarHelper::title(JText::_('EMAIL_TEMPLATE_MANAGER'));
     switch ($task) {
         case 'add':
         case 'edit':
             JToolBarHelper::apply();
             JToolBarHelper::save();
             JToolBarHelper::cancel();
             break;
         case 'show_duplicate':
         case 'show_import':
         case 'show_export':
             break;
         default:
             JToolBarHelper::custom('show_duplicate', 'copy', '', JText::_('COPY_TO'));
             JToolBarHelper::custom('show_import', 'upload', '', JText::_('IMPORT'), false);
             JToolBarHelper::custom('export', 'export', '', JText::_('EXPORT'));
             JToolBarHelper::publishList();
             JToolBarHelper::unpublishList();
             JToolBarHelper::deleteList(JText::_('ARE_YOU_SURE_TO_DELETE'));
             JToolBarHelper::editList();
             JToolBarHelper::addNew();
             break;
     }
 }
开发者ID:jomsocial,项目名称:JSVoice,代码行数:27,代码来源:view.html.php

示例12: search

 function search()
 {
     $post['searchword'] = JRequest::getString('searchword', null, 'post');
     $post['ordering'] = JRequest::getWord('ordering', null, 'post');
     $post['searchphrase'] = JRequest::getWord('searchphrase', 'all', 'post');
     $post['limit'] = JRequest::getInt('limit', null, 'post');
     if ($post['limit'] === null) {
         unset($post['limit']);
     }
     $areas = JRequest::getVar('areas', null, 'post', 'array');
     if ($areas) {
         foreach ($areas as $area) {
             $post['areas'][] = JFilterInput::clean($area, 'cmd');
         }
     }
     // set Itemid id for links
     $menu =& JSite::getMenu();
     $items = $menu->getItems('link', 'index.php?option=com_search_lucene&view=search');
     if (isset($items[0])) {
         $post['Itemid'] = $items[0]->id;
     }
     unset($post['task']);
     unset($post['submit']);
     $uri = JURI::getInstance();
     $uri->setQuery($post);
     $uri->setVar('option', 'com_search_lucene');
     $this->setRedirect(JRoute::_('index.php' . $uri->toString(array('query', 'fragment')), false));
 }
开发者ID:beingsane,项目名称:com-search-lucene,代码行数:28,代码来源:controller.php

示例13: display

 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmConfig')) {
         require JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'config.php';
     }
     VmConfig::loadConfig();
     VmConfig::loadJLang('com_virtuemart_countries');
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel('country');
     $zoneModel = VmModel::getModel('worldzones');
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $country = $model->getData();
         $this->assignRef('country', $country);
         $wzsList = $zoneModel->getWorldZonesSelectList();
         $this->assignRef('worldZones', $wzsList);
         $this->addStandardEditViewCommands();
     } else {
         $this->addStandardDefaultViewCommands(true, false);
         //First the view lists, it sets the state of the model
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $filter_country = JRequest::getWord('filter_country', false);
         $countries = $model->getCountries(false, false, $filter_country);
         $this->assignRef('countries', $countries);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:33,代码来源:view.html.php

示例14: getResultsCounter

	/**
	 * Create and return the pagination result set counter string, ie. Results 1-10 of 42
	 *
	 * @access	public
	 * @return	string	Pagination result set counter string
	 * @since	1.5
	 */
	function getResultsCounter() {
		// Initialize variables
		$app = JFactory::getApplication();
		$html = null;
		$fromResult = $this->limitstart + 1;

		// If the limit is reached before the end of the list
		if ($this->limitstart + $this->limit < $this->total) {
			$toResult = $this->limitstart + $this->limit;
		} else {
			$toResult = $this->total;
		}

		// If there are results found
		if ($this->total > 0) {
			// Check for maximum allowed of results
			$fc_view_limit_max = JRequest::getWord('view')!='search'  ?  0  :  (int) $app->getUserState('fc_view_limit_max');
			$items_total_msg = $fc_view_limit_max && ($this->total >= $fc_view_limit_max) ? 'FLEXI_ITEM_S_OR_MORE' : 'FLEXI_ITEM_S';
			
			$html =
				 "<span class='flexi label item_total_label'>".JText::_( 'FLEXI_TOTAL')."</span> "
				."<span class='flexi value item_total_value'>".$this->total." " .JText::_( $items_total_msg )."</span>"
				."<span class='flexi label item_total_label'>".JText::_( 'FLEXI_DISPLAYING')."</span> "
				."<span class='flexi value item_total_value'>".$fromResult ." - " .$toResult ." " .JText::_( 'FLEXI_ITEM_S')."</span>"
				;
		} else {
			$html .= "\n" . JText::_('JLIB_HTML_NO_RECORDS_FOUND');
		}

		return $html;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:38,代码来源:pagination.php

示例15: save

 function save($data = 0)
 {
     $fileModel = VmModel::getModel('media');
     //Now we try to determine to which this media should be long to
     $data = JRequest::get('post');
     //$data['file_title'] = JRequest::getVar('file_title','','post','STRING',JREQUEST_ALLOWHTML);
     $data['file_description'] = JRequest::getVar('file_description', '', 'post', 'STRING', JREQUEST_ALLOWHTML);
     $data['media_attributes'] = JRequest::getWord('media_attributes');
     $data['file_type'] = JRequest::getWord('file_type');
     if (empty($data['file_type'])) {
         $data['file_type'] = $data['media_attributes'];
     }
     if ($id = $fileModel->store($data, $data['file_type'])) {
         $msg = JText::_('COM_VIRTUEMART_FILE_SAVED_SUCCESS');
     } else {
         $msg = $fileModel->getError();
     }
     $cmd = JRequest::getCmd('task');
     if ($cmd == 'apply') {
         $redirection = 'index.php?option=com_virtuemart&view=media&task=edit&virtuemart_media_id=' . $id;
     } else {
         $redirection = 'index.php?option=com_virtuemart&view=media';
     }
     $this->setRedirect($redirection, $msg);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:25,代码来源:media.php


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