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


PHP zen_redirect函数代码示例

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


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

示例1: update

 function update(&$class, $eventID, $paramsArray)
 {
     if (FEC_EASY_SIGNUP_STATUS == 'true') {
         // redirect to ESL
         zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
     }
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:7,代码来源:class.esl.php

示例2: update

 function update(&$class, $eventID, $paramsArray)
 {
     global $messageStack;
     if (FEC_ONE_PAGE != 'true') {
         zen_redirect(zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
     }
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:7,代码来源:class.fec_confirmation.php

示例3: pre_confirmation_check

 public function pre_confirmation_check()
 {
     global $messageStack;
     include DIR_WS_CLASSES . 'cc_validation.php';
     $cc_validation = new cc_validation();
     $result = $cc_validation->validate($_POST['checkoutapipayment_cc_number'], $_POST['checkoutapipayment_cc_expires_month'], $_POST['checkoutapipayment_cc_expires_year']);
     $error = '';
     switch ($result) {
         case -1:
             $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));
             break;
         case -2:
         case -3:
         case -4:
             $error = TEXT_CCVAL_ERROR_INVALID_DATE;
             break;
         case false:
             $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;
             break;
     }
     if ($result == false || $result < 1) {
         $messageStack->add_session('checkout_payment', $error . '<!-- [' . $this->code . '] -->', 'error');
         zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
     }
     $this->cc_card_type = $cc_validation->cc_type;
     $this->cc_card_number = $cc_validation->cc_number;
     $this->cc_expiry_month = $cc_validation->cc_expiry_month;
     $this->cc_expiry_year = $cc_validation->cc_expiry_year;
 }
开发者ID:avish-bisbeehurry-cko,项目名称:checkout-zencart-plugin,代码行数:29,代码来源:creditcardpci.php

示例4: update

 function update(&$class, $eventID, $paramsArray)
 {
     global $messageStack;
     if (isset($_SESSION['COWOA']) && $_SESSION['COWOA'] == true) {
         $messageStack->add_session('header', 'Only registered customers can access account features.  You are currently using our guest checkout option.  Please logout and sign-in with your registered account to access all account features.', 'caution');
         zen_redirect(zen_back_link(true));
     } elseif (!isset($_SESSION['customer_id'])) {
         $_SESSION['redirect_url'] = zen_href_link($_GET['main_page'], zen_get_all_get_params(array('main_page')), 'SSL');
     }
 }
开发者ID:krakatoa14,项目名称:fec,代码行数:10,代码来源:class.no_account.php

示例5: reloaded_related_remove

/**
 * Uninstall configuration into database
 * @param none
 */
function reloaded_related_remove()
{
    global $db, $reloadedStack;
    //Auto install check
    $reloadedRelatedCheck = $db->Execute("SHOW COLUMNS FROM " . TABLE_PRODUCTS . " LIKE 'products_family'");
    if ($reloadedRelatedCheck->RecordCount() > 0) {
        $db->Execute("ALTER TABLE " . TABLE_PRODUCTS . " DROP products_family");
    }
    //Get configuration keys for mod
    $keys = reloaded_related_keys();
    $db->Execute("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_key IN ('" . implode("', '", $keys) . "')");
    unset($keys);
    $reloadedStack->add_session('Related Products successfully removed', 'success');
    zen_redirect(zen_href_link('index.php'));
}
开发者ID:quangn92,项目名称:visualyou,代码行数:19,代码来源:reloaded_related_products_functions.php

示例6: before_process

 /**
  *
  */
 public function before_process()
 {
     global $messageStack;
     $sagepay_return_data = SagepayUtil::decodeAndDecrypt($_GET['crypt'], MODULE_PAYMENT_SAGEPAY_ZC_FORM_PASSWORD);
     $this->errorLog(array(array('title' => 'Response Data', 'content' => $sagepay_return_data)));
     $this->sagepayResponse = SagepayUtil::getResponseTokens($sagepay_return_data);
     $status = $this->sagepayResponse['Status'];
     if (in_array($status, array('OK', 'REGISTERED', 'AUTHENTICATED'))) {
         return;
     }
     $error_message = $this->getResponseErrorMessage($this->sagepayResponse['Status']);
     $payment_error_return = 'ERROR ' . sprintf($error_message, $this->sagepayResponse['StatusDetail']);
     $this->errorLog(array(array('title' => 'Response Values', 'content' => implode("\n", $this->sagepayResponse))));
     $messageStack->add_session('checkout_payment', $payment_error_return, 'error');
     zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
 }
开发者ID:zencart,项目名称:sagepay,代码行数:19,代码来源:sagepay_zc_form.php

示例7: update

 function update(&$class, $eventID, $paramsArray)
 {
     // check if free/virtual products checkout enabled
     if (FEC_FREE_VIRTUAL_CHECKOUT == 'true') {
         // check if products are virtual
         if ($_SESSION['cart']->get_content_type() == 'virtual') {
             $cart_quantity = $_SESSION['cart']->count_contents();
             // check if products are free
             if ($_SESSION['cart']->in_cart_check('product_is_free', '1') == $cart_quantity) {
                 // check if COWOA is enabled
                 if (FEC_NOACCOUNT_SWITCH == 'true') {
                     // redirect to COWOA
                     zen_redirect(zen_href_link(FILENAME_NO_ACCOUNT, 'type=free_virtual', 'SSL'));
                 }
             }
         }
     }
     if (FEC_NOACCOUNT_ONLY_SWITCH == 'true') {
         // redirect to ESL
         zen_redirect(zen_href_link(FILENAME_NO_ACCOUNT, '', 'SSL'));
     }
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:22,代码来源:class.cowoa.php

示例8: page

 function page()
 {
     global $zco_notifier;
     global $mt_pages_title;
     global $mt_pages_contents;
     if (isset($_GET['page']) && preg_match('/^([a-zA-Z0-9_-]*)$/', $_GET['page'])) {
         $page_file;
         if (is_readable(MODULE_MT_PAGES_DIR_PAGES . $_GET['page'] . '-' . $_SESSION['languages_code'] . '.php')) {
             $page_file = MODULE_MT_PAGES_DIR_PAGES . $_GET['page'] . '-' . $_SESSION['languages_code'] . '.php';
         } elseif (is_readable(MODULE_MT_PAGES_DIR_PAGES . $_GET['page'] . '.php')) {
             $page_file = MODULE_MT_PAGES_DIR_PAGES . $_GET['page'] . '.php';
         } else {
             zen_redirect(zen_href_link(FILENAME_PAGE_NOT_FOUND));
         }
         require_once $page_file;
         $mt_pages_title = htmlspecialchars_decode(mb_convert_encoding(MT_PAGES_TITLE, mb_internal_encoding(), MT_PAGES_MT_CHARSET));
         $mt_pages_contents = htmlspecialchars_decode(mb_convert_encoding(MT_PAGES_CONTENTS, mb_internal_encoding(), MT_PAGES_MT_CHARSET));
         $zco_notifier->notify('NOTIFY_MT_PAGES_BEFORE_RETURN_PAGE');
         $return = array('mt_pages_basename' => MT_PAGES_BASENAME, 'mt_pages_title' => $mt_pages_title, 'mt_pages_contents' => $mt_pages_contents);
         return $return;
     }
 }
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:22,代码来源:module.php

示例9: update

 function update(&$class, $eventID, $paramsArray)
 {
     global $messageStack;
     if (FEC_STATUS == 'true') {
         $error = false;
         if ($_GET['main_page'] == FILENAME_CHECKOUT_PAYMENT and sizeof($messageStack->messages) > 0) {
             $error = true;
             for ($i = 0, $n = sizeof($messageStack->messages); $i < $n; $i++) {
                 if ($messageStack->messages[$i]['class'] == 'checkout_payment') {
                     $checkout_payment_output[] = $messageStack->messages[$i];
                 }
                 if ($messageStack->messages[$i]['class'] == 'redemptions') {
                     $redemptions_output[] = $messageStack->messages[$i];
                 }
             }
             $messageStack->reset();
             if (sizeof($checkout_payment_output) > 0) {
                 for ($i = 0, $n = sizeof($checkout_payment_output); $i < $n; $i++) {
                     $messageStack->add_session('checkout_payment', strip_tags($checkout_payment_output[$i]['text']), 'error');
                 }
             }
             if (sizeof($redemptions_output) > 0) {
                 for ($i = 0, $n = sizeof($redemptions_output); $i < $n; $i++) {
                     $messageStack->add_session('redemptions', strip_tags($redemptions_output[$i]['text']), 'caution');
                 }
             }
         }
         if ($_GET['credit_class_error']) {
             $error = true;
             $messageStack->add_session('checkout_payment', htmlspecialchars(urldecode($_GET['credit_class_error'])), 'error');
         }
         if ($error) {
             zen_redirect(zen_href_link(FILENAME_CHECKOUT, "fecaction=null", 'SSL'));
         } else {
             zen_redirect(zen_href_link(FILENAME_CHECKOUT, '', 'SSL'));
         }
     }
 }
开发者ID:krakatoa14,项目名称:fec,代码行数:38,代码来源:class.fec.php

示例10: pre_confirmation_check

 function pre_confirmation_check($order_total)
 {
     global $order;
     if ($this->enabled && $this->selection_test()) {
         // clean out negative values and strip common currency symbols
         $this->credit_account = preg_replace('/[^0-9.%]/', '', $this->credit_account);
         $this->credit_account = abs($this->credit_account);
         if ($this->credit_account > 0) {
             if (ereg('[^0-9/.]', trim($this->credit_account))) {
                 zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'credit_class_error_code=' . $this->code . '&credit_class_error=' . urlencode(TEXT_INVALID_REDEEM_AMOUNT), 'SSL', true, false));
             }
             if ($this->credit_account > $this->get_user_balance($_SESSION['customer_id'])) {
                 zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'credit_class_error_code=' . $this->code . '&credit_class_error=' . urlencode(TEXT_INVALID_REDEEM_AMOUNT), 'SSL', true, false));
             }
             //$this->deduction = $this->calculate_credit($order_total);
             if ($this->deduction >= $order->info['total'] && MODULE_ORDER_TOTAL_SC_ORDER_STATUS_ID != 0) {
                 $order->info['order_status'] = MODULE_ORDER_TOTAL_SC_ORDER_STATUS_ID;
             }
         }
         return $this->deduction;
     } else {
         return 0;
     }
 }
开发者ID:happyxlq,项目名称:lt_svn,代码行数:24,代码来源:ot_sc.php

示例11: zen_session_unregister

            $cart->reset(true);
            zen_session_unregister('sendto');
            zen_session_unregister('billto');
            zen_session_unregister('shipping');
            zen_session_unregister('payment');
            zen_session_unregister('comments');
        }
        break;
    case "CANCEL":
        if ($isExchange) {
            echo "TRUE|CANCEL";
            deleteOrder($orderId);
            ob_flush();
        } else {
            deleteOrder($orderId);
            zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . urlencode($method) . '&error=Payment cancelled', 'NONSSL', true, false));
        }
        break;
}
function deleteOrder($orderId)
{
    global $db;
    $db->Execute('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $orderId . '"');
    $db->Execute('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int) $orderId . '"');
    $db->Execute('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $orderId . '"');
    $db->Execute('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int) $orderId . '"');
    $db->Execute('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int) $orderId . '"');
    $db->Execute('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int) $orderId . '"');
}
function isAlreadyPAID($transactionId)
{
开发者ID:paynl,项目名称:zencart-plugin,代码行数:31,代码来源:paynl_exchange.php

示例12: CommerceShipping

<?php

// +----------------------------------------------------------------------+
// | bitcommerce Open Source E-commerce                                   |
// | Copyright (c) 2009 bitcommerce.org                                   |
// | http://www.bitcommerce.org/                                          |
// | This source file is subject to version 2.0 of the GPL license        |
// +----------------------------------------------------------------------+
//  $Id$
require 'includes/application_top.php';
require_once BITCOMMERCE_PKG_PATH . 'classes/CommerceOrder.php';
require BITCOMMERCE_PKG_PATH . 'classes/CommerceShipping.php';
$shipping = new CommerceShipping();
$order->calculate();
// get all available shipping quotes
if (!empty($_REQUEST['change_shipping']) && !empty($_REQUEST['shipping'])) {
    list($module, $method) = explode('_', $_REQUEST['shipping']);
    if (is_object(${$module})) {
        $quote = $shipping->quote($order->getWeight(), $method, $module);
        $order->changeShipping(current($quote), $_REQUEST);
        zen_redirect($_SERVER['HTTP_REFERER']);
    }
} else {
    $gBitSmarty->assign('quotes', $shipping->quote($order->getWeight()));
    print $gBitSmarty->fetch('bitpackage:bitcommerce/admin_shipping_change_ajax.tpl');
}
开发者ID:bitweaver,项目名称:commerce,代码行数:26,代码来源:shipping_change.php

示例13: zen_redirect

                // endif $save_to_file
            }
            //end if $records for processing not 0
            zen_redirect(zen_href_link(FILENAME_ADMIN_ACTIVITY));
            break;
            // clean out the admin_activity_log
        // clean out the admin_activity_log
        case 'clean_admin_activity_log':
            if (isset($_POST['confirm']) && $_POST['confirm'] == 'yes') {
                $db->Execute("truncate table " . TABLE_ADMIN_ACTIVITY_LOG);
                $admname = '{' . preg_replace('/[^\\w]/', '*', zen_get_admin_name()) . '[' . (int) $_SESSION['admin_id'] . ']}';
                $sql_data_array = array('access_date' => 'now()', 'admin_id' => isset($_SESSION['admin_id']) ? (int) $_SESSION['admin_id'] : 0, 'page_accessed' => 'Log reset by ' . $admname . '.', 'page_parameters' => '', 'ip_address' => substr($_SERVER['REMOTE_ADDR'], 0, 45));
                zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
                $messageStack->add_session(SUCCESS_CLEAN_ADMIN_ACTIVITY_LOG, 'success');
                unset($_SESSION['reset_admin_activity_log']);
                zen_redirect(zen_href_link(FILENAME_ADMIN_ACTIVITY));
            } else {
                $confirmation_needed = TRUE;
            }
            break;
    }
    //end switch / case
}
//endif $action
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
开发者ID:zenmagick,项目名称:zencart,代码行数:31,代码来源:admin_activity.php

示例14: zen_redirect

            } else {
                $messageStack->add(ERROR_DOWNLOAD_LINK_NOT_ACCEPTABLE, 'error');
            }
            break;
        case 'deleteconfirm':
            if (strstr($_GET['file'], '..')) {
                zen_redirect(zen_href_link(FILENAME_BACKUP_MYSQL));
            }
            $zremove_error = zen_remove(DIR_FS_BACKUP . '/' . $_GET['file']);
            // backwards compatibility:
            if (isset($zen_remove_error) && $zen_remove_error == true) {
                $zremove_error = $zen_remove_error;
            }
            if (!$zremove_error) {
                $messageStack->add_session(SUCCESS_BACKUP_DELETED, 'success');
                zen_redirect(zen_href_link(FILENAME_BACKUP_MYSQL));
            }
            break;
    }
}
// check if the backup directory exists
$dir_ok = false;
if (is_dir(DIR_FS_BACKUP)) {
    if (is_writable(DIR_FS_BACKUP)) {
        $dir_ok = true;
    } else {
        $messageStack->add(ERROR_BACKUP_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_BACKUP_DIRECTORY_DOES_NOT_EXIST, 'error');
}
开发者ID:R-Future,项目名称:zencart,代码行数:31,代码来源:backup_mysql.php

示例15: zen_redirect

                $_GET['action'] = '';
                $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
                zen_redirect(zen_href_link(FILENAME_GROUP_PRICING, 'page=' . $_GET['page']));
            }
            $delete_cust_confirmed = isset($_POST['delete_customers']) && $_POST['delete_customers'] == 'on' ? true : false;
            $group_id = zen_db_prepare_input($_GET['gID']);
            $customers_query = $db->Execute("select customers_id from " . TABLE_CUSTOMERS . " where customers_group_pricing = '" . (int) $group_id . "'");
            if ($customers_query->RecordCount() > 0 && $delete_cust_confirmed == true) {
                $db->Execute("delete from " . TABLE_GROUP_PRICING . " where group_id = '" . (int) $group_id . "'");
                $db->Execute("update " . TABLE_CUSTOMERS . " set customers_group_pricing=0 where customers_group_pricing = '" . (int) $group_id . "'");
            } elseif ($customers_query->RecordCount() > 0 && $delete_cust_confirmed == false) {
                $messageStack->add_session(ERROR_GROUP_PRICING_CUSTOMERS_EXIST, 'error');
            } elseif ($customers_query->RecordCount() == 0) {
                $db->Execute("delete from " . TABLE_GROUP_PRICING . " where group_id = '" . (int) $group_id . "'");
            }
            zen_redirect(zen_href_link(FILENAME_GROUP_PRICING, 'page=' . $_GET['page']));
            break;
    }
}
$query = $db->Execute("select count(*) as count from " . TABLE_GROUP_PRICING);
if ($query->fields['count'] > 0 && (!defined('MODULE_ORDER_TOTAL_GROUP_PRICING_STATUS') || MODULE_ORDER_TOTAL_GROUP_PRICING_STATUS != 'true')) {
    $messageStack->add(ERROR_MODULE_NOT_CONFIGURED, 'error');
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
开发者ID:dalinhuang,项目名称:yijinhuanxiang,代码行数:31,代码来源:group_pricing.php


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