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

PHP xtc_redirect函数代码示例

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

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



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

示例1: payment_action

 function payment_action()
 {
     global $order, $insert_id;
     if (!isset($insert_id) || $insert_id == '') {
         $insert_id = $_SESSION['tmp_oID'];
     }
     $this->payone->log("(pre-)authorizing {$this->code} payment");
     $standard_parameters = parent::_standard_parameters();
     $this->personal_data = new Payone_Api_Request_Parameter_Authorization_PersonalData();
     parent::_set_customers_standard_params();
     $this->delivery_data = new Payone_Api_Request_Parameter_Authorization_DeliveryData();
     parent::_set_customers_shipping_params();
     $this->payment_method = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
     $this->payment_method->setWallettype('PPE');
     $this->payment_method->setSuccessurl((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . FILENAME_CHECKOUT_PROCESS . '?' . xtc_session_name() . '=' . xtc_session_id());
     $this->payment_method->setBackurl((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . FILENAME_CHECKOUT_PAYMENT . '?' . xtc_session_name() . '=' . xtc_session_id());
     $this->payment_method->setErrorurl((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . FILENAME_CHECKOUT_PAYMENT . '?' . xtc_session_name() . '=' . xtc_session_id() . '&payment_error=' . $this->code);
     // set order_id for deleting canceld order
     $_SESSION['tmp_payone_oID'] = $_SESSION['tmp_oID'];
     $request_parameters = parent::_request_parameters('wlt');
     $this->params = array_merge($standard_parameters, $request_parameters);
     $this->builder = new Payone_Builder($this->payone->getPayoneConfig());
     parent::_build_service_authentification('wlt');
     parent::_parse_response_payone_api();
     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:26,代码来源:payone_wlt.php


示例2: __construct

 function __construct($var)
 {
     if (!isset($_var) && !is_array($var)) {
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
     } else {
         $this->response_string = array();
         $this->response_string['response'] = $var['response'];
         $this->response_string['order_id'] = $var['order_id'];
         $this->response_string['payment_method'] = $var['payment_method'];
         $this->response_string['lang'] = $var['lang'];
         $this->response_string['controlkey'] = $var['controlkey'];
         if ($this->checkResponse()) {
             if (isset($_SESSION['cart_Masterpayment_ID']) && !empty($_SESSION['cart_Masterpayment_ID']) or substr($_SESSION['payment'], 0, strpos($_SESSION['payment'], '_')) == 'masterpayment') {
                 if ($this->response_string['response'] == 'success') {
                     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'NONSSL'));
                 } elseif ($this->response_string['response'] == 'failed') {
                     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=masterpayment_' . $this->response_string['payment_method'], 'NONSSL'));
                 } elseif ($this->response_string['response'] == 'cancelled') {
                     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
                 }
             } elseif ($this->response_string['response'] == 'success') {
                 $this->sendMail();
             }
         } else {
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
         }
     }
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:28,代码来源:MasterpaymentResponse.class.php


示例3: xtc_Security

function xtc_Security()
{
    // Cross-Site Scripting attack defense - Sent by larsneo
    // some syntax checking against injected javascript
    // extended by Neo
    if (count($_GET) > 0) {
        //        Lets now sanitize the GET vars
        //      echo '<pre>';
        //print_r ($_GET);
        //echo '</pre>';
        foreach ($_GET as $secvalue) {
            if (!is_array($secvalue)) {
                // BOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
                if (preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue) || preg_match("/.*[[:space:]](or|and)[[:space:]].*(=|like).*/i", $secvalue) || preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*style.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*form.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*img.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue)) {
                    // EOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
                    xtcMailHackAttempt(__FILE__, __LINE__, 'xt:C Security Alert', 'Intrusion detection.');
                    xtc_redirect(FILENAME_DEFAULT);
                }
            }
        }
    }
    //        Lets now sanitize the POST vars
    if (count($_POST) > 0) {
        foreach ($_POST as $secvalue) {
            if (!is_array($secvalue)) {
                // BOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
                if (preg_match("<[^>]*script.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue)) {
                    // EOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
                    xtcMailHackAttempt(__FILE__, __LINE__, 'xt:C Security Alert', 'Intrusion detection.');
                    xtc_redirect(FILENAME_DEFAULT);
                }
            }
        }
    }
    //        Lets now sanitize the COOKIE vars
    if (count($_COOKIE) > 0) {
        foreach ($_COOKIE as $secvalue) {
            if (!is_array($secvalue)) {
                // BOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
                if (preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue) || preg_match("/.*[[:space:]](or|and)[[:space:]].*(=|like).*/i", $secvalue) || preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*style.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*form.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*img.*\"?[^>]*>/i", $secvalue)) {
                    // EOF - Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3
                    xtcMailHackAttempt(__FILE__, __LINE__, 'xt:C Security Alert', 'Intrusion detection.');
                    xtc_redirect(FILENAME_DEFAULT);
                }
            }
        }
    }
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:48,代码来源:xtc_Security.inc.php


示例4: credit_risk_check

 function credit_risk_check()
 {
     $config = $this->_payone->getConfig();
     if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['noconfirm'])) {
         if ($config['credit_risk']['timeofcheck'] == 'before') {
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'p1crskip=1', 'SSL'));
         } else {
             $_SESSION['payone_error'] = CREDIT_RISK_FAILED;
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
         }
     }
     // A/B testing: only perform scoring every n-th time
     $do_score = true;
     if ($config['credit_risk']['abtest']['active'] == 'true') {
         $ab_value = max(1, (int) $config['credit_risk']['abtest']['value']);
         $score_count = (int) MODULE_PAYMENT_PAYONE_AB_TESTING;
         $do_score = $score_count % $ab_value == 0;
         xtc_db_query("UPDATE " . TABLE_CONFIGURATION . " SET configuration_value='" . ($score_count + 1) . "', last_modified = NOW() where configuration_key='MODULE_PAYMENT_PAYONE_AB_TESTING'");
     }
     if ($do_score) {
         $score = $this->_payone->scoreCustomer($_SESSION['billto']);
     } else {
         $score = false;
     }
     if ($score instanceof Payone_Api_Response_Consumerscore_Valid) {
         switch ((string) $score->getScore()) {
             case 'G':
                 $_SESSION['payone_cr_result'] = 'green';
                 break;
             case 'Y':
                 $_SESSION['payone_cr_result'] = 'yellow';
                 break;
             case 'R':
                 $_SESSION['payone_cr_result'] = 'red';
                 break;
             default:
                 $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault'];
         }
         $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']);
     } else {
         // could not get a score value
         $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault'];
         $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']);
     }
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:45,代码来源:PayoneCreditRisk.php


