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


PHP vRequest::getString方法代码示例

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


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

示例1: getCurrenciesList

 /**
  * Retireve a list of currencies from the database.
  * This function is used in the backend for the currency listing, therefore no asking if enabled or not
  * @author Max Milbers
  * @return object List of currency objects
  */
 function getCurrenciesList($search, $vendorId = 1)
 {
     $where = array();
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         $shared = 'OR `shared`="1"';
     }
     $vendorId = vmAccess::isSuperVendor();
     if ($vendorId) {
         $where[] = '(`virtuemart_vendor_id` = "' . (int) $vendorId . '" ' . $shared . ')';
     }
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $where[] = '`currency_name` LIKE ' . $search . ' OR `currency_code_2` LIKE ' . $search . ' OR `currency_code_3` LIKE ' . $search;
     }
     $whereString = '';
     if (count($where) > 0) {
         $whereString = ' WHERE ' . implode(' AND ', $where);
     }
     $data = $this->exeSortSearchListQuery(0, '*', ' FROM `#__virtuemart_currencies`', $whereString, '', $this->_getOrdering());
     return $data;
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:34,代码来源:currency.php

示例2: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('product.*,products_en_gb.product_name,tour_type.title AS tour_type,tour_style.title AS tour_style_name')->from('#__tsmart_products AS product')->leftJoin('#__tsmart_products_en_gb AS products_en_gb USING(tsmart_product_id)')->leftJoin('#__tsmart_tour_type AS tour_type USING(tsmart_tour_type_id)')->leftJoin('#__tsmart_tour_style AS tour_style USING(tsmart_tour_style_id)');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('product.product_name LIKE ' . $search);
     }
     // Add the list ordering clause.
     $orderCol = $this->state->get('list.ordering', 'product.tsmart_product_id');
     $orderDirn = $this->state->get('list.direction', 'asc');
     if ($orderCol == 'product.ordering') {
         $orderCol = $db->quoteName('product.tsmart_product_id') . ' ' . $orderDirn . ', ' . $db->quoteName('product.ordering');
     }
     $query->order($db->escape($orderCol . ' ' . $orderDirn));
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:29,代码来源:product.php

示例3: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('faq.*,categoryfaq.categoryfaq_name')->from('#__tsmart_faq AS faq')->leftJoin('#__tsmart_categoryfaq AS categoryfaq ON categoryfaq.tsmart_categoryfaq_id=faq.tsmart_categoryfaq_id');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('faq.title LIKE ' . $search);
     }
     if (empty($this->_selectedOrdering)) {
         vmTrace('empty _getOrdering');
     }
     if (empty($this->_selectedOrderingDir)) {
         vmTrace('empty _selectedOrderingDir');
     }
     $query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:29,代码来源:faq.php

示例4: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('hotel.*')->from('#__tsmart_hotel AS hotel')->leftJoin('#__tsmart_cityarea AS cityarea USING(tsmart_cityarea_id)')->leftJoin('#__tsmart_states AS states ON states.tsmart_state_id=cityarea.tsmart_state_id')->leftJoin('#__tsmart_countries AS countries ON countries.tsmart_country_id=states.tsmart_country_id')->select('CONCAT(cityarea.city_area_name,",",states.state_name,",",countries.country_name) AS location');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('hotel.title LIKE ' . $search);
     }
     if (empty($this->_selectedOrdering)) {
         vmTrace('empty _getOrdering');
     }
     if (empty($this->_selectedOrderingDir)) {
         vmTrace('empty _selectedOrderingDir');
     }
     $query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
     //echo $query->dump();
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:30,代码来源:hotel.php

