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


PHP smn_redirect函数代码示例

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


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

示例1: smn_redirect

function smn_redirect($url)
{
    global $logger;
    if (strstr($url, "\n") != false || strstr($url, "\r") != false) {
        smn_redirect(smn_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }
    header('Location: ' . $url);
    if (STORE_PAGE_PARSE_TIME == 'true') {
        if (!is_object($logger)) {
            $logger = new logger();
        }
        $logger->timer_stop();
    }
    exit;
}
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:15,代码来源:general.php

示例2: smn_redirect

function smn_redirect($url)
{
    if (strstr($url, "\n") != false || strstr($url, "\r") != false) {
        smn_redirect(smn_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }
    if (ENABLE_SSL == true && getenv('HTTPS') == 'on') {
        // We are loading an SSL page
        if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) {
            // NONSSL url
            $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER));
            // Change it to SSL
        }
    }
    header('Location: ' . str_replace('&', '&', $url));
    smn_exit();
}
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:16,代码来源:general.php

示例3: Copyright

/*
  Copyright (c) 2002 - 2006 SystemsManager.Net

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
if (!smn_session_is_registered('customer_id')) {
    //$navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_LOGIN, 'ID=' . $store_id, 'SSL'));
}
$set = isset($_GET['set']) ? $_GET['set'] : 'payment';
$action = isset($_GET['action']) ? $_GET['action'] : '';
require DIR_WS_CLASSES . 'store_modules.php';
$paymentModules = new store_modules('payment');
$shippingModules = new store_modules('shipping');
$orderTotalModules = new store_modules('order_total');
if (smn_not_null($action)) {
    $moduleType = $_GET['moduleType'];
    $moduleName = $_GET['moduleName'];
    require DIR_WS_LANGUAGES . 'install/' . $moduleType . '/' . $language . '.php';
    switch ($action) {
        case 'getInstallArray':
            $moduleInfo = new store_modules($moduleType);
            $notInstalled = $moduleInfo->getNotInstalledModules();
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:store_modules.php

示例4: Copyright

<?php

/*
  Copyright (c) 2002 - 2006 SystemsManager.Net

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
if (!smn_session_is_registered('affiliate_id')) {
    $navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_AFFILIATE, '', 'NONSSL'));
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_AFFILIATE_CLICKS, '', 'NONSSL'));
$affiliate_clickthroughs_raw = "\n    select a.*, pd.products_name from " . TABLE_AFFILIATE_CLICKTHROUGHS . " a \n    left join " . TABLE_PRODUCTS . " p on (p.products_id = a.affiliate_products_id) \n    left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "') \n    where a.affiliate_id = '" . $affiliate_id . "'  ORDER BY a.affiliate_clientdate desc\n    ";
$affiliate_clickthroughs_split = new splitPageResults($affiliate_clickthroughs_raw, MAX_DISPLAY_SEARCH_RESULTS);
$affiliate_clickthroughs_numrows_raw = "select count(*) as count from " . TABLE_AFFILIATE_CLICKTHROUGHS . " where affiliate_id = '" . $affiliate_id . "'";
$affiliate_clickthroughs_query = smn_db_query($affiliate_clickthroughs_numrows_raw);
$affiliate_clickthroughs_numrows = smn_db_fetch_array($affiliate_clickthroughs_query);
$affiliate_clickthroughs_numrows = $affiliate_clickthroughs_numrows['count'];
?>
 
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:30,代码来源:affiliate_clicks.php

示例5: elseif

            } elseif ($_GET['gID'] != 'edit_group') {
                $check_groups_name_query = smn_db_query("select admin_groups_name as group_name_new from " . TABLE_ADMIN_GROUPS . " where admin_groups_name like '%" . $name_replace . "%'");
                $check_duplicate = smn_db_num_rows($check_groups_name_query);
                if ($check_duplicate > 0) {
                    smn_redirect(smn_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID'] . '&gName=used&action=new_group'));
                } else {
                    $sql_product_data_array = array('products_quantity' => '1000', 'products_model' => 'mem_6_', 'products_price' => smn_db_prepare_input($_POST['admin_groups_cost']), 'products_date_available' => date('Y-m-d'), 'store_id' => 1, 'products_weight' => '0', 'products_status' => '1', 'products_tax_class_id' => '', 'products_date_added' => 'now()', 'products_image' => '', 'manufacturers_id' => '');
                    smn_db_perform(TABLE_PRODUCTS, $sql_product_data_array);
                    $products_id = smn_db_insert_id();
                    smn_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int) $products_id . "', '1')");
                    $languages = smn_get_languages();
                    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
                        $language_id = $languages[$i]['id'];
                        $sql_data_array = array('products_id' => $products_id, 'products_name' => smn_db_prepare_input($admin_groups_name), 'language_id' => $language_id, 'products_url' => HTTP_CATALOG_SERVER);
                        smn_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
                    }
                    $sql_data_array = array('admin_groups_name' => $admin_groups_name, 'admin_groups_store_type' => smn_db_prepare_input($_POST['admin_groups_store_types']), 'admin_groups_products_id' => $products_id, 'admin_sales_cost' => smn_db_prepare_input($_POST['admin_sales_cost']), 'admin_groups_max_products' => smn_db_prepare_input($_POST['admin_groups_max_products']));
                    smn_db_perform(TABLE_ADMIN_GROUPS, $sql_data_array);
                    $admin_groups_id = smn_db_insert_id();
                    $set_groups_id = smn_db_prepare_input($_POST['set_groups_id']);
                    $add_group_id = $set_groups_id . ',\'' . $admin_groups_id . '\'';
                    smn_db_query("alter table " . TABLE_ADMIN_FILES . " change admin_groups_id admin_groups_id set( " . $add_group_id . ") NOT NULL DEFAULT '1' ");
                    smn_redirect(smn_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $admin_groups_id));
                }
            }
            break;
    }
}
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:admin_members.php

示例6: smn_db_fetch_array

    $entry = smn_db_fetch_array($entry_query);
} elseif (isset($_GET['delete']) && is_numeric($_GET['delete'])) {
    if ($_GET['delete'] == $customer_default_address_id) {
        $messageStack->add_session('addressbook', WARNING_PRIMARY_ADDRESS_DELETION, 'warning');
        smn_redirect(smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL'));
    } else {
        $check_query = smn_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . (int) $_GET['delete'] . "' and customers_id = '" . (int) $customer_id . "'");
        $check = smn_db_fetch_array($check_query);
        if ($check['total'] < 1) {
            $messageStack->add_session('addressbook', ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY);
            smn_redirect(smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL'));
        }
    }
} else {
    $entry = array();
}
if (!isset($_GET['delete']) && !isset($_GET['edit'])) {
    if (smn_count_customer_address_book_entries() >= MAX_ADDRESS_BOOK_ENTRIES) {
        $messageStack->add_session('addressbook', ERROR_ADDRESS_BOOK_FULL);
        smn_redirect(smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL'));
    }
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL'));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL'));
if (isset($_GET['edit']) && is_numeric($_GET['edit'])) {
    $breadcrumb->add(NAVBAR_TITLE_MODIFY_ENTRY, smn_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $_GET['edit'], 'NONSSL'));
} elseif (isset($_GET['delete']) && is_numeric($_GET['delete'])) {
    $breadcrumb->add(NAVBAR_TITLE_DELETE_ENTRY, smn_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $_GET['delete'], 'NONSSL'));
} else {
    $breadcrumb->add(NAVBAR_TITLE_ADD_ENTRY, smn_href_link(FILENAME_ADDRESS_BOOK_PROCESS, '', 'NONSSL'));
}
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:address_book_process.php

示例7: pre_confirmation_check

 function pre_confirmation_check()
 {
     global $_POST;
     include DIR_WS_CLASSES . 'cc_validation.php';
     $cc_validation = new cc_validation();
     $result = $cc_validation->validate($_POST['ipayment_cc_number'], $_POST['ipayment_cc_expires_month'], $_POST['ipayment_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) {
         $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&ipayment_cc_owner=' . urlencode($_POST['ipayment_cc_owner']) . '&ipayment_cc_expires_month=' . $_POST['ipayment_cc_expires_month'] . '&ipayment_cc_expires_year=' . $_POST['ipayment_cc_expires_year'] . '&ipayment_cc_checkcode=' . $_POST['ipayment_cc_checkcode'];
         smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'NONSSL', 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:stanislauslive,项目名称:StanMarket,代码行数:29,代码来源:ipayment.php

示例8: Copyright

<?php

/*
  Copyright (c) 2002 - 2006 SystemsManager.Net

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
if (!smn_session_is_registered('customer_id')) {
    //$navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_ACCOUNT, 'ID=' . $store_id, 'NONSSL'));
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:23,代码来源:account.php

示例9: smn_db_prepare_input

if (isset($_POST['action']) && $_POST['action'] == 'process') {
    $password_current = smn_db_prepare_input($_POST['password_current']);
    $password_new = smn_db_prepare_input($_POST['password_new']);
    $password_confirmation = smn_db_prepare_input($_POST['password_confirmation']);
    $error = false;
    if (strlen($password_current) < ENTRY_PASSWORD_MIN_LENGTH) {
        $error = true;
        $messageStack->add('account_password', ENTRY_PASSWORD_CURRENT_ERROR);
    } elseif (strlen($password_new) < ENTRY_PASSWORD_MIN_LENGTH) {
        $error = true;
        $messageStack->add('account_password', ENTRY_PASSWORD_NEW_ERROR);
    } elseif ($password_new != $password_confirmation) {
        $error = true;
        $messageStack->add('account_password', ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING);
    }
    if ($error == false) {
        $check_customer_query = smn_db_query("select customers_password from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "'");
        $check_customer = smn_db_fetch_array($check_customer_query);
        if (smn_validate_password($password_current, $check_customer['customers_password'])) {
            smn_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . smn_encrypt_password($password_new) . "' where customers_id = '" . (int) $customer_id . "'");
            smn_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int) $customer_id . "'");
            $messageStack->add_session('account', SUCCESS_PASSWORD_UPDATED, 'success');
            smn_redirect(smn_href_link(FILENAME_DEFAULT, '', 'NONSSL'));
        } else {
            $error = true;
            $messageStack->add('account_password', ERROR_CURRENT_PASSWORD_NOT_MATCHING);
        }
    }
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL'));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'NONSSL'));
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:account_password.php

示例10: smn_redirect

                smn_redirect(smn_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'selected_box=affiliate&page=' . $_GET['page'] . '&abID=' . $affiliate_banners_id));
            } else {
                $_GET['action'] = 'new';
            }
            break;
        case 'deleteconfirm':
            $affiliate_banners_id = smn_db_prepare_input($_GET['abID']);
            $delete_image = smn_db_prepare_input($_POST['delete_image']);
            if ($delete_image == 'on') {
                $affiliate_banner_query = smn_db_query("select affiliate_banners_image from " . TABLE_AFFILIATE_BANNERS . " where affiliate_banners_id = '" . smn_db_input($affiliate_banners_id) . "'");
                $affiliate_banner = smn_db_fetch_array($affiliate_banner_query);
                if (is_file(DIR_FS_CATALOG_IMAGES . $affiliate_banner['affiliate_banners_image'])) {
                    if (is_writeable(DIR_FS_CATALOG_IMAGES . $affiliate_banner['affiliate_banners_image'])) {
                        unlink(DIR_FS_CATALOG_IMAGES . $affiliate_banner['affiliate_banners_image']);
                    } else {
                        $messageStack->add_session(ERROR_IMAGE_IS_NOT_WRITEABLE, 'error');
                    }
                } else {
                    $messageStack->add_session(ERROR_IMAGE_DOES_NOT_EXIST, 'error');
                }
            }
            smn_db_query("delete from " . TABLE_AFFILIATE_BANNERS . " where affiliate_banners_id = '" . smn_db_input($affiliate_banners_id) . "'");
            smn_db_query("delete from " . TABLE_AFFILIATE_BANNERS_HISTORY . " where affiliate_banners_id = '" . smn_db_input($affiliate_banners_id) . "'");
            $messageStack->add_session(SUCCESS_BANNER_REMOVED, 'success');
            smn_redirect(smn_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'selected_box=affiliate&page=' . $_GET['page']));
            break;
    }
}
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:affiliate_banners.php

示例11: strip_tags

for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
}
if ($order->content_type != 'virtual') {
    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . smn_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
}
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . smn_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
if (is_object(${$payment})) {
    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
    $payment_class = ${$payment};
    $email_order .= $order->info['payment_method'] . "\n\n";
    if ($payment_class->email_footer) {
        $email_order .= $payment_class->email_footer . "\n\n";
    }
}
smn_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, $store->get_store_owner(), $store->get_store_owner_email_address());
// load the after_process function from the payment modules
$payment_modules->after_process();
// unregister session variables used during checkout
smn_session_unregister('sendto');
smn_session_unregister('billto');
smn_session_unregister('shipping');
smn_session_unregister('shipping_store');
smn_session_unregister('payment');
smn_session_unregister('comments');
if (smn_session_is_registered('credit_covers')) {
    smn_session_unregister('credit_covers');
}
$order_total_modules->clear_posts();
smn_redirect(smn_href_link(FILENAME_CHECKOUT_SUCCESS, 'orders_id=' . $insert_id, 'NONSSL'));
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:30,代码来源:checkout_process.php

示例12: Copyright

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
if (!smn_session_is_registered('affiliate_id')) {
    $navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_AFFILIATE, '', 'NONSSL'));
}
$error = false;
if (isset($_GET['action']) && $_GET['action'] == 'send') {
    if (smn_validate_email(trim($_POST['email']))) {
        smn_mail($store->get_store_owner(), AFFILIATE_EMAIL_ADDRESS, EMAIL_SUBJECT, $_POST['enquiry'], $_POST['name'], $_POST['email']);
        smn_redirect(smn_href_link(FILENAME_AFFILIATE_CONTACT, 'action=success'));
    } else {
        $error = true;
    }
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_AFFILIATE_CONTACT));
$affiliate_values = smn_db_query("select * from " . TABLE_AFFILIATE . " where affiliate_id = '" . $affiliate_id . "'");
$affiliate = smn_db_fetch_array($affiliate_values);
?>
 
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:30,代码来源:affiliate_contact.php

示例13: smn_redirect

    $navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
}
if (isset($_GET['action']) && $_GET['action'] == 'update_notifications') {
    $products = $_POST['products'];
    $remove = '';
    for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
        $remove .= '\'' . $products[$i] . '\',';
    }
    $remove = substr($remove, 0, -1);
    if (smn_not_null($remove)) {
        smn_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = '" . $customer_id . "' and products_id in (" . $remove . ")");
    }
    smn_redirect(smn_href_link(FILENAME_PRODUCT_NOTIFICATIONS, '', 'NONSSL'));
} elseif (isset($_GET['action']) && $_GET['action'] == 'global_notify') {
    if (isset($_POST['global']) && $_POST['global'] == 'enable') {
        smn_db_query("update " . TABLE_CUSTOMERS_INFO . " set global_product_notifications = '1' where customers_info_id = '" . $customer_id . "'");
    } else {
        $check_query = smn_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "' and global_product_notifications = '1'");
        $check = smn_db_fetch_array($check_query);
        if ($check['count'] > 0) {
            smn_db_query("update " . TABLE_CUSTOMERS_INFO . " set global_product_notifications = '0' where customers_info_id = '" . $customer_id . "'");
        }
    }
    smn_redirect(smn_href_link(FILENAME_PRODUCT_NOTIFICATIONS, '', 'NONSSL'));
}
//require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_NOTIFICATIONS);
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL'));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_PRODUCT_NOTIFICATIONS, '', 'NONSSL'));
$global_status_query = smn_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'");
$global_status = smn_db_fetch_array($global_status_query);
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:product_notifications.php

示例14: Copyright

  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
$error = false;
/*
  if ( (isset($_POST['store_category']) && empty($_POST['store_category'])) &&
       (isset($_POST['dfrom']) && (empty($_POST['dfrom']) || ($_POST['dfrom'] == DOB_FORMAT_STRING))) &&
       (isset($_POST['dto']) && (empty($_POST['dto']) || ($_POST['dto'] == DOB_FORMAT_STRING))) &&
       (isset($_POST['pfrom']) && !is_numeric($_POST['pfrom'])) &&
       (isset($_POST['pto']) && !is_numeric($_POST['pto'])) ) {
*/
//echo "store:".$_POST['store_category'].":category:".$_POST['product_category'].":descrip:".$_POST['product_description'].":<br>";
if (isset($_POST['store_category']) && $_POST['store_category'] == 0 && (isset($_POST['product_category']) && $_POST['product_category'] == 0) && (isset($_POST['product_description']) && empty($_POST['product_description']))) {
    $error = true;
    $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);
} else {
}
if ($error == true) {
    smn_redirect(smn_href_link(FILENAME_ADVANCED_SEARCH, 'ID=' . $store_id . '&' . smn_get_all_get_params(), 'NONSSL', true, false));
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ADVANCED_SEARCH));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ADVANCED_SEARCH_RESULT, smn_get_all_get_params(), 'NONSSL', true, false));
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:advanced_search_result.php

示例15: smn_session_register

                }
            }
        } else {
            smn_session_register('sendto');
        }
        $sendto = $_POST['address'];
        $check_address_query = smn_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $sendto . "'");
        $check_address = smn_db_fetch_array($check_address_query);
        if ($check_address['total'] == '1') {
            if ($reset_shipping == true) {
                smn_session_unregister('shipping');
            }
            smn_redirect(smn_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
        } else {
            smn_session_unregister('sendto');
        }
    } else {
        if (!smn_session_is_registered('sendto')) {
            smn_session_register('sendto');
        }
        $sendto = $customer_default_address_id;
        smn_redirect(smn_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
    }
}
// if no shipping destination address was selected, use their own address as default
if (!smn_session_is_registered('sendto')) {
    $sendto = $customer_default_address_id;
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'NONSSL'));
$addresses_count = smn_count_customer_address_book_entries();
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:checkout_shipping_address.php


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