當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Globals::hasPostEntry方法代碼示例

本文整理匯總了PHP中Globals::hasPostEntry方法的典型用法代碼示例。如果您正苦於以下問題:PHP Globals::hasPostEntry方法的具體用法?PHP Globals::hasPostEntry怎麽用?PHP Globals::hasPostEntry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Globals的用法示例。


在下文中一共展示了Globals::hasPostEntry方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * @category  PayIntelligent
 * @package   ratepay
 * @copyright (C) 2012 PayIntelligent GmbH  <http://www.payintelligent.de/>
 * @license   GPLv2
 */
/**
 * RatePAY order script calls the right controller action for RatePAY order operations
 */
require_once 'includes/application_top.php';
require_once '../includes/classes/ratepay/helpers/Data.php';
require_once '../includes/classes/ratepay/helpers/Globals.php';
require_once '../includes/classes/ratepay/controllers/OrderController.php';
if (Globals::hasPostEntry('order_number')) {
    if (Globals::hasPostEntry('ship')) {
        OrderController::deliverAction();
    } elseif (Globals::hasPostEntry('cancel')) {
        OrderController::cancelAction();
    } elseif (Globals::hasPostEntry('refund')) {
        OrderController::refundAction();
    } elseif (Globals::hasPostEntry('credit')) {
        OrderController::creditAction();
    } else {
        die('Operation not found!');
    }
} else {
    die('Missing post param "order_number"!');
}
開發者ID:ratepay,項目名稱:oscommerce-module,代碼行數:31,代碼來源:ratepay_order_script.php

示例2:

 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, version 2, as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * @category  PayIntelligent
 * @package   ratepay
 * @copyright (C) 2012 PayIntelligent GmbH  <http://www.payintelligent.de/>
 * @license   GPLv2
 */
/**
 * Delete logging script
 */
require_once 'includes/application_top.php';
require_once '../includes/classes/ratepay/helpers/Data.php';
require_once '../includes/classes/ratepay/helpers/Globals.php';
if (Globals::hasPostEntry('submit')) {
    $days = Globals::getPostEntry('days');
    if (preg_match("/^[0-9]{1,2}\$/", $days)) {
        if ($days == 0) {
            tep_db_query("delete from ratepay_log");
        } else {
            tep_db_query("DELETE FROM ratepay_log WHERE TO_DAYS(now()) - TO_DAYS(date) > " . (int) $days);
        }
    }
}
tep_redirect(tep_href_link('ratepay_logging.php', 'success=1', 'SSL'));
開發者ID:ratepay,項目名稱:oscommerce-module,代碼行數:31,代碼來源:delete_logging.php

示例3: pre_confirmation_check

 /**
  * Is called after checkout_payment.php is confirmed,
  * checks if all needed customer data available or 
  * redirect the customer to the checkout_payment.php
  * with a error message otherwise the user get to the
  * ratepay terms page
  * 
  * @global order $order
  */
 public function pre_confirmation_check()
 {
     global $order;
     if (!$this->isInfoVisited()) {
         if ($this->_isPhoneNeeded()) {
             if (Globals::hasPostEntry($this->code . '_phone') && !Data::betterEmpty(Globals::getPostEntry($this->code . '_phone'))) {
                 $phone = Globals::getPostEntry($this->code . '_phone');
                 if ($this->_isPhoneValid($phone)) {
                     Db::setXtCustomerEntry(Session::getSessionEntry('customer_id'), 'customers_telephone', $phone);
                     $order->customer['telephone'] = $phone;
                 } else {
                     $this->error['PHONE'] = 'INVALID';
                 }
             } else {
                 $this->error['PHONE'] = 'MISSING';
             }
         }
         if ($this->_isDobNeeded()) {
             if (Globals::hasPostEntry($this->code . '_birthdate') && !Data::betterEmpty(Globals::getPostEntry($this->code . '_birthdate'))) {
                 $dob = Globals::getPostEntry($this->code . '_birthdate');
                 if (!$this->_isDobValid($dob)) {
                     $this->error['DOB'] = 'INVALID';
                 } elseif (!$this->_isAdult($dob)) {
                     $this->error['DOB'] = 'YOUNGER';
                 } else {
                     $dobArr = explode('.', $dob);
                     $dateStr = $dobArr[2] . "-" . $dobArr[1] . "-" . $dobArr[0] . " 00:00:00";
                     Db::setXtCustomerEntry(Session::getSessionEntry('customer_id'), 'customers_dob', $dateStr);
                 }
             } else {
                 $this->error['DOB'] = 'MISSING';
             }
         }
         if ($this->_isCompanyNeeded()) {
             if (Globals::hasPostEntry($this->code . '_company') && !Data::betterEmpty(Globals::getPostEntry($this->code . '_company'))) {
                 $company = Globals::getPostEntry($this->code . '_company');
                 $order->customer['company'] = $company;
                 $order->billing['company'] = $company;
                 $dbInput = tep_db_input(Db::getXtCustomerEntry(Session::getSessionEntry('customer_id'), 'customers_default_address_id'));
                 tep_db_query("UPDATE " . TABLE_ADDRESS_BOOK . " " . "SET entry_company = '" . tep_db_prepare_input($company) . "' " . "WHERE address_book_id = '" . $dbInput . "'");
             } else {
                 $this->error['VATID'] = 'MISSING';
             }
         }
         if ($this->_isVatIdNeeded()) {
             if (Globals::hasPostEntry($this->code . '_vatid') && !Data::betterEmpty(Globals::getPostEntry($this->code . '_vatid'))) {
                 Db::setXtCustomerEntry(Session::getSessionEntry('customer_id'), 'customers_vat_id', Globals::getPostEntry($this->code . '_vatid'));
             } else {
                 $this->error['VATID'] = 'MISSING';
             }
         }
         if (empty($this->error)) {
             $this->setInfoVisited(true);
             Session::setRpSessionEntry('basketAmount', Data::getBasketAmount($order));
             //$url = tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL');
             $url = tep_href_link($this->_getNextStepPayment(), '', 'SSL');
         } else {
             $this->error = urlencode($this->_getErrorString($this->error));
             $url = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $this->error, 'SSL');
         }
         tep_redirect($url);
     }
 }
開發者ID:ratepay,項目名稱:oscommerce-module,代碼行數:72,代碼來源:ratepay_abstract.php


注:本文中的Globals::hasPostEntry方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。