示例5: __construct

	/**
	 * constructs a VmModel
	 * setMainTable defines the maintable of the model
	 * @author Max Milbers
	 */
	function __construct() {
		parent::__construct();
		$this->setMainTable('ratings');


		$layout = vRequest::getString('layout','default');
		$task = vRequest::getCmd('task','default');
		if($layout == 'list_reviews' or $task == 'listreviews'){
			vmdebug('in review list');
			$myarray = array('pr.created_on','virtuemart_rating_review_id','vote');
			$this->removevalidOrderingFieldName('created_on');
			$this->removevalidOrderingFieldName('product_name');
			$this->removevalidOrderingFieldName('virtuemart_rating_id');
			$this->removevalidOrderingFieldName('rating');
			$this->_selectedOrdering = 'pr.created_on';
		} else {
			$myarray = array('created_on','product_name','virtuemart_rating_id');
			$this->removevalidOrderingFieldName('pr.created_on');
			$this->removevalidOrderingFieldName('virtuemart_rating_review_id');
			$this->removevalidOrderingFieldName('vote');
			$this->_selectedOrdering = 'created_on';
		}
		$this->addvalidOrderingFieldName($myarray);

	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:30,代码来源:ratings.php

示例6: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('payment.*')->from('#__tsmart_payment AS payment')->leftJoin('#__tsmart_currencies AS currencies USING(tsmart_currency_id)')->select('CONCAT(currencies.currency_code_3," ",currencies.currency_symbol) AS currency_symbol');
     //get list tour apply
     $query1 = $db->getQuery(true);
     $query1->select('GROUP_CONCAT(products_en_gb.product_name)')->from('#__tsmart_tour_id_payment_id AS tour_id_payment_id')->leftJoin('#__tsmart_products_en_gb AS products_en_gb USING(tsmart_product_id)')->where('tour_id_payment_id.tsmart_payment_id=payment.tsmart_payment_id');
     $query->select("({$query1}) AS list_tour");
     //end get list tour apply
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('payment.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('payment.title LIKE ' . $search);
     }
     if (empty($this->_selectedOrdering)) {
         vmTrace('empty _getOrdering');
     }
     if (empty($this->_selectedOrderingDir)) {
         vmTrace('empty _selectedOrderingDir');
     }
     $query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:34,代码来源:payment.php

示例7: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('country.*,COUNT(states.tsmart_state_id) AS total_state')->from('#__tsmart_countries AS country')->leftJoin('#__tsmart_states AS states using (tsmart_country_id)')->leftJoin('#__tsmart_currencies AS currency using (tsmart_currency_id)')->select('currency.currency_name')->leftJoin('#__tsmart_language AS language using (tsmart_language_id)')->select('language.language_name')->group('country.tsmart_country_id');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('country.country_name LIKE ' . $search);
     }
     // Add the list ordering clause.
     $orderCol = $this->state->get('list.ordering', 'country.tsmart_country_id');
     $orderDirn = $this->state->get('list.direction', 'asc');
     if ($orderCol == 'country.ordering') {
         $orderCol = $db->quoteName('country.tsmart_country_id') . ' ' . $orderDirn . ', ' . $db->quoteName('country.ordering');
     }
     $query->order($db->escape($orderCol . ' ' . $orderDirn));
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:29,代码来源:country.php