示例5: payment_action

 function payment_action()
 {
     global $order, $insert_id;
     if (!isset($insert_id) || $insert_id == '') {
         $insert_id = $_SESSION['tmp_oID'];
     }
     $this->payone->log("(pre-)authorizing {$this->code} payment");
     $standard_parameters = parent::_standard_parameters();
     $this->personal_data = new Payone_Api_Request_Parameter_Authorization_PersonalData();
     parent::_set_customers_standard_params();
     $this->delivery_data = new Payone_Api_Request_Parameter_Authorization_DeliveryData();
     parent::_set_customers_shipping_params();
     $this->payment_method = array();
     $request_parameters = parent::_request_parameters('vor');
     unset($request_parameters['payment']);
     $this->params = array_merge($standard_parameters, $request_parameters);
     $this->builder = new Payone_Builder($this->payone->getPayoneConfig());
     parent::_build_service_authentification('vor');
     parent::_parse_response_payone_api();
     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:21,代码来源:payone_prepay.php


示例6: xtc_redirect

            }
            $messageStack->add_session(DELETE_CACHE_SUCCESSFUL, 'success');
            xtc_redirect(xtc_href_link(FILENAME_CONFIGURATION, 'gID=' . (int) $_GET['gID']));
            break;
        case 'deltempcache':
            $path = DIR_FS_CATALOG . 'templates_c/';
            if ($dir = opendir($path)) {
                while (($file = readdir($dir)) !== false) {
                    if (is_file($path . $file) && $file != "index.html" && $file != ".htaccess") {
                        unlink($path . $file);
                    }
                }
                closedir($dir);
            }
            $messageStack->add_session(DELETE_TEMP_CACHE_SUCCESSFUL, 'success');
            xtc_redirect(xtc_href_link(FILENAME_CONFIGURATION, 'gID=' . (int) $_GET['gID']));
            break;
    }
}
$cfg_group_query = xtc_db_query("select configuration_group_title, configuration_group_id from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int) $_GET['gID'] . "'");
// Hetfield - 2010-01-15 - multilanguage title in configuration
$cfg_group = xtc_db_fetch_array($cfg_group_query);
require DIR_WS_INCLUDES . 'head.php';
?>
    
  </head>
  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
    <!-- header //-->
    <?php 
require DIR_WS_INCLUDES . 'header.php';
?>
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:31,代码来源:configuration.php


示例7: xtc_db_query

if (isset($_GET['action']) && $_GET['action'] == 'process') {
    $check_affiliate_query = xtc_db_query("select affiliate_firstname, affiliate_lastname, affiliate_password, affiliate_id from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . $_POST['email_address'] . "'");
    if (xtc_db_num_rows($check_affiliate_query)) {
        $check_affiliate = xtc_db_fetch_array($check_affiliate_query);
        // Crypted password mods - create a new password, update the database and mail it to them
        $newpass = xtc_create_random_value(ENTRY_PASSWORD_MIN_LENGTH);
        $crypted_password = xtc_encrypt_password($newpass);
        xtc_db_query("update " . TABLE_AFFILIATE . " set affiliate_password = '" . $crypted_password . "' where affiliate_id = '" . $check_affiliate['affiliate_id'] . "'");
        xtc_php_mail(AFFILIATE_EMAIL_ADDRESS, STORE_OWNER, $_POST['email_address'], $check_affiliate['affiliate_firstname'] . " " . $check_affiliate['affiliate_lastname'], '', AFFILIATE_EMAIL_ADDRESS, STORE_OWNER, '', '', EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)));
        if (!isset($mail_error)) {
            xtc_redirect(xtc_href_link(FILENAME_AFFILIATE, 'info_message=' . urlencode(TEXT_PASSWORD_SENT), 'SSL', true, false));
        } else {
            echo $mail_error;
        }
    } else {
        xtc_redirect(xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'email=nonexistent', 'SSL'));
    }
} else {
    $breadcrumb->add(NAVBAR_TITLE, xtc_href_link(FILENAME_AFFILIATE, '', 'SSL'));
    $breadcrumb->add(NAVBAR_TITLE_PASSWORD_FORGOTTEN, xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL'));
    require DIR_WS_INCLUDES . 'header.php';
    $smarty->assign('FORM_ACTION', xtc_draw_form('password_forgotten', xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'action=process', 'SSL')));
    $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email_address', '', 'maxlength="96"'));
    $smarty->assign('LINK_AFFILIATE', '<a href="' . xtc_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>');
    $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
    if (isset($_GET['email']) && $_GET['email'] == 'nonexistent') {
        $smarty->assign('email_nonexistent', 'true');
    }
}
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
开发者ID:BackupTheBerlios,项目名称:xtc-affiliate,代码行数:31,代码来源:affiliate_password_forgotten.php


示例8: Copyright

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// include needed functions
require_once DIR_FS_INC . 'xtc_date_short.inc.php';
// create smarty elements
$smarty = new Smarty();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
if (!isset($_SESSION['affiliate_id'])) {
    xtc_redirect(xtc_href_link(FILENAME_AFFILIATE, '', 'SSL'));
}
$breadcrumb->add(NAVBAR_TITLE, xtc_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_PAYMENT, xtc_href_link(FILENAME_AFFILIATE_PAYMENT, '', 'SSL'));
if (!isset($_GET['page'])) {
    $_GET['page'] = 1;
}
$affiliate_payment_raw = "select p.* , s.affiliate_payment_status_name\n           from " . TABLE_AFFILIATE_PAYMENT . " p, " . TABLE_AFFILIATE_PAYMENT_STATUS . " s \n           where p.affiliate_payment_status = s.affiliate_payment_status_id \n           and s.affiliate_language_id = '" . $_SESSION['languages_id'] . "'\n           and p.affiliate_id =  '" . $_SESSION['affiliate_id'] . "'\n           order by p.affiliate_payment_id DESC";
$affiliate_payment_split = new splitPageResults($affiliate_payment_raw, $_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
require DIR_WS_INCLUDES . 'header.php';
$smarty->assign('affiliate_payment_split_number', $affiliate_payment_split->number_of_rows);
$affiliate_payment_table = '';
if ($affiliate_payment_split->number_of_rows > 0) {
    $affiliate_payment_values = xtc_db_query($affiliate_payment_split->sql_query);
    $number_of_payment = 0;
    while ($affiliate_payment = xtc_db_fetch_array($affiliate_payment_values)) {
开发者ID:BackupTheBerlios,项目名称:xtc-affiliate,代码行数:31,代码来源:affiliate_payment.php


示例9: nextcommerce

   (c) 2003	 nextcommerce (account_history.php,v 1.13 2003/08/17); www.nextcommerce.org

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// create smarty elements
$smarty = new Smarty();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'xtc_count_customer_orders.inc.php';
require_once DIR_FS_INC . 'xtc_date_long.inc.php';
require_once DIR_FS_INC . 'xtc_image_button.inc.php';
require_once DIR_FS_INC . 'xtc_get_all_get_params.inc.php';
if (!isset($_SESSION['customer_id'])) {
    xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
}
$breadcrumb->add(NAVBAR_TITLE_1_ACCOUNT_HISTORY, xtc_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_ACCOUNT_HISTORY, xtc_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
$module_content = array();
if (($orders_total = xtc_count_customer_orders()) > 0) {
    $history_query_raw = "select o.orders_id, \n                                 o.date_purchased,\n                                 o.delivery_name,\n                                 o.billing_name,\n                                 ot.text as order_total,\n                                 s.orders_status_name\n                        from " . TABLE_ORDERS . " o,\n                             " . TABLE_ORDERS_TOTAL . " ot,\n                             " . TABLE_ORDERS_STATUS . " s \n                        where o.customers_id = " . (int) $_SESSION['customer_id'] . "\n                        and o.orders_id = ot.orders_id\n                        and ot.class = 'ot_total'\n                        and o.orders_status = s.orders_status_id\n                        and s.language_id = " . (int) $_SESSION['languages_id'] . "\n                        order by orders_id DESC";
    $history_split = new splitPageResults($history_query_raw, isset($_GET['page']) ? $_GET['page'] : 0, MAX_DISPLAY_ORDER_HISTORY);
    $history_query = xtc_db_query($history_split->sql_query);
    while ($history = xtc_db_fetch_array($history_query)) {
        $products_query = xtc_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $history['orders_id'] . "'");
        $products = xtc_db_fetch_array($products_query);
        if (xtc_not_null($history['delivery_name'])) {
            $order_type = TEXT_ORDER_SHIPPED_TO;
            $order_name = $history['delivery_name'];
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:31,代码来源:account_history.php


示例10: xtc_db_query

    }
    //BOF - web28 - 2011-01-15 - //FIX Neuberechnung aus TABLE_ORDERS_RECALCULATE
    //$total_query = xtc_db_query("select SUM(value) as value from ".TABLE_ORDERS_TOTAL." where orders_id = '".$_POST['oID']."' and class != 'ot_subtotal_no_tax' and class != 'ot_tax' and class != 'ot_total'");
    $total_query = xtc_db_query("select SUM(" . $price . ") as value from " . TABLE_ORDERS_RECALCULATE . " where orders_id = '" . (int) $_POST['oID'] . "'");
    //EOF - web28 - 2011-01-15 - //FIX Neuberechnung aus TABLE_ORDERS_RECALCULATE
    $total = xtc_db_fetch_array($total_query);
    $total_final = $total['value'] + $add_tax;
    //Mwst hinzurechnen
    $total_text = '<b>' . $xtPrice->xtcFormat($total_final, true) . '</b>';
    xtc_db_query("update " . TABLE_ORDERS_TOTAL . "\n                   set text = '" . $total_text . "',\n                       value = '" . $total_final . "'\n                 where orders_id = '" . (int) $_POST['oID'] . "'\n                   and class = 'ot_total'");
    //EOF  web28 - 2010-12-04 Errechne neue Gesamtsumme für Artikel
    // Löschen des Zwischenspeichers Anfang
    //EXIT; //DEBUG
    xtc_db_query("delete from " . TABLE_ORDERS_RECALCULATE . " where orders_id = '" . xtc_db_input($_POST['oID']) . "'");
    // Löschen des Zwischenspeichers Ende
    xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'action=edit&oID=' . (int) $_POST['oID']));
}
// Rückberechnung Ende
//---------------------------------//
function get_customers_taxprice_status()
{
    global $order, $lang;
    $status_query = xtc_db_query("SELECT customers_status_show_price_tax,\n                                       customers_status_add_tax_ot,\n                                       customers_status_discount,\n                                       customers_status_discount_attributes\n                                  FROM " . TABLE_CUSTOMERS_STATUS . "\n                                 WHERE customers_status_id = '" . $order->info['status'] . "'\n                                   AND language_id ='" . (int) $lang['languages_id'] . "'\n                               ");
    return xtc_db_fetch_array($status_query);
}
//BOF - web28 - 2010-01-15 - Steuersatz Coupon/Rabatt neu berechnen
//Der Steuersatz muss anhand der Posten mit unterschiedlichen Steuersätzen anteilig berechnet werden
function calculate_tax($amount)
{
    global $xtPrice, $status;
    $price = 'b_price';
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:31,代码来源:orders_edit.php


示例11: after_process

 function after_process()
 {
     global $order, $insert_id;
     unset($_SESSION['discount_value']);
     unset($_SESSION['discount_name']);
     unset($_SESSION['voucher_value']);
     unset($_SESSION['voucher_name']);
     unset($_SESSION['coupon_value']);
     unset($_SESSION['coupon_name']);
     unset($_SESSION['lofee_value']);
     unset($_SESSION['lofee_name']);
     $token = $_GET['token'];
     if ($this->response->ack == 'OK' && $this->response->status == 'ACCEPTED') {
         if ($this->order_status) {
             xtc_db_query('UPDATE ' . TABLE_ORDERS . ' SET orders_status = "' . xtc_db_input($this->order_status) . '" WHERE orders_id = "' . xtc_db_input($insert_id) . '"');
         }
         $customer = $this->response->customer;
         xtc_db_query('INSERT INTO billsafe_orders_2 (id, orderid, transactionid, token, billsafeStatus, type, paymentStatus, date) VALUES (NULL,"' . xtc_db_input($insert_id) . '", "' . xtc_db_input($this->response->transactionId) . '", "' . $token . '", "' . xtc_db_input($this->response->status) . '", "installment", NULL, "' . date('Y-m-d H:i:s') . '")');
         $resultQuery = xtc_db_query('SELECT id FROM billsafe_orders_2 WHERE transactionId = "' . xtc_db_input($this->response->transactionId) . '"');
         $result = xtc_db_fetch_array($resultQuery);
         xtc_db_query('INSERT INTO billsafe_orders_user_2 (id, bsorders_id, gender, company, firstname, lastname, street, housenumber, postcode, city, country, dateofbirth, email, phone) VALUES (NULL, "' . xtc_db_input($result['id']) . '", "' . xtc_db_input($customer->gender) . '", "' . xtc_db_input($customer->firstname) . '", "' . xtc_db_input($customer->company) . '", "' . xtc_db_input($customer->lastname) . '", "' . xtc_db_input($customer->street) . '", "' . xtc_db_input($customer->housenumber) . '", "' . xtc_db_input($customer->postcode) . '", "' . xtc_db_input($customer->city) . '", "' . xtc_db_input($customer->country) . '", "0000-00-00", "' . xtc_db_input($customer->email) . '", "' . xtc_db_input($customer->phone) . '")');
         $bs = new Billsafe_Sdk(DIR_FS_CATALOG . 'includes/external/billsafe/classes/billsafe_2/ini.php');
         //DokuMan - 2012-06-19 - move billsafe to external directory
         if ($_SESSION['language_charset'] == 'iso-8859-1' || $_SESSION['language_charset'] == 'iso-8859-15') {
             $bs->setUtf8Mode(false);
         } else {
             $bs->setUtf8Mode(true);
         }
         if (MODULE_PAYMENT_BILLSAFE_2HP_SERVER == 'Live') {
             $bs->setMode("LIVE");
         } else {
             $bs->setMode("SANDBOX");
         }
         $bs->setCredentials(array('merchantId' => MODULE_PAYMENT_BILLSAFE_2HP_MERCHANT_ID, 'merchantLicenseSandbox' => MODULE_PAYMENT_BILLSAFE_2HP_MERCHANT_LICENSE, 'merchantLicenseLive' => MODULE_PAYMENT_BILLSAFE_2HP_MERCHANT_LICENSE, 'applicationSignature' => $this->applicationSignature, 'applicationVersion' => $this->application_version));
         $params = array('transactionId' => $this->response->transactionId);
         $response = $bs->callMethod('getArticleList', $params);
         $article = $response->articleList;
         for ($i = 0, $n = sizeof($article); $i < $n; $i++) {
             for ($ii = 0, $nn = intval($article[$i]->quantity); $ii < $nn; $ii++) {
                 $article[$i]->name = str_replace("\"", "\\\"", $article[$i]->name);
                 $article[$i]->name = str_replace("\\'", "\\\\'", $article[$i]->name);
                 xtc_db_query('INSERT INTO billsafe_orders_details_2 (ordernumber, product_id, articletype, articlenumber, articlename, articleprice, articletax, bsorders_id) values("' . xtc_db_input($insert_id) . '", "' . xtc_db_input($order->products[$i]['id']) . '", "' . xtc_db_input($article[$i]->type) . '", "' . xtc_db_input($article[$i]->number) . '", "' . xtc_db_input($article[$i]->name) . '", "' . xtc_db_input($article[$i]->grossPrice) . '", "' . xtc_db_input($article[$i]->tax) . '", "' . xtc_db_input($result['id']) . '")');
             }
         }
         $comments = MODULE_PAYMENT_BILLSAFE_2HP_STATUS_TEXT . ': ' . $this->response->status . '; ' . MODULE_PAYMENT_BILLSAFE_2HP_TRANSACTIONID . ': ' . $this->response->transactionId;
         xtc_db_query('INSERT INTO orders_status_history (orders_status_history_id, orders_id, orders_status_id, date_added, customer_notified, comments) VALUES (NULL, "' . xtc_db_input($insert_id) . '", "1", "' . date('Y-m-d H:i:s') . '", "0", "' . xtc_db_input($comments) . '")');
         $params = array('transactionId' => xtc_db_input($this->response->transactionId), 'orderNumber' => xtc_db_input($insert_id));
         $response = $bs->callMethod('setOrderNumber', $params);
         if ($response->ack == 'OK') {
         } else {
         }
     } else {
         $_SESSION['billsafe_status'] = 'declined';
         $message = $this->get_error_message($response);
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error_message=' . stripslashes(urlencode(html_entity_decode($message))), 'SSL'));
     }
     return false;
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:58,代码来源:billsafe_2hp.php


示例12: handlePost

 /**
  * Handle the $_POST variable and return a KlarnaAddr object
  *
  * @param string $option payment option, invoice, part or spec
  *
  * @return KlarnaAddr address object
  */
 public function handlePost($option)
 {
     $addrHandler = new KlarnaAddressXtc();
     $errors = array();
     $lang = self::getLanguageCode();
     $address = new KlarnaAddr();
     if (strtolower($this->_country) == 'se') {
         try {
             $address = $addrHandler->getMatchingAddress($errors, $option);
         } catch (Exception $e) {
             $this->setError(htmlentities($e->getMessage()) . " (#" . $e->getCode() . ")", $option);
             xtc_redirect($this->errorLink(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
         }
     }
     if (strtolower($this->_country) != "se") {
         try {
             $aKlarnaAddress = $addrHandler->addressArrayFromPost($option);
             $address = $addrHandler->buildKlarnaAddressFromArray($aKlarnaAddress, $this->_country);
         } catch (Exception $e) {
             $this->setError(htmlentities($e->getMessage()) . " (#" . $e->getCode() . ")", $option);
             xtc_redirect($this->errorLink(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
         }
         $_SESSION['klarna_data'] = $aKlarnaAddress;
         if (KiTT_CountryLogic::needConsent($this->_country) && $_POST["klarna_{$option}_consent"] != 'consent') {
             $errors[] = "no_consent";
         }
         if (KiTT_CountryLogic::needDateOfBirth($this->_country)) {
             $_SESSION['klarna_data']["pno"] = $_POST["klarna_{$option}_birth_day"] . $_POST["klarna_{$option}_birth_month"] . $_POST["klarna_{$option}_birth_year"];
             $_SESSION['klarna_data']['gender'] = $_POST["klarna_{$option}_gender"];
         }
     }
     if (!empty($errors)) {
         foreach ($errors as $err) {
             $translated[] = $this->translate($err, $lang);
         }
         $this->setError(htmlentities(implode(',', $translated), ENT_COMPAT, 'UTF-8'), $option);
         xtc_redirect($this->errorLink(FILENAME_CHECKOUT_PAYMENT, "", "SSL"));
     }
     return $address;
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:47,代码来源:class.KlarnaUtils.php


示例13: xtc_db_query

            xtc_db_query("insert into " . TABLE_CARRIERS . " (carrier_name, carrier_tracking_link, carrier_sort_order, carrier_date_added) values ('" . xtc_db_input($carrier_name) . "', '" . xtc_db_input($carrier_tracking_link) . "', '" . xtc_db_input($carrier_sort_order) . "', now())");
            xtc_redirect(xtc_href_link(FILENAME_PARCEL_CARRIERS));
            break;
        case 'save':
            $carrier_id = xtc_db_prepare_input($_GET['carrierID']);
            $carrier_name = xtc_db_prepare_input($_POST['carrier_name']);
            $carrier_tracking_link = xtc_db_prepare_input($_POST['carrier_tracking_link']);
            $carrier_sort_order = xtc_db_prepare_input($_POST['carrier_sort_order']);
            $last_modified = xtc_db_prepare_input($_POST['carrier_last_modified']);
            xtc_db_query("update " . TABLE_CARRIERS . " set carrier_id = '" . (int) $carrier_id . "', carrier_name = '" . xtc_db_input($carrier_name) . "', carrier_tracking_link = '" . xtc_db_input($carrier_tracking_link) . "', carrier_sort_order = '" . xtc_db_input($carrier_sort_order) . "', carrier_last_modified = now() where carrier_id = '" . (int) $carrier_id . "'");
            xtc_redirect(xtc_href_link(FILENAME_PARCEL_CARRIERS, 'page=' . $page_parcel . '&carrierID=' . $carrier_id));
            break;
        case 'deleteconfirm':
            $carrier_id = xtc_db_prepare_input($_GET['carrierID']);
            xtc_db_query("delete from " . TABLE_CARRIERS . " where carrier_id = '" . (int) $carrier_id . "'");
            xtc_redirect(xtc_href_link(FILENAME_PARCEL_CARRIERS, 'page=' . $page_parcel));
            break;
    }
}
require DIR_WS_INCLUDES . 'head.php';
?>
  <script type="text/javascript" src="includes/general.js"></script>
</head>
<body>
    <!-- header //-->
    <?php 
require DIR_WS_INCLUDES . 'header.php';
?>
    <!-- header_eof //-->
    <!-- body //-->
	
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:30,代码来源:parcel_carriers.php


示例14: complete_payment_paypal_installment

 function complete_payment_paypal_installment()
 {
     global $insert_id;
     if (isset($_SESSION['paypal']['paymentId']) && isset($_SESSION['paypal']['PayerID'])) {
         // auth
         $apiContext = $this->apiContext();
         try {
             // Get the payment Object by passing paymentId
             $payment = Payment::get($_SESSION['paypal']['paymentId'], $apiContext);
         } catch (Exception $ex) {
             $this->LoggingManager->log(print_r($ex, true), 'DEBUG');
             // redirect
             unset($_SESSION['paypal']);
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
         }
         // PaymentExecution
         $execution = new PaymentExecution();
         $execution->setPayerId($_SESSION['paypal']['PayerID']);
         try {
             // Execute the payment
             $payment->execute($execution, $apiContext);
         } catch (Exception $ex) {
             $this->LoggingManager->log(print_r($ex, true), 'DEBUG');
             $this->remove_order($insert_id);
             unset($_SESSION['paypal']);
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
         }
         // capture
         if (($this->transaction_type == 'order' || $this->transaction_type == 'authorize') && $this->get_config('PAYPAL_CAPTURE_MANUELL') == '0') {
             $this->capture_payment($payment);
         }
         $sql_data_array = array('orders_id' => $insert_id, 'payment_id' => $_SESSION['paypal']['paymentId'], 'payer_id' => $_SESSION['paypal']['PayerID']);
         xtc_db_perform(TABLE_PAYPAL_PAYMENT, $sql_data_array);
         try {
             // Get the payment Object by passing paymentId
             $payment = Payment::get($_SESSION['paypal']['paymentId'], $apiContext);
         } catch (Exception $ex) {
             $this->LoggingManager->log(print_r($ex, true), 'DEBUG');
             $this->remove_order($insert_id);
             unset($_SESSION['paypal']);
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
         }
         $status = $this->get_orders_status($payment);
         $status['status_id'] = $this->get_config('PAYPAL_ORDER_STATUS_ACCEPTED_ID');
         if ($status['status_id'] < 0) {
             $check_query = xtc_db_query("SELECT orders_status\n                                       FROM " . TABLE_ORDERS . " \n                                      WHERE orders_id = '" . (int) $insert_id . "'");
             $check = xtc_db_fetch_array($check_query);
             $status['status_id'] = $check['orders_status'];
         }
         $this->update_order($status['comment'], $status['status_id'], $insert_id);
     } else {
         // redirect
         unset($_SESSION['paypal']);
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
     }
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:56,代码来源:PayPalPayment.php


示例15: PayPalAdmin

// include needed classes
require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalAdmin.php';
$paypal = new PayPalAdmin();
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'delete':
            $paypal->delete_webhook($_GET['id']);
            xtc_redirect(xtc_href_link(basename($PHP_SELF)));
            break;
        case 'update':
            $paypal->update_webhook($_POST['config']);
            xtc_redirect(xtc_href_link(basename($PHP_SELF)));
            break;
        case 'insert':
            $paypal->create_webhook($_POST['config']);
            xtc_redirect(xtc_href_link(basename($PHP_SELF)));
            break;
    }
}
$orders_statuses = array(array('id' => '-1', 'text' => TEXT_PAYPAL_NO_STATUS_CHANGE));
$orders_status_array = array('-1' => TEXT_PAYPAL_NO_STATUS_CHANGE);
$orders_status_query = xtc_db_query("SELECT orders_status_id,\n                                            orders_status_name\n                                       FROM " . TABLE_ORDERS_STATUS . "\n                                      WHERE language_id = '" . $_SESSION['languages_id'] . "'\n                                   ORDER BY sort_order");
while ($orders_status = xtc_db_fetch_array($orders_status_query)) {
    $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']);
    $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
}
$status_array = array(array('id' => '1', 'text' => YES), array('id' => '0', 'text' => NO));
$landingpage_array = array(array('id' => 'Login', 'text' => 'Login'), array('id' => 'Payment', 'text' => 'Payment'));
//$locale_code = array(
require DIR_WS_INCLUDES . 'head.php';
?>
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:31,代码来源:paypal_webhook.php


示例16: array

}
// default open navigation box
if (!isset($_SESSION['selected_box'])) {
    $_SESSION['selected_box'] = 'configuration';
} else {
    if (!empty($_GET['selected_box'])) {
        $_SESSION['selected_box'] = $_GET['selected_box'];
    }
}
// the following cache blocks are used in the Tools->Cache section
// ('language' in the filename is automatically replaced by available languages)
$cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true));
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
    $messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');
}
// check if a default language is set
if (!defined('DEFAULT_LANGUAGE')) {
    $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
}
// for Customers Status
xtc_get_customers_statuses();
$pagename = strtok($current_page, '.');
if (!isset($_SESSION['customer_id'])) {
    xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
if (xtc_check_permission($pagename) == '0') {
    xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
// Include Template Engine
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'Smarty_2.6.27/Smarty.class.php';
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:31,代码来源:application_top.php


示例17: splitPageResults

//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
//BOF - DokuMan - 2010-01-26 - use Join on TABLE_PRODUCTS_DESCRIPTION & TABLE_SPECIALS
$specials_query_raw = "select p.products_id,\n                              pd.products_name,\n                              p.products_price,\n                              p.products_tax_class_id,\n                              p.products_shippingti 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP xxtea_decrypt函数代码示例发布时间:2022-05-23
下一篇:
PHP xtc_not_null函数代码示例发布时间: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