• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: move

 /**
  * swap the ordering of a record in the Xref tables
  * @param  $direction , 1/-1 The increment to reorder by
  */
 function move($direction, $where = '', $orderingkey = 0)
 {
     if (empty($this->_skey)) {
         vmError('No secondary keys defined in VmTableXarray ' . $this->_tbl);
         return false;
     }
     $skeyId = vRequest::getInt($this->_skey, 0);
     // Initialize variables
     $db = JFactory::getDBO();
     $cid = vRequest::getInt($this->_pkey);
     $order = vRequest::getInt('order');
     //I found now two times "order" instead of ordering.
     //This sql is broken
     $query = 'SELECT `id` FROM `' . $this->_tbl . '` WHERE ' . $this->_pkey . ' = ' . (int) $cid[0] . ' AND `tsmart_category_id` = ' . (int) $skeyId;
     $db->setQuery($query);
     $id = $db->loadResult();
     $keys = array_keys($order);
     // TODO next 2 lines not used ????
     if ($direction > 0) {
         $idToSwap = $order[$keys[array_search($id, $keys)] + 1];
     } else {
         $idToSwap = $order[$keys[array_search($id, $keys)] - 1];
     }
     if (isset($cid[0])) {
         $query = 'UPDATE `' . $this->_tbl . '` ' . ' SET `' . $this->_orderingKey . '` = `' . $this->_orderingKey . '` + ' . $direction . ' WHERE `' . $this->_pkey . '` = ' . (int) $cid[0] . ' AND `' . $this->_skey . '`  = ' . (int) $skeyId;
         $db->setQuery($query);
         if (!$db->execute()) {
             $err = $db->getErrorMsg();
             JError::raiseError(500, get_class($this) . ':: move ' . $err);
         }
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:36,代码来源:tsmtablexarray.php


示例2: display

 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = tmsModel::getModel();
     $this->setLayout('default');
     $config = JFactory::getConfig();
     $layoutName = vRequest::getCmd('layout', 'default');
     JToolBarHelper::publishList();
     JToolBarHelper::unpublishList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::deleteList();
     $this->SetViewTitle();
     $this->addStandardDefaultViewLists($model, 0, 'ASC');
     $this->items = $model->getItemList(vRequest::getCmd('search', false));
     $this->pagination = $model->getPagination();
     $cid = vRequest::getInt('cid');
     $model->setId($cid);
     $this->item = $model->getItem();
     $this->SetViewTitle('', $this->item->title);
     parent::display($tpl);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:25,代码来源:view.html.php


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


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


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


示例6: updateOrderItems

 function updateOrderItems()
 {
     vRequest::vmCheckToken();
     $model = VmModel::getModel('report');
     $model->updateOrderItems();
     $this->setRedirect($this->redirectPath, 'Order Items updated');
 }
开发者ID:lenard112,项目名称:cms,代码行数:7,代码来源:report.php


示例7: display

 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $config = JFactory::getConfig();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $cid = vRequest::getInt('cid');
         $task = vRequest::getCmd('task', 'add');
         if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
             $cid = (int) $cid[0];
         } else {
             $cid = 0;
         }
         $model->setId($cid);
         $currency = $model->getCurrency();
         $this->SetViewTitle('', $currency->currency_name);
         $this->assignRef('currency', $currency);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, 0, 'ASC');
         $currencies = $model->getCurrenciesList(vRequest::getCmd('search', false));
         $this->assignRef('currencies', $currencies);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:lenard112,项目名称:cms,代码行数:33,代码来源:view.html.php


示例8: save

 function save($data = 0)
 {
     $fileModel = VmModel::getModel('media');
     //Now we try to determine to which this media should be long to
     $data = array_merge(vRequest::getRequest(), vRequest::get('media'));
     //$data['file_title'] = vRequest::getVar('file_title','','post','STRING',JREQUEST_ALLOWHTML);
     if (!empty($data['file_description'])) {
         $data['file_description'] = JComponentHelper::filterText($data['file_description']);
         //vRequest::filter(); vRequest::getHtml('file_description','');
     }
     /*$data['media_action'] = vRequest::getCmd('media[media_action]');
     		$data['media_attributes'] = vRequest::getCmd('media[media_attributes]');
     		$data['file_type'] = vRequest::getCmd('media[file_type]');*/
     if (empty($data['file_type'])) {
         $data['file_type'] = $data['media_attributes'];
     }
     $msg = '';
     if ($id = $fileModel->store($data)) {
         $msg = vmText::_('COM_VIRTUEMART_FILE_SAVED_SUCCESS');
     }
     $cmd = vRequest::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:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:28,代码来源:media.php


示例9: display

 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $this->vendorId = VmConfig::isSuperVendor();
     // TODO add icon for media view
     $this->SetViewTitle();
     $model = VmModel::getModel('media');
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $this->media = $model->getFile();
         $this->addStandardEditViewCommands();
     } else {
         $virtuemart_product_id = vRequest::getInt('virtuemart_product_id');
         if (is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0) {
             $virtuemart_product_id = (int) $virtuemart_product_id[0];
         } else {
             $virtuemart_product_id = (int) $virtuemart_product_id;
         }
         $cat_id = vRequest::getInt('virtuemart_category_id', 0);
         JToolBarHelper::custom('synchronizeMedia', 'new', 'new', vmText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => vmText::_('COM_VIRTUEMART_PRODUCT'), 'category' => vmText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => vmText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => vmText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', vRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $this->files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:33,代码来源:view.html.php


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


示例11: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(VMPATH_ADMIN . DS . 'helpers');
     if (!class_exists('vmPSPlugin')) {
         require VMPATH_PLUGINLIBS . DS . 'vmpsplugin.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = vRequest::getCmd('layout', 'default');
     $this->SetViewTitle();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         VmConfig::loadJLang('plg_vmpsplugin', false);
         JForm::addFieldPath(VMPATH_ADMIN . DS . 'fields');
         $shipment = $model->getShipment();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmshipment' . DS . $shipment->shipment_element . DS . $shipment->shipment_element . '.xml');
         if (file_exists($formFile)) {
             $shipment->form = JForm::getInstance($shipment->shipment_element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $shipment->params = new stdClass();
             $varsToPush = vmPlugin::getVarsToPushFromForm($shipment->form);
             VmTable::bindParameterableToSubField($shipment, $varsToPush);
             $shipment->form->bind($shipment->getProperties());
         } else {
             $shipment->form = null;
         }
         if (!class_exists('VmImage')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('VirtueMartModelVendor')) {
             require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->assignRef('vendor_currency', $currency->currency_symbol);
         if ($this->showVendors()) {
             $vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->pluginList = self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id);
         $this->assignRef('shipment', $shipment);
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true);
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         JToolBarHelper::custom('cloneshipment', 'copy', 'copy', vmText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $this->shipments = $model->getShipments();
         VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
         foreach ($this->shipments as &$data) {
             // Write the first 5 shoppergroups in the list
             $data->shipmentShoppersList = shopfunctions::renderGuiList($data->virtuemart_shoppergroup_ids, 'shoppergroups', 'shopper_group_name', 'shopper');
         }
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:60,代码来源:view.html.php


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


示例13: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     $cid = vRequest::getvar('cid', NULL, 'array');
     if (is_Array($cid)) {
         $virtuemart_paymentmethod_id = $cid[0];
     } else {
         $virtuemart_paymentmethod_id = $cid;
     }
     $http = JURI::root() . 'index.php?option=com_virtuemart&view=vmplg&task=notify&nt=ipn&tmpl=component&pm=' . $virtuemart_paymentmethod_id;
     $https = str_replace('http://', 'https://', $http);
     $class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"';
     if ($node->attributes('editable') == 'true') {
         $size = $node->attributes('size') ? 'size="' . $node->attributes('size') . '"' : '';
         return '<input type="text" name="' . $control_name . '[' . $name . ']" id="' . $control_name . $name . '" value="' . $value . '" ' . $class . ' ' . $size . ' />';
     } else {
         $string = "<div " . $class . ">";
         $string .= '<div class="ipn-sandbox">' . $http . ' <br /></div>';
         if (strcmp($https, $http) !== 0) {
             $string .= '<div class="ipn-sandbox">' . vmText::_('VMPAYMENT_AMAZON_OR') . '<br /></div>';
             $string .= $https;
             $string .= "</div>";
         }
         return $string;
     }
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:25,代码来源:ipnurl.php


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


示例15: disableDangerousTools

	/**
	 *
	 * Task for disabling dangerous database tools, used after install
	 * @author Max Milbers
	 */
	public function disableDangerousTools(){

		$data = vRequest::getRequest();
		$config = VmModel::getInstance('config', 'VirtueMartModel');
		$config->setDangerousToolsOff();
		$this->display();
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:12,代码来源:virtuemart.php


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


示例17: display

 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = $this->getLayout();
     $task = vRequest::getCmd('task', $layoutName);
     $this->assignRef('task', $task);
     if ($layoutName == 'edit') {
         //For shoppergroup specific price display
         VmConfig::loadJLang('com_virtuemart_config');
         VmConfig::loadJLang('com_virtuemart_shoppers', true);
         $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();
         $showVendors = $this->showVendors();
         $this->assignRef('showVendors', $showVendors);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shoppergroups = $model->getShopperGroups(false, true);
         $this->assignRef('shoppergroups', $shoppergroups);
         $pagination = $model->getPagination();
         $this->assignRef('sgrppagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:33,代码来源:view.html.php


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


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


示例20: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->setMimeEncoding('application/json');
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
         $model = VmModel::getModel('Media');
         $image = $model->createMediaByIds($virtuemart_media_id);
         // 			echo '<pre>'.print_r($image,1).'</pre>';
         $this->json = $image[0];
         //echo json_encode($this->json);
         if (isset($this->json->file_url)) {
             $this->json->file_root = JURI::root(true) . '/';
             $this->json->msg = 'OK';
             echo @json_encode($this->json);
         } else {
             $this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo @json_encode($this->json);
         }
     } else {
         if (!class_exists('VmMediaHandler')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
         }
         $start = vRequest::getInt('start', 0);
         $type = vRequest::getCmd('mediatype', 0);
         $list = VmMediaHandler::displayImages($type, $start);
         echo @json_encode($list);
     }
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:30,代码来源:view.json.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP valid类代码示例发布时间:2022-05-23
下一篇:
PHP vCal类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap