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


PHP vRequest::getUword方法代码示例

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


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

示例1: getUserList

 /**
  * Todo, works only for small stores, we need a new solution there with a bit filtering
  * For example by time, if already shopper, and a simple search
  * @return object list of users
  */
 function getUserList()
 {
     $adminID = JFactory::getSession()->get('vmAdminID', false);
     $superVendor = VmConfig::isSuperVendor($adminID);
     if ($superVendor > 1) {
         $db = JFactory::getDbo();
         $search = vRequest::getUword('usersearch', '');
         if (!empty($search)) {
             $search = 'WHERE (`name` LIKE %' . $search . '% OR `username` LIKE %' . $search . '%)';
         }
         $q = 'SELECT ju.`id`,`name`,`username` FROM `#__users` as ju';
         $q .= ' LEFT JOIN #__virtuemart_vmusers AS vmu ON vmu.virtuemart_user_id = ju.id';
         $q .= ' LEFT JOIN #__virtuemart_vendor_users AS vu ON vu.virtuemart_user_id = ju.id';
         if (!empty($search)) {
             $search .= ' AND (vu.virtuemart_vendor_id = ' . $superVendor . ' ';
         } else {
             $search = ' WHERE (vu.virtuemart_vendor_id = ' . $superVendor . ' ';
         }
         $search .= ' OR ISNULL(vu.virtuemart_vendor_id))';
         $search .= ' AND ( vmu.user_is_vendor = 0 OR ISNULL(vmu.virtuemart_vendor_id))';
         $q .= $search . ' ORDER BY `name` LIMIT 0,10000';
         $db->setQuery($q);
         $result = $db->loadObjectList();
         if ($adminID) {
             $user = JFactory::getUser($adminID);
             $toAdd = new stdClass();
             $toAdd->id = $user->id;
             $toAdd->name = $user->name;
             $toAdd->username = $user->username;
             $toAdd->displayedName = $user->name . '  ( ' . $user->username . ' )';
             array_unshift($result, $toAdd);
         }
         foreach ($result as $k => $user) {
             $result[$k]->displayedName = $user->name . '  ( ' . $user->username . ' )';
         }
     }
     return $result;
 }
开发者ID:proyectoseb,项目名称:Matrix,代码行数:43,代码来源:view.html.php

示例2: getSwitchUserList

 public function getSwitchUserList($superVendor = null, $adminID = false)
 {
     if (!isset($superVendor)) {
         $superVendor = vmAccess::isSuperVendor();
     }
     $result = false;
     if ($superVendor) {
         $db = JFactory::getDbo();
         $search = vRequest::getUword('usersearch', '');
         if (!empty($search)) {
             $search = ' WHERE (`name` LIKE "%' . $search . '%" OR `username` LIKE "%' . $search . '%" OR `customer_number` LIKE "%' . $search . '%")';
         } else {
             if ($superVendor != 1) {
                 $search = ' WHERE vu.tsmart_vendor_id = ' . $superVendor . ' ';
             }
         }
         $q = 'SELECT ju.`id`,`name`,`username` FROM `#__users` as ju';
         if ($superVendor != 1 or !empty($search)) {
             $q .= ' LEFT JOIN #__tsmart_vmusers AS vmu ON vmu.tsmart_user_id = ju.id';
             if ($superVendor != 1) {
                 $q .= ' LEFT JOIN #__tsmart_vendor_users AS vu ON vu.tsmart_user_id = ju.id';
                 $search .= ' AND ( vmu.user_is_vendor = 0 OR (vmu.tsmart_vendor_id) IS NULL)';
             }
         }
         $current = JFactory::getUser();
         $hiddenUserID = $adminID ? $adminID : $current->id;
         if (!empty($search)) {
             $search .= ' AND ju.id!= "' . $hiddenUserID . '" ';
         } else {
             $q .= ' WHERE ju.id!= "' . $hiddenUserID . '" ';
         }
         $q .= $search . ' ORDER BY `name` LIMIT 0,10000';
         $db->setQuery($q);
         $result = $db->loadObjectList();
         if ($result) {
             foreach ($result as $k => $user) {
                 $result[$k]->displayedName = $user->name . '  ( ' . $user->username . ' )';
             }
         } else {
             $result = array();
         }
         if ($adminID) {
             $user = JFactory::getUser($adminID);
             if ($current->id != $user->id) {
                 $toAdd = new stdClass();
                 $toAdd->id = $user->id;
                 $toAdd->name = $user->name;
                 $toAdd->username = $user->username;
                 $toAdd->displayedName = tsmText::sprintf('com_tsmart_RETURN_TO', $user->name, $user->username);
                 array_unshift($result, $toAdd);
             }
         }
         $toAdd = new stdClass();
         $toAdd->id = 0;
         $toAdd->name = '';
         $toAdd->username = '';
         $toAdd->displayedName = '-' . tsmText::_('com_tsmart_REGISTER') . '-';
         array_unshift($result, $toAdd);
     }
     return $result;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:61,代码来源:user.php

示例3: plgVmOnUserPaymentCancel

 function plgVmOnUserPaymentCancel()
 {
     if (!class_exists('VirtueMartModelOrders')) {
         require VMPATH_ADMIN . DS . 'models' . DS . 'orders.php';
     }
     $order_number = vRequest::getUword('on');
     if (!$order_number) {
         return FALSE;
     }
     if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
         return NULL;
     }
     if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) {
         return NULL;
     }
     $session = JFactory::getSession();
     $return_context = $session->getId();
     $field = $this->_name . '_custom';
     if (strcmp($paymentTable->{$field}, $return_context) === 0) {
         $this->handlePaymentUserCancel($virtuemart_order_id);
     }
     return TRUE;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:23,代码来源:klikandpay.php

