本文整理汇总了PHP中zen_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_redirect函数的具体用法?PHP zen_redirect怎么用?PHP zen_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_redirect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: install
function install()
{
global $db, $messageStack;
if (defined('MODULE_PAYMENT_ALIPAYFOR_STATUS')) {
$messageStack->add_session('FreeCharger module already installed.', 'error');
zen_redirect(zen_href_link(FILENAME_MODULES, 'set=payment&module=alipay', 'NONSSL'));
return 'failed';
}
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Alipay Credit Card (forcard) Module', 'MODULE_PAYMENT_ALIPAYFOR_STATUS', 'True', 'Do you want to accept Alipay Credit Card (forcard) payment?', '6', '1', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now());");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_ALIPAYFOR_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_ALIPAYFOR_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_ALIPAYFOR_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Alipay Partner ID' , 'MODULE_PAYMENT_ALIPAYFOR_PARTNER_ID', '', '16 digits Partner ID. for example: 2088101568338364', '6', '0', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Signature Type', 'MODULE_PAYMENT_ALIPAYFOR_SIGN_TYPE', 'MD5', 'default MD5', '6', '0', 'zen_cfg_select_option(array(\\'MD5\\', \\'RSA\\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Signature Key' , 'MODULE_PAYMENT_ALIPAYFOR_PARTNER_SIGN', '', '', '6', '0', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Payment Methods', 'MODULE_PAYMENT_ALIPAYFOR_PAYMETHOD', 'boc', '', '6', '0', 'zen_cfg_select_option(array(\\'boc\\', \\'jvm-3d\\', \\'jvm-moto\\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transaction Currency' , 'MODULE_PAYMENT_ALIPAYFOR_CURRENCY', 'USD,EUR,GBP,AUD,HKD,RUB,CNY', 'Which currency should the order be sent to Alipay as?<br />NOTE: if an unsupported currency is sent to Alipay, it will be auto-converted to USD.', '6', '0', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Debug Mode', 'MODULE_PAYMENT_ALIPAYFOR_DEBUG_MODE', 'Off', 'Would you like to enable debug mode? A detailed log of transactions may be emailed to the store owner.', '6', '0', 'zen_cfg_select_option(array(\\'Off\\', \\'Log File\\'), ', now())");
}
开发者ID:mahuidong,项目名称:doc,代码行数:19,代码来源:(Lucklaser-https)alipay_forcard.php
示例17: zen_db_prepare_input
$_SESSION['login_attempt'] = 0;
}
$_SESSION['login_attempt']++;
}
// END SLAM PREVENTION
$email_address = zen_db_prepare_input($_POST['email_address']);
$check_customer_query = "SELECT customers_firstname, customers_lastname, customers_password, customers_id\n FROM " . TABLE_CUSTOMERS . "\n WHERE customers_email_address = :emailAddress";
$check_customer_query = $db->bindVars($check_customer_query, ':emailAddress', $email_address, 'string');
$check_customer = $db->Execute($check_customer_query);
if ($check_customer->RecordCount() > 0) {
$zco_notifier->notify('NOTIFY_PASSWORD_FORGOTTEN_VALIDATED');
$new_password = zen_create_PADSS_password(ENTRY_PASSWORD_MIN_LENGTH > 0 ? ENTRY_PASSWORD_MIN_LENGTH : 5);
$crypted_password = zen_encrypt_password($new_password);
$sql = "UPDATE " . TABLE_CUSTOMERS . "\n SET customers_password = :password\n WHERE customers_id = :customersID";
$sql = $db->bindVars($sql, ':password', $crypted_password, 'string');
$sql = $db->bindVars($sql, ':customersID', $check_customer->fields['customers_id'], 'integer');
$db->Execute($sql);
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
$html_msg['EMAIL_MESSAGE_HTML'] = sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password);
// send the email
zen_mail($check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'], $email_address, EMAIL_PASSWORD_REMINDER_SUBJECT, sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password), STORE_NAME, EMAIL_FROM, $html_msg, 'password_forgotten');
$messageStack->add_session('login', SUCCESS_PASSWORD_SENT, 'success');
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
} else {
$messageStack->add('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND);
}
}
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_LOGIN, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_PASSWORD_FORGOTTEN');
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:header_php.php
示例18: explode
break;
case 'new_product':
if (isset($_GET['product_type'])) {
// see if this category is restricted
$pieces = explode('_', $_GET['cPath']);
$cat_id = $pieces[sizeof($pieces) - 1];
// echo $cat_id;
$sql = "select product_type_id from " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " where category_id = '" . $cat_id . "'";
$product_type_list = $db->Execute($sql);
$sql = "select product_type_id from " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " where category_id = '" . $cat_id . "' and product_type_id = '" . $_GET['product_type'] . "'";
$product_type_good = $db->Execute($sql);
if ($product_type_list->RecordCount() < 1 || $product_type_good->RecordCount() > 0) {
$url = zen_get_all_get_params();
$sql = "select type_handler from " . TABLE_PRODUCT_TYPES . " where type_id = '" . $_GET['product_type'] . "'";
$handler = $db->Execute($sql);
zen_redirect(zen_href_link($handler->fields['type_handler'] . '.php', zen_get_all_get_params()));
} else {
$messageStack->add(ERROR_CANNOT_ADD_PRODUCT_TYPE, 'error');
}
}
break;
}
}
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
if (!is_writeable(DIR_FS_CATALOG_IMAGES)) {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
}
} else {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:categories.php
示例19: currencies
*/
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$languages = zen_get_languages();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (zen_not_null($action)) {
switch ($action) {
case 'insert':
case 'save':
$sql = "update " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " set products_attributes_filename=:filename:, products_attributes_maxdays=:maxdays:, products_attributes_maxcount=:maxcount: where products_attributes_id='" . (int) $_GET['padID'] . "'";
$sql = $db->bindVars($sql, ':filename:', $_POST['products_attributes_filename'], 'string');
$sql = $db->bindVars($sql, ':maxdays:', $_POST['products_attributes_maxdays'], 'string');
$sql = $db->bindVars($sql, ':maxcount:', $_POST['products_attributes_maxcount'], 'string');
$db->Execute($sql);
zen_redirect(zen_href_link(FILENAME_DOWNLOADS_MANAGER, 'padID=' . (int) $_GET['padID'] . '&page=' . (int) $_GET['page']));
break;
}
}
?>
<!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
echo CHARSET;
?>
">
<title><?php
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:downloads_manager.php
示例20: zen_redirect
zen_redirect(zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('action')) . 'action=edit', $request_type));
break;
case 'deleteconfirm':
zen_remove_order($oID, $_POST['restock']);
$so->delete_all_data();
zen_redirect(zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')), $request_type));
break;
}
}
if ($action == 'edit' && isset($_GET['oID'])) {
$orders = $db->Execute("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . $oID . "'");
$order_exists = true;
if ($orders->RecordCount() <= 0) {
$order_exists = false;
$messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
zen_redirect(zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')), $request_type));
}
}
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$orders_statuses = array();
$orders_status_array = array();
$orders_status = $db->Execute("select orders_status_id, orders_status_name\r\n from " . TABLE_ORDERS_STATUS . "\r\n where language_id = '" . (int) $_SESSION['languages_id'] . "' order by orders_status_id");
while (!$orders_status->EOF) {
$orders_statuses[] = array('id' => $orders_status->fields['orders_status_id'], 'text' => $orders_status->fields['orders_status_name'] . ' [' . $orders_status->fields['orders_status_id'] . ']');
$orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
$orders_status->MoveNext();
}
require DIR_WS_CLASSES . 'order.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:super_orders.php
注:本文中的zen_redirect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论