本文整理汇总了PHP中vRequest::getGet方法的典型用法代码示例。如果您正苦于以下问题:PHP vRequest::getGet方法的具体用法?PHP vRequest::getGet怎么用?PHP vRequest::getGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vRequest
的用法示例。
在下文中一共展示了vRequest::getGet方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plgVmOnPaymentNotification
/**
* plgVmOnPaymentNotification() -It can be used to validate the payment data as entered by the user.
* Return:
* Parameters:
* None
* @author Valerie Isaksen
*/
function plgVmOnPaymentNotification()
{
if (!class_exists('VirtueMartModelOrders')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'orders.php';
}
$po = vRequest::getString('po', '');
if (!$po) {
return;
}
$retourParams = $this->getRetourParams($po);
$virtuemart_paymentmethod_id = $retourParams['virtuemart_paymentmethod_id'];
$order_number = $retourParams['order_number'];
$context = $retourParams['context'];
$this->_currentMethod = $this->getVmPluginMethod($virtuemart_paymentmethod_id);
if (!$this->selectedThisElement($this->_currentMethod->payment_element)) {
//$this->debugLog('Not this one', 'selectedThisElement', 'debug', false);
return;
}
$this->debugLog(var_export($retourParams, true), 'plgVmOnPaymentNotification getRetourParams', 'debug', false);
$interface = $this->_loadKlikandpayInterface($this);
if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
return FALSE;
}
if (!($payments = $this->getDatasByOrderId($virtuemart_order_id))) {
$this->debugLog('no payments found', 'getDatasByOrderId', 'debug', false);
return FALSE;
}
if ($payments[0]->klikandpay_custom != $context) {
$this->debugLog('Wrong context', 'plgVmOnPaymentNotification', 'debug', false);
return NULL;
}
$orderModel = VmModel::getModel('orders');
$order = $orderModel->getOrder($virtuemart_order_id);
$klikandpay_data = vRequest::getGet();
$this->debugLog(var_export($klikandpay_data, true), 'plgVmOnPaymentNotification getGet', 'debug', false);
$order_history = $this->updateOrderStatus($interface, $klikandpay_data, $order, $payments);
$this->emptyCart($payments[0]->klikandpay_custom, $order['details']['BT']->order_number);
$this->setEmptyCartDone($payments[0]);
return TRUE;
}
示例2: jPrice
static function jPrice()
{
if (!VmConfig::get('jprice', TRUE) and !self::isAdmin()) {
return FALSE;
}
static $jPrice;
// If exist exit
if ($jPrice) {
return;
}
vmJsApi::jQuery();
VmConfig::loadJLang('com_virtuemart', true);
vmJsApi::jSite();
if (VmConfig::get('addtocart_popup', 1)) {
self::loadPopUpLib();
}
vmJsApi::addJScript('vmprices', false, false);
//Fallbacks!
$jsVars = "";
$jsVars .= "vmSiteurl = '" . JURI::root() . "' ;\n";
$jsVars .= 'vmLang = "&lang=' . VmConfig::$vmlangSef . '";' . "\n";
$jsVars .= 'vmLangTag = "' . VmConfig::$vmlangSef . '";' . "\n";
$Get = vRequest::getGet();
if (!empty($Get['Itemid'])) {
$jsVars .= "Itemid = '&Itemid=" . (int) $Get['Itemid'] . "';\n";
} else {
$jsVars .= 'Itemid = "";' . "\n";
}
$onReady = $jsVars . 'jQuery(document).ready(function($) {
Virtuemart.addtocart_popup = "' . VmConfig::get('addtocart_popup', 1) . '"' . " ; \n" . '
Virtuemart.product(jQuery("form.product"));
});';
vmJsApi::addJScript('ready.vmprices', $onReady);
$jPrice = TRUE;
return TRUE;
}
示例3: getOrderByList
/**
* Get the Order By Select List
*
* notice by Max Milbers html tags should never be in a model. This function should be moved to a helper or simular,...
*
* @author Kohl Patrick
* @access public
* @param $fieds from config Back-end
* @return $orderByList
* Order,order By, manufacturer and category link List to echo Out
**/
function getOrderByList($virtuemart_category_id = FALSE)
{
$getArray = vRequest::getGet();
$fieldLink = '';
foreach ($getArray as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
if ($v == '') {
continue;
}
$fieldLink .= '&' . urlencode($key) . '[' . urlencode($k) . ']' . '=' . urlencode($v);
}
} else {
if ($key == 'dir' or $key == 'orderby') {
continue;
}
if ($value == '') {
continue;
}
$fieldLink .= '&' . urlencode($key) . '=' . urlencode($value);
}
}
$fieldLink = 'index.php?' . ltrim($fieldLink, '&');
$orderDirLink = '';
$orderDirConf = VmConfig::get('prd_brws_orderby_dir');
$orderDir = vRequest::getCmd('dir', $orderDirConf);
if ($orderDir != $orderDirConf) {
$orderDirLink .= '&dir=' . $orderDir;
//was '&order='
}
$orderbyTxt = '';
$orderby = vRequest::getString('orderby', VmConfig::get('browse_orderby_field'));
$orderby = $this->checkFilterOrder($orderby);
$orderbyCfg = VmConfig::get('browse_orderby_field');
if ($orderby != $orderbyCfg) {
$orderbyTxt = '&orderby=' . $orderby;
}
$manufacturerTxt = '';
$manufacturerLink = '';
if (VmConfig::get('show_manufacturers')) {
$manuM = VmModel::getModel('manufacturer');
vmSetStartTime('mcaching');
$mlang = (!VmConfig::get('prodOnlyWLang', false) and VmConfig::$defaultLang != VmConfig::$vmlang and Vmconfig::$langCount > 1);
if (true) {
$cache = JFactory::getCache('com_virtuemart_cat_manus', 'callback');
$cache->setCaching(true);
$manufacturers = $cache->call(array('VirtueMartModelManufacturer', 'getManufacturersOfProductsInCategory'), $virtuemart_category_id, VmConfig::$vmlang, $mlang);
vmTime('Manufacturers by Cache', 'mcaching');
} else {
$manufacturers = $manuM->getManufacturersOfProductsInCategory($virtuemart_category_id, VmConfig::$vmlang, $mlang);
vmTime('Manufacturers by function', 'mcaching');
}
// manufacturer link list
$manufacturerLink = '';
$virtuemart_manufacturer_id = vRequest::getInt('virtuemart_manufacturer_id', '');
if ($virtuemart_manufacturer_id != '') {
$manufacturerTxt = '&virtuemart_manufacturer_id=' . $virtuemart_manufacturer_id;
}
if (count($manufacturers) > 0) {
$manufacturerLink = '<div class="orderlist">';
if ($virtuemart_manufacturer_id > 0) {
$allLink = str_replace($manufacturerTxt, $fieldLink, '');
$allLink .= '&virtuemart_manufacturer_id=0';
$manufacturerLink .= '<div><a title="" href="' . JRoute::_($allLink . $orderbyTxt . $orderDirLink, FALSE) . '">' . vmText::_('COM_VIRTUEMART_SEARCH_SELECT_ALL_MANUFACTURER') . '</a></div>';
}
if (count($manufacturers) > 1) {
foreach ($manufacturers as $mf) {
$link = JRoute::_($fieldLink . '&virtuemart_manufacturer_id=' . $mf->virtuemart_manufacturer_id . $orderbyTxt . $orderDirLink, FALSE);
if ($mf->virtuemart_manufacturer_id != $virtuemart_manufacturer_id) {
$manufacturerLink .= '<div><a title="' . $mf->mf_name . '" href="' . $link . '">' . $mf->mf_name . '</a></div>';
} else {
$currentManufacturerLink = '<div class="title">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . '</div><div class="activeOrder">' . $mf->mf_name . '</div>';
}
}
} elseif ($virtuemart_manufacturer_id > 0) {
$currentManufacturerLink = '<div class="title">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . '</div><div class="activeOrder">' . $manufacturers[0]->mf_name . '</div>';
} else {
$currentManufacturerLink = '<div class="title">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . '</div><div class="Order"> ' . $manufacturers[0]->mf_name . '</div>';
}
$manufacturerLink .= '</div>';
}
}
/* order by link list*/
$orderByLink = '';
$fields = VmConfig::get('browse_orderby_fields');
if (count($fields) > 1) {
$orderByLink = '<div class="orderlist">';
foreach ($fields as $field) {
if ($field != $orderby) {
//.........这里部分代码省略.........
示例4: jPrice
static function jPrice()
{
if (!VmConfig::get('jprice', TRUE) and !self::isAdmin()) {
return FALSE;
}
static $jPrice;
// If exist exit
if ($jPrice) {
return;
}
vmJsApi::jQuery();
VmConfig::loadJLang('com_virtuemart', true);
vmJsApi::jSite();
$jsVars = "";
$jsVars .= "vmSiteurl = '" . JURI::root() . "' ;\n";
$jsVars .= 'vmLang = "&lang=' . VmConfig::$vmlangSef . '";' . "\n";
$jsVars .= 'vmLangTag = "' . VmConfig::$vmlangSef . '";' . "\n";
$Get = vRequest::getGet();
if (!empty($Get['Itemid'])) {
$jsVars .= "Itemid = '&Itemid=" . (int) $Get['Itemid'] . "';\n";
} else {
$jsVars .= 'Itemid = "";' . "\n";
}
if (VmConfig::get('addtocart_popup', 1)) {
$jsVars .= "Virtuemart.addtocart_popup = '" . VmConfig::get('addtocart_popup', 1) . "' ; \n";
if (VmConfig::get('usefancy', 1)) {
$jsVars .= "usefancy = true;";
vmJsApi::addJScript('fancybox/jquery.fancybox-1.3.4.pack', false);
vmJsApi::css('jquery.fancybox-1.3.4');
} else {
//This is just there for the backward compatibility
$jsVars .= "vmCartText = '" . addslashes(vmText::_('COM_VIRTUEMART_CART_PRODUCT_ADDED')) . "' ;\n";
$jsVars .= "vmCartError = '" . addslashes(vmText::_('COM_VIRTUEMART_MINICART_ERROR_JS')) . "' ;\n";
//This is necessary though and should not be removed without rethinking the whole construction
$jsVars .= "usefancy = false;";
vmJsApi::addJScript('facebox');
vmJsApi::css('facebox');
}
}
self::addJScript('jsVars', $jsVars);
vmJsApi::addJScript('vmprices', false, false);
$onReady = 'jQuery(document).ready(function($) {
Virtuemart.product(jQuery("form.product"));
/*$("form.js-recalculate").each(function(){
if ($(this).find(".product-fields").length && !$(this).find(".no-vm-bind").length) {
var id= $(this).find(\'input[name="virtuemart_product_id[]"]\').val();
Virtuemart.setproducttype($(this),id);
}
});*/
});';
vmJsApi::addJScript('ready.vmprices', $onReady);
$jPrice = TRUE;
return TRUE;
}
示例5: getLimitBox
function getLimitBox($sequence = 0)
{
$app = JFactory::getApplication();
// Initialize variables
$limits = array();
$selected = $this->limit;
// Build the select list
if ($app->isAdmin()) {
if (empty($sequence)) {
$sequence = tsmConfig::get('pagseq', 0);
}
if (!empty($sequence)) {
$sequenceArray = explode(',', $sequence);
if (count($sequenceArray > 1)) {
foreach ($sequenceArray as $items) {
$limits[$items] = JHtml::_('select.option', $items);
}
}
}
if (empty($limits)) {
$limits[15] = JHtml::_('select.option', 15);
$limits[30] = JHtml::_('select.option', 30);
$limits[50] = JHtml::_('select.option', 50);
$limits[100] = JHtml::_('select.option', 100);
$limits[200] = JHtml::_('select.option', 200);
$limits[400] = JHtml::_('select.option', 400);
$limits[600] = JHtml::_('select.option', 600);
$limits[800] = JHtml::_('select.option', 700);
$limits[1000] = JHtml::_('select.option', 1000);
$limits[1200] = JHtml::_('select.option', 1200);
$limits[1400] = JHtml::_('select.option', 1400);
}
if (!array_key_exists($this->limit, $limits)) {
$limits[$this->limit] = JHtml::_('select.option', $this->limit);
ksort($limits);
}
$all = new stdClass();
$all->value = 0;
$all->text = 'all';
//$limits['all']=$all;
$namespace = 'Joomla.';
$html = JHtml::_('select.genericlist', $limits, 'limit', 'class="inputbox" size="1" onchange="' . $namespace . 'submitform();"', 'value', 'text', $selected);
} else {
$getArray = vRequest::getGet();
$link = '';
unset($getArray['limit']);
foreach ($getArray as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$link .= '&' . urlencode($key) . '[' . urlencode($k) . ']' . '=' . urlencode($v);
}
} else {
$link .= '&' . urlencode($key) . '=' . urlencode($value);
}
}
$link = 'index.php?' . ltrim($link, '&');
if (empty($sequence)) {
$sequence = tsmConfig::get('pagseq_' . $this->_perRow);
}
if (!empty($sequence)) {
$sequenceArray = explode(',', $sequence);
if (count($sequenceArray > 1)) {
foreach ($sequenceArray as $items) {
$limits[$items] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $items, false), $items);
}
}
}
if (empty($limits) or !is_array($limits)) {
if ($this->_perRow === 1) {
$this->_perRow = 5;
}
$limits[$this->_perRow * 5] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 5, false), $this->_perRow * 5);
$limits[$this->_perRow * 10] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 10, false), $this->_perRow * 10);
$limits[$this->_perRow * 20] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 20, false), $this->_perRow * 20);
$limits[$this->_perRow * 50] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 50, false), $this->_perRow * 50);
}
if (!array_key_exists($this->limit, $limits)) {
$limits[$this->limit] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->limit, false), $this->limit);
ksort($limits);
}
$selected = JRoute::_($link . '&limit=' . $selected, false);
$js = 'onchange="window.top.location.href=this.options[this.selectedIndex].value"';
$html = JHtml::_('select.genericlist', $limits, '', 'class="inputbox" size="1" ' . $js, 'value', 'text', $selected);
}
return $html;
}
示例6: plgVmOnPaymentResponseReceived
function plgVmOnPaymentResponseReceived(&$html)
{
if (!class_exists('VirtueMartCart')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
}
if (!class_exists('shopFunctionsF')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
if (!class_exists('VirtueMartModelOrders')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'orders.php';
}
VmConfig::loadJLang('com_virtuemart_orders', TRUE);
$virtuemart_paymentmethod_id = vRequest::getInt('pm', 0);
if (!($this->_currentMethod = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {
return NULL;
// Another method was selected, do nothing
}
if (!$this->selectedThisElement($this->_currentMethod->payment_element)) {
return NULL;
}
$paybox_data = vRequest::getGet();
$this->debugLog('"<pre>plgVmOnPaymentResponseReceived :' . var_export($paybox_data, true) . "</pre>", 'debug');
$payboxInterface = $this->_loadPayboxInterface($this);
$html = $payboxInterface->paymentResponseReceived($paybox_data);
vRequest::setVar('display_title', false);
vRequest::setVar('html', $html);
return true;
}
示例7: getOrderByList
/**
* Get the Order By Select List
*
* notice by Max Milbers html tags should never be in a model. This function should be moved to a helper or simular,...
*
* @author Kohl Patrick
* @access public
* @param $fieds from config Back-end
* @return $orderByList
* Order,order By, manufacturer and category link List to echo Out
**/
function getOrderByList($virtuemart_category_id = FALSE)
{
$getArray = vRequest::getGet();
$fieldLink = '';
foreach ($getArray as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
if (empty($v)) {
continue;
}
$fieldLink .= '&' . $key . '[' . $k . ']' . '=' . $v;
}
} else {
if ($key == 'dir' or $key == 'orderby') {
continue;
}
if (empty($value)) {
continue;
}
$fieldLink .= '&' . $key . '=' . $value;
}
}
$fieldLink[0] = "?";
$fieldLink = 'index.php' . $fieldLink;
vmdebug('my field link ', $fieldLink);
$orderDirLink = '';
$orderDirConf = VmConfig::get('prd_brws_orderby_dir');
$orderDir = vRequest::getCmd('dir', $orderDirConf);
if ($orderDir != $orderDirConf) {
$orderDirLink .= '&dir=' . $orderDir;
//was '&order='
}
$orderbyTxt = '';
$orderby = vRequest::getString('orderby', VmConfig::get('browse_orderby_field'));
$orderby = $this->checkFilterOrder($orderby);
$orderbyCfg = VmConfig::get('browse_orderby_field');
if ($orderby != $orderbyCfg) {
$orderbyTxt = '&orderby=' . $orderby;
}
$manufacturerTxt = '';
$manufacturerLink = '';
if (VmConfig::get('show_manufacturers')) {
// manufacturer link list
$virtuemart_manufacturer_id = vRequest::getInt('virtuemart_manufacturer_id', '');
if ($virtuemart_manufacturer_id != '') {
$manufacturerTxt = '&virtuemart_manufacturer_id=' . $virtuemart_manufacturer_id;
}
// if ($mf_virtuemart_product_ids) {
$query = 'SELECT DISTINCT l.`mf_name`,l.`virtuemart_manufacturer_id` FROM `#__virtuemart_manufacturers_' . VmConfig::$vmlang . '` as l';
$query .= ' JOIN `#__virtuemart_product_manufacturers` AS pm using (`virtuemart_manufacturer_id`)';
$query .= ' LEFT JOIN `#__virtuemart_products` as p ON p.`virtuemart_product_id` = pm.`virtuemart_product_id` ';
$query .= ' LEFT JOIN `#__virtuemart_product_categories` as c ON c.`virtuemart_product_id` = pm.`virtuemart_product_id` ';
$query .= ' WHERE p.`published` =1';
if ($virtuemart_category_id) {
$query .= ' AND c.`virtuemart_category_id` =' . (int) $virtuemart_category_id;
}
$query .= ' ORDER BY l.`mf_name`';
$this->_db->setQuery($query);
$manufacturers = $this->_db->loadObjectList();
// vmdebug('my manufacturers',$this->_db->getQuery());
$manufacturerLink = '';
if (count($manufacturers) > 0) {
$manufacturerLink = '<div class="orderlist">';
if ($virtuemart_manufacturer_id > 0) {
$allLink = str_replace($manufacturerTxt, $fieldLink, '');
$allLink .= '&virtuemart_manufacturer_id=0';
$manufacturerLink .= '<div><a title="" href="' . JRoute::_($allLink . $orderbyTxt . $orderDirLink, FALSE) . '">' . vmText::_('COM_VIRTUEMART_SEARCH_SELECT_ALL_MANUFACTURER') . '</a></div>';
}
if (count($manufacturers) > 1) {
foreach ($manufacturers as $mf) {
$link = JRoute::_($fieldLink . '&virtuemart_manufacturer_id=' . $mf->virtuemart_manufacturer_id . $orderbyTxt . $orderDirLink, FALSE);
if ($mf->virtuemart_manufacturer_id != $virtuemart_manufacturer_id) {
$manufacturerLink .= '<div><a title="' . $mf->mf_name . '" href="' . $link . '">' . $mf->mf_name . '</a></div>';
} else {
$currentManufacturerLink = '<div class="title">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . '</div><div class="activeOrder">' . $mf->mf_name . '</div>';
}
}
} elseif ($virtuemart_manufacturer_id > 0) {
$currentManufacturerLink = '<div class="title">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . '</div><div class="activeOrder">' . $manufacturers[0]->mf_name . '</div>';
} else {
$currentManufacturerLink = '<div class="title">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . '</div><div class="Order"> ' . $manufacturers[0]->mf_name . '</div>';
}
$manufacturerLink .= '</div>';
}
// }
}
/* order by link list*/
$orderByLink = '';
$fields = VmConfig::get('browse_orderby_fields');
//.........这里部分代码省略.........