示例8: display

	function display ($tpl = null) {

		// Load the helper(s)


		jimport('joomla.filesystem.file');
		$config = JFactory::getConfig();
		$log_path = $config->get('log_path', VMPATH_ROOT . "/log");
		$layoutName = vRequest::getCmd('layout', 'default');
		VmConfig::loadJLang('com_virtuemart_log');

		if ($layoutName == 'edit') {
			$logFile = vRequest::getString('logfile', '');
			$this->SetViewTitle('LOG', $logFile);
			$fileContent = file_get_contents($log_path . DS . $logFile);
			$fileContentByLine = explode("\n", $fileContent);

			$this->assignRef('fileContentByLine', $fileContentByLine);
			JToolBarHelper::cancel();

		} else {
			if(!class_exists('JFolder')) require(VMPATH_LIBS.DS.'joomla'.DS.'filesystem'.DS.'folder.php');

			$logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html'));

			$this->SetViewTitle('LOG');
			$this->assignRef('logFiles', $logFiles);
			$this->assignRef('path', $log_path);
		}

		parent::display($tpl);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:view.html.php

示例9: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('state.*, countries.flag AS country_flag,countries.country_name,COUNT(cityarea.tsmart_cityarea_id) AS total_city')->from('#__tsmart_states AS state')->leftJoin('#__tsmart_countries AS countries   using (tsmart_country_id)')->leftJoin('#__tsmart_cityarea AS cityarea using (tsmart_state_id)')->group('state.tsmart_state_id')->leftJoin('#__tsmart_states AS states ON states.tsmart_state_id=cityarea.tsmart_state_id')->leftJoin('#__tsmart_airport AS airport ON airport.tsmart_cityarea_id=cityarea.tsmart_cityarea_id')->select('GROUP_CONCAT(airport.airport_name,"(",airport.ata_code,")") AS list_airport_name');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('state.state_name LIKE ' . $search);
     }
     // Add the list ordering clause.
     $orderCol = $this->state->get('list.ordering', 'state.tsmart_state_id');
     $orderDirn = $this->state->get('list.direction', 'asc');
     if ($orderCol == 'state.ordering') {
         $orderCol = $db->quoteName('state.tsmart_state_id') . ' ' . $orderDirn . ', ' . $db->quoteName('state.ordering');
     }
     $query->order($db->escape($orderCol . ' ' . $orderDirn));
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:29,代码来源:state.php

示例10: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('excursion_addon.*')->from('#__tsmart_excursion_addon AS excursion_addon')->leftJoin('me1u8_tsmart_cityarea AS cityarea USING(tsmart_cityarea_id)')->select('cityarea.city_area_name AS city_area_name');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('excursionaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('excursion_addon.excursion_addon_name LIKE ' . $search);
     }
     if (empty($this->_selectedOrdering)) {
         vmTrace('empty _getOrdering');
     }
     if (empty($this->_selectedOrderingDir)) {
         vmTrace('empty _selectedOrderingDir');
     }
     $query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:29,代码来源:excursionaddon.php

示例11: getItemList

 /**
  * Retireve a list of currencies from the database.
  * This function is used in the backend for the currency listing, therefore no asking if enabled or not
  * @author Max Milbers
  * @return object List of currency objects
  */
 function getItemList($search = '')
 {
     $select = ' supplier.* FROM #__tsmart_supplier AS supplier';
     $where = array();
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         $shared = 'OR `supplier.shared`="1"';
     }
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $where[] = '`supplier.supplier_name` LIKE ' . $search;
     }
     $whereString = '';
     if (count($where) > 0) {
         $whereString = ' WHERE ' . implode(' AND ', $where);
     }
     $data = $this->exeSortSearchListQuery(0, $select, '', $whereString, '', $this->_getOrdering());
     return $data;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:31,代码来源:supplier.php

示例12: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('group_size.*')->from('#__tsmart_group_size AS group_size');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('group_size.group_name LIKE ' . $search);
     }
     if (empty($this->_selectedOrdering)) {
         vmTrace('empty _getOrdering');
     }
     if (empty($this->_selectedOrderingDir)) {
         vmTrace('empty _selectedOrderingDir');
     }
     $query->order('group_size.' . $this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
     //echo $query->dump();
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:30,代码来源:groupsize.php

示例13: getListQuery

 function getListQuery()
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('language.*')->from('#__tsmart_language AS language');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('language.language_name LIKE ' . $search);
     }
     // Add the list ordering clause.
     $orderCol = $this->state->get('list.ordering', 'language.tsmart_language_id');
     $orderDirn = $this->state->get('list.direction', 'asc');
     if ($orderCol == 'language.ordering') {
         $orderCol = $db->quoteName('language.language_name') . ' ' . $orderDirn . ', ' . $db->quoteName('language.ordering');
     }
     $query->order($db->escape($orderCol . ' ' . $orderDirn));
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:29,代码来源:language.php

示例14: getListQuery

 function getListQuery()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $tsmart_product_id = $input->getInt('tsmart_product_id', 0);
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('itinerary.*,cityarea.city_area_name,accommodation.tsmart_accommodation_id')->from('#__tsmart_itinerary AS itinerary')->where('itinerary.tsmart_product_id=' . (int) $tsmart_product_id)->leftJoin('#__tsmart_accommodation AS accommodation USING(tsmart_itinerary_id)')->leftJoin('#__tsmart_cityarea AS cityarea USING(tsmart_cityarea_id)')->group('itinerary.tsmart_itinerary_id');
     $user = JFactory::getUser();
     $shared = '';
     if (vmAccess::manager()) {
         //$query->where('transferaddon.shared=1','OR');
     }
     $search = vRequest::getCmd('search', false);
     if (empty($search)) {
         $search = vRequest::getString('search', false);
     }
     // add filters
     if ($search) {
         $db = JFactory::getDBO();
         $search = '"%' . $db->escape($search, true) . '%"';
         $query->where('itinerary.title LIKE ' . $search);
     }
     $orderCol = $this->state->get('list.ordering', 'itinerary.ordering');
     $orderDirn = $this->state->get('list.direction', 'asc');
     if ($orderCol == 'itinerary.ordering') {
         $orderCol = $db->quoteName('itinerary.title') . ' ' . $orderDirn . ', ' . $db->quoteName('itinerary.ordering');
     }
     $query->order($db->escape($orderCol . ' ' . $orderDirn));
     return $query;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:31,代码来源:accommodation.php

示例15: mailAskquestion

 /**
  * Send the ask question email.
  * @author Kohl Patrick, Christopher Roussel
  */
 public function mailAskquestion()
 {
     vRequest::vmCheckToken();
     if (!class_exists('shopFunctionsF')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     $model = tmsModel::getModel('vendor');
     $mainframe = JFactory::getApplication();
     $vars = array();
     $min = tsmConfig::get('asks_minimum_comment_length', 50) + 1;
     $max = tsmConfig::get('asks_maximum_comment_length', 2000) - 1;
     $commentSize = vRequest::getString('comment');
     if (function_exists('mb_strlen')) {
         $commentSize = mb_strlen($commentSize);
     } else {
         $commentSize = strlen($commentSize);
     }
     $validMail = filter_var(vRequest::getVar('email'), FILTER_VALIDATE_EMAIL);
     $virtuemart_vendor_id = vRequest::getInt('virtuemart_vendor_id', 1);
     if (!class_exists('VirtueMartModelVendor')) {
         require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
     }
     $userId = VirtueMartModelVendor::getUserIdByVendorId($virtuemart_vendor_id);
     //$vendorUser = JFactory::getUser($userId);
     if ($commentSize < $min || $commentSize > $max || !$validMail) {
         $this->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=vendor&task=contact&virtuemart_vendor_id=' . $virtuemart_vendor_id, FALSE), tsmText::_('COM_VIRTUEMART_COMMENT_NOT_VALID_JS'));
         return;
     }
     $user = JFactory::getUser();
     $fromMail = vRequest::getVar('email');
     //is sanitized then
     $fromName = vRequest::getVar('name', '');
     //is sanitized then
     $fromMail = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromMail);
     $fromName = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromName);
     if (!empty($user->id)) {
         if (empty($fromMail)) {
             $fromMail = $user->email;
         }
         if (empty($fromName)) {
             $fromName = $user->name;
         }
     }
     $vars['user'] = array('name' => $fromName, 'email' => $fromMail);
     $VendorEmail = $model->getVendorEmail($virtuemart_vendor_id);
     $vars['vendor'] = array('vendor_store_name' => $fromName);
     if (shopFunctionsF::renderMail('vendor', $VendorEmail, $vars, 'vendor')) {
         $string = 'COM_VIRTUEMART_MAIL_SEND_SUCCESSFULLY';
     } else {
         $string = 'COM_VIRTUEMART_MAIL_NOT_SEND_SUCCESSFULLY';
     }
     $mainframe->enqueueMessage(tsmText::_($string));
     // Display it all
     $view = $this->getView('vendor', 'html');
     $view->setLayout('mail_confirmed');
     $view->display();
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:61,代码来源:vendor.php


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