示例4: plgVmOnUserPaymentCancel

 function plgVmOnUserPaymentCancel()
 {
     if (!class_exists('VirtueMartModelOrders')) {
         require VMPATH_ADMIN . DS . 'models' . DS . 'orders.php';
     }
     $order_number = vRequest::getUword('on');
     $virtuemart_paymentmethod_id = vRequest::getInt('pm', '');
     if (empty($order_number) or empty($virtuemart_paymentmethod_id) or !$this->selectedThisByMethodId($virtuemart_paymentmethod_id)) {
         return NULL;
     }
     $numerr = vRequest::getString('E', '');
     if ($numerr) {
         VmInfo('VMPAYMENT_' . $this->_name . '_PBX_NUMERR_' . abs($numerr));
     }
     if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
         return NULL;
     }
     if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) {
         return NULL;
     }
     $session = JFactory::getSession();
     $return_context = $session->getId();
     $field = $this->_name . '_custom';
     if (strcmp($paymentTable->{$field}, $return_context) === 0) {
         $this->handlePaymentUserCancel($virtuemart_order_id);
     }
     return TRUE;
 }
开发者ID:ForAEdesWeb,项目名称:AEW9,代码行数:28,代码来源:paybox.php

示例5: getUserList

 /**
  * Todo, works only for small stores, we need a new solution there with a bit filtering
  * For example by time, if already shopper, and a simple search
  * @return object list of users
  */
 function getUserList()
 {
     $adminID = JFactory::getSession()->get('vmAdminID', false);
     $superVendor = VmConfig::isSuperVendor($adminID);
     $result = false;
     if ($this->allowChangeShopper and $superVendor) {
         //if(!$superVendor) $superVendor = 1;
         $db = JFactory::getDbo();
         $search = vRequest::getUword('usersearch', '');
         if (!empty($search)) {
             $search = 'WHERE (`name` LIKE %' . $search . '% OR `username` LIKE %' . $search . '%)';
         }
         $q = 'SELECT ju.`id`,`name`,`username` FROM `#__users` as ju';
         $q .= ' LEFT JOIN #__virtuemart_vmusers AS vmu ON vmu.virtuemart_user_id = ju.id';
         $q .= ' LEFT JOIN #__virtuemart_vendor_users AS vu ON vu.virtuemart_user_id = ju.id';
         if (!empty($search)) {
             $search .= ' AND (vu.virtuemart_vendor_id = ' . $superVendor . ' ';
         } else {
             $search = ' WHERE (vu.virtuemart_vendor_id = ' . $superVendor . ' ';
         }
         if ($superVendor == 1) {
             $search .= ' OR (vu.virtuemart_vendor_id) IS NULL)';
         } else {
             $search .= ' )';
         }
         $search .= ' AND ( vmu.user_is_vendor = 0 OR (vmu.virtuemart_vendor_id) IS NULL)';
         $q .= $search . ' ORDER BY `name` LIMIT 0,10000';
         $db->setQuery($q);
         $result = $db->loadObjectList();
         //vmdebug('user list',$q);
         foreach ($result as $k => $user) {
             $result[$k]->displayedName = $user->name . '  ( ' . $user->username . ' )';
         }
         if ($adminID) {
             $user = JFactory::getUser($adminID);
             $toAdd = new stdClass();
             $toAdd->id = $user->id;
             $toAdd->name = $user->name;
             $toAdd->username = $user->username;
             $toAdd->displayedName = $user->name . '  ( ' . $user->username . ' )';
             array_unshift($result, $toAdd);
         }
         $toAdd = new stdClass();
         $toAdd->id = 0;
         $toAdd->name = '';
         $toAdd->username = '';
         $toAdd->displayedName = '-' . vmText::_('COM_VIRTUEMART_REGISTER') . '-';
         array_unshift($result, $toAdd);
     }
     return $result;
 }
开发者ID:jamielaff,项目名称:als_projects,代码行数:56,代码来源:view.html.php

示例6: getUserList

	/**
	 * Todo, works only for small stores, we need a new solution there with a bit filtering
	 * For example by time, if already shopper, and a simple search
	 * @return object list of users
	 */
	function getUserList() {
		$db = JFactory::getDbo();
		$search = vRequest::getUword('usersearch','');
		if(!empty($search)){
			$search = 'WHERE `name` LIKE %'.$search.'% OR `username` LIKE %'.$search.'%';
		}
		$q = 'SELECT `id`,`name`,`username` FROM `#__users` '.$search.'ORDER BY `name` LIMIT 0,10000';
		$db->setQuery($q);
		$result = $db->loadObjectList();
		foreach($result as $user) {
			$user->displayedName = $user->name .'  ( '. $user->username .' )';
		}
		return $result;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:19,代码来源:view.html.php


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