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


PHP vRequest::getWord方法代码示例

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


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

示例1: getInput

 protected function getInput()
 {
     $lang = JFactory::getLanguage();
     $lang->load('com_virtuemart', JPATH_ADMINISTRATOR);
     $option = vRequest::getWord('option');
     if ($option == 'com_virtuemart') {
         return null;
     } else {
         return JText::_('COM_VIRTUEMART_PLUGIN_WARNING');
     }
 }
开发者ID:rurikhero,项目名称:PagSeguro-VirtueMart-3,代码行数:11,代码来源:vmjpluginwarning.php

示例2: plgVmOnSelfCallBE

 /**
  * @param $type
  * @param $name
  * @param $render
  */
 function plgVmOnSelfCallBE($type, $name, &$render)
 {
     if ($name != $this->_name || $type != 'vmpayment') {
         return FALSE;
     }
     // fetches PClasses From XML file
     $call = vRequest::getWord('call');
     $this->{$call}();
     // 	jexit();
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:15,代码来源:klarnacheckout.php

示例3: store

 /**
  * Bind the post data to the JUser object and the VM tables, then saves it
  * It is used to register new users
  * This function can also change already registered users, this is important when a registered user changes his email within the checkout.
  *
  * @author Max Milbers
  * @author Oscar van Eijk
  * @return boolean True is the save was successful, false otherwise.
  */
 public function store(&$data)
 {
     $message = '';
     vRequest::vmCheckToken('Invalid Token, while trying to save user');
     if (empty($data)) {
         vmError('Developer notice, no data to store for user');
         return false;
     }
     //To find out, if we have to register a new user, we take a look on the id of the usermodel object.
     //The constructor sets automatically the right id.
     $new = false;
     if (empty($this->_id) or $this->_id < 1) {
         $new = true;
         $user = new JUser();
         //thealmega http://forum.tsmart.net/index.php?topic=99755.msg393758#msg393758
     } else {
         $cUser = JFactory::getUser();
         if (!vmAccess::manager('user.edit') and $cUser->id != $this->_id) {
             vmWarn('Insufficient permission');
             return false;
         }
         $user = JFactory::getUser($this->_id);
     }
     $gid = $user->get('gid');
     // Save original gid
     // Preformat and control user datas by plugin
     JPluginHelper::importPlugin('vmuserfield');
     $dispatcher = JDispatcher::getInstance();
     $valid = true;
     $dispatcher->trigger('plgVmOnBeforeUserfieldDataSave', array(&$valid, $this->_id, &$data, $user));
     // $valid must be false if plugin detect an error
     if (!$valid) {
         return false;
     }
     // Before I used this "if($cart && !$new)"
     // This construction is necessary, because this function is used to register a new JUser, so we need all the JUser data in $data.
     // On the other hand this function is also used just for updating JUser data, like the email for the BT address. In this case the
     // name, username, password and so on is already stored in the JUser and dont need to be entered again.
     if (empty($data['email'])) {
         $email = $user->get('email');
         if (!empty($email)) {
             $data['email'] = $email;
         }
     } else {
         $data['email'] = vRequest::getEmail('email', '');
     }
     //$data['email'] = str_replace(array('\'','"',',','%','*','/','\\','?','^','`','{','}','|','~'),array(''),$data['email']);
     //This is important, when a user changes his email address from the cart,
     //that means using view user layout edit_address (which is called from the cart)
     $user->set('email', $data['email']);
     if (empty($data['name'])) {
         $name = $user->get('name');
         if (!empty($name)) {
             $data['name'] = $name;
         }
     } else {
         $data['name'] = vRequest::getWord('name', '');
     }
     $data['name'] = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $data['name']);
     if (empty($data['username'])) {
         $username = $user->get('username');
         if (!empty($username)) {
             $data['username'] = $username;
         } else {
             $data['username'] = vRequest::getWord('username', '');
         }
     }
     if (empty($data['password'])) {
         $data['password'] = vRequest::getCmd('password', '');
         if ($data['password'] != vRequest::get('password')) {
             vmError('Password contained invalid character combination.');
             return false;
         }
     }
     if (empty($data['password2'])) {
         $data['password2'] = vRequest::getCmd('password2');
         if ($data['password2'] != vRequest::get('password2')) {
             vmError('Password2 contained invalid character combination.');
             return false;
         }
     }
     if (!$new and empty($data['password2'])) {
         unset($data['password']);
         unset($data['password2']);
     }
     if (!vmAccess::manager('core')) {
         $whiteDataToBind = array();
         if (isset($data['name'])) {
             $whiteDataToBind['name'] = $data['name'];
         }
         if (isset($data['username'])) {
//.........这里部分代码省略.........
开发者ID:cuongnd,项目名称:etravelservice,代码行数:101,代码来源:user.php

示例4: onInvalidPaymentNewAuthorization

	private function onInvalidPaymentNewAuthorization () {

		$this->loadVmClass('VirtueMartModelOrders', JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php');
		$this->loadVmClass('VirtueMartCart', JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');

		$this->_amazonOrderReferenceId = $this->getAmazonOrderReferenceIdFromSession();
		if (!$this->_amazonOrderReferenceId) {
			$this->onErrorRedirectToCart();
			return FALSE;
		}
		$retryInvalidPaymentMethod = $this->getRetryInvalidPaymentMethodFromSession();
		if ($retryInvalidPaymentMethod > 2) {
			//echo "TOO MANY RETRIES STOP";
			$this->leaveAmazonCheckout();
			$this->redirectToCart(vmText::_('VMPAYMENT_AMAZON_SELECT_ANOTHER_PAYMENT'), true);
			return;
		}
		if (!($order_number = vRequest::getWord('order_number'))) {
			$this->debugLog('no order number in submit', __FUNCTION__, 'debug');
			return true;
		}

		if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
			$this->debugLog('no getOrderIdByOrderNumber: ' . $order_number, __FUNCTION__, 'debug');
			return true;
		}
		$orderModel = VmModel::getModel('orders');
		$order = $orderModel->getOrder($virtuemart_order_id);
		$cart = VirtueMartCart::getCart();

		$html = $this->vmConfirmedOrder($cart, $order, false);
		echo $html;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:33,代码来源:amazon.php

示例5: function

 * @package VirtueMart
 * @subpackage vmpayment
 * @copyright Copyright (C) 2004-Copyright (C) 2004-2014 Virtuemart Team. All rights reserved.   - All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
 *
 * http://virtuemart.net
 */
JHtml::_('behavior.tooltip');
vmJsApi::jPrice();
static $jsSILoaded = false;
if (!$jsSILoaded) {
    $doc = JFactory::getDocument();
    $signInButton = '<div id=\\"amazonSignInButton\\"><div id=\\"payWithAmazonDiv\\" ><img src=\\"' . $viewData['buttonWidgetImageURL'] . '\\" style=\\"cursor: pointer;\\"/></div><div id=\\"amazonSignInErrorMsg\\"></div></div>';
    $doc->addScript(JURI::root(true) . '/plugins/vmpayment/amazon/assets/js/amazon.js');
    if ($viewData['include_amazon_css']) {
        $doc->addStyleSheet(JURI::root(true) . '/plugins/vmpayment/amazon/assets/css/amazon.css');
    }
    $renderAmazonAddressBook = $viewData['renderAmazonAddressBook'] ? 'true' : 'false';
    $doc->addScriptDeclaration("\n\t//<![CDATA[\njQuery(document).ready( function(\$) {\n\t\$( '" . $viewData['sign_in_css'] . "' ).append('<div class=\"amazonSignTip\">" . vmText::_('VMPAYMENT_AMAZON_SIGNIN_TIP', true) . "</div>');\n\tamazonPayment.showAmazonButton('" . $viewData['sellerId'] . "', '" . $viewData['redirect_page'] . "', " . $renderAmazonAddressBook . ");\n\t\$( '" . $viewData['sign_in_css'] . "' ).append('" . $signInButton . "');\n\t\$( '" . $viewData['sign_in_css'] . "' ).append('<div class=\"amazonSignTip\" id=\"amazonSignOr\"><span>" . vmText::_('VMPAYMENT_AMAZON_SIGNIN_OR', true) . "</span></div>');\n\n});\n//]]>\n");
    if ($viewData['layout'] == 'cart') {
        $doc->addScriptDeclaration("\n\t//<![CDATA[\njQuery(document).ready( function(\$) {\n\$('#leaveAmazonCheckout').click(function(){\n\tamazonPayment.leaveAmazonCheckout();\n\t});\n});\n//]]>\n");
        if (vRequest::getWord('view') == 'cart') {
            $doc->addScriptDeclaration("\n\n//<![CDATA[\n\tjQuery(document).ready(function(\$) {\n\tjQuery('#checkoutFormSubmit').attr('disabled', 'true');\n\tjQuery('#checkoutFormSubmit').removeClass( 'vm-button-correct' );\n\tjQuery('#checkoutFormSubmit').addClass( 'vm-button' );\n\tjQuery('#checkoutFormSubmit').text( '" . vmText::_('VMPAYMENT_AMAZON_CLICK_PAY_AMAZON', true) . "' );\n\t});\n\n//]]>\n\n");
        }
    }
}
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:31,代码来源:signin.php

示例6: getAddress

 public function getAddress()
 {
     $aSessionCalls = array();
     // Check the session for calls
     if (array_key_exists('klarna_address', $_SESSION)) {
         $sSessionCalls = base64_decode($_SESSION['klarna_address']);
         $aSessionCalls = unserialize($sSessionCalls);
     }
     $sPNO = vRequest::getWord('socialNumber');
     //vRequest::getWord('pno');
     $sCountry = strtolower(vRequest::getWord('country'));
     if (array_key_exists($sPNO, $aSessionCalls)) {
         $addrs = $aSessionCalls[$sPNO];
     } else {
         $addrs = $this->api->getAddresses($sPNO, NULL, KlarnaFlags::GA_GIVEN);
         $aSessionCalls[$sPNO] = $addrs;
         $_SESSION['klarna_address'] = base64_encode(serialize($aSessionCalls));
     }
     $sString = "<?xml version='1.0'" . "?" . ">\n";
     //eval breaks at question-mark gt
     $sString .= "<getAddress>\n";
     //This example only works for GA_GIVEN.
     foreach ($addrs as $index => $addr) {
         if ($addr->isCompany) {
             $implode = array('companyName' => $addr->getCompanyName(), 'street' => $addr->getStreet(), 'zip' => $addr->getZipCode(), 'city' => $addr->getCity(), 'countryCode' => $addr->getCountryCode());
         } else {
             $implode = array('first_name' => $addr->getFirstName(), 'last_name' => $addr->getLastName(), 'street' => $addr->getStreet(), 'zip' => $addr->getZipCode(), 'city' => $addr->getCity(), 'countryCode' => $addr->getCountryCode());
         }
         $sString .= "<address>\n";
         foreach ($implode as $key => $val) {
             $sString .= "<" . $key . ">" . Klarna::num_htmlentities($val) . "</" . $key . ">\n";
         }
         $sString .= "</address>\n";
     }
     $sString .= "</getAddress>";
     return array('type' => 'text/xml', 'value' => $sString);
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:37,代码来源:klarna_ajax.php


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