本文整理汇总了PHP中oos_redirect函数 的典型用法代码示例。如果您正苦于以下问题:PHP oos_redirect函数的具体用法?PHP oos_redirect怎么用?PHP oos_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oos_redirect函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: create_plugin_instance
function create_plugin_instance()
{
$aFilename = oos_get_filename();
$aModules = oos_get_modules();
if ($_GET['file'] != $aFilename['info_down_for_maintenance']) {
oos_redirect(oos_href_link($aModules['info'], $aFilename['info_down_for_maintenance'], '', 'NONSSL', true, false));
}
return true;
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:9, 代码来源:oos_event_down_for_maintenance.php
示例2: create_plugin_instance
function create_plugin_instance()
{
if (!isset($_SESSION['customer_id'])) {
$aFilename = oos_get_filename();
$aModules = oos_get_modules();
if ($_GET['mp'] != $aModules['user']) {
$_SESSION['navigation']->set_snapshot();
oos_redirect(oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL'));
}
}
return true;
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:12, 代码来源:oos_event_customer_must_login.php
示例3: oos_redirect
if ($check_customer_result->RecordCount()) {
$check_customer = $check_customer_result->fields;
$customerstable = $oostable['customers'];
$dbconn->Execute("UPDATE {$customerstable}\n SET customers_newsletter = '0'\n WHERE customers_id = '" . $check_customer['customers_id'] . "'");
oos_redirect(oos_href_link($aModules['newsletters'], $aFilename['newsletters_unsubscribe_success']));
} else {
$maillisttable = $oostable['maillist'];
$sql = "SELECT customers_firstname\n FROM {$maillisttable}\n WHERE customers_email_address = '" . oos_db_input($email_address) . "'";
$check_mail_customer_result = $dbconn->Execute($sql);
if ($check_mail_customer_result->RecordCount()) {
$maillisttable = $oostable['maillist'];
$dbconn->Execute("UPDATE {$maillisttable}\n SET customers_newsletter = '0'\n WHERE customers_email_address = '" . oos_db_input($email_address) . "'");
oos_redirect(oos_href_link($aModules['newsletters'], $aFilename['newsletters_unsubscribe_success']));
}
}
oos_redirect(oos_href_link($aModules['newsletters'], $aFilename['subscription_center'], 'email=nonexistent', 'SSL'));
} else {
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['newsletters'], $aFilename['newsletters']));
$aOption['template_main'] = $sTheme . '/modules/subscription_center.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_SERVICE;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
require 'includes/oos_counter.php';
}
// assign Smarty variables;
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'password_forgotten.gif'));
$oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading']));
$oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main']));
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:subscription_center.php
示例4: intval
}
}
if (isset($_POST['default']) && $_POST['default'] == 'on') {
$dbconn->Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '" . intval($orders_status_id) . "' WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ID'");
}
oos_redirect(oos_href_link_admin($aFilename['orders_status'], 'page=' . $_GET['page'] . '&oID=' . $orders_status_id));
break;
case 'deleteconfirm':
$oID = oos_db_prepare_input($_GET['oID']);
$orders_status_result = $dbconn->Execute("SELECT configuration_value FROM " . $oostable['configuration'] . " WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ID'");
$orders_status = $orders_status_result->fields;
if ($orders_status['configuration_value'] == $oID) {
$dbconn->Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '' WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ID'");
}
$dbconn->Execute("DELETE FROM " . $oostable['orders_status'] . " WHERE orders_status_id = '" . intval($oID) . "'");
oos_redirect(oos_href_link_admin($aFilename['orders_status'], 'page=' . $_GET['page']));
break;
case 'delete':
$oID = oos_db_prepare_input($_GET['oID']);
$orderstable = $oostable['orders'];
$status_result = $dbconn->Execute("SELECT COUNT(*) AS total FROM {$orderstable} WHERE orders_status = '" . intval($oID) . "'");
$status = $status_result->fields;
$remove_status = true;
if ($oID == DEFAULT_ORDERS_STATUS_ID) {
$remove_status = false;
$messageStack->add(ERROR_REMOVE_DEFAULT_ORDER_STATUS, 'error');
} elseif ($status['total'] > 0) {
$remove_status = false;
$messageStack->add(ERROR_STATUS_USED_IN_ORDERS, 'error');
} else {
$orders_status_historytable = $oostable['orders_status_history'];
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:orders_status.php
示例5: pre_confirmation_check
function pre_confirmation_check()
{
global $aLang;
include 'includes/classes/class_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($aLang['text_ccval_error_unknown_card'], substr($cc_validation->cc_number, 0, 4));
break;
case -2:
case -3:
case -4:
$error = $aLang['text_ccval_error_invalid_date'];
break;
case false:
$error = $aLang['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'];
$aFilename = oos_get_filename();
$aModules = oos_get_modules();
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], $payment_error_return, '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:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:ipayment.php
示例6: COUNT
$_SESSION['sendto'] = $_POST['address'];
$address_booktable = $oostable['address_book'];
$sql = "SELECT COUNT(*) AS total\n FROM {$address_booktable}\n WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'\n AND address_book_id = '" . intval($_SESSION['sendto']) . "'";
$check_address_result = $dbconn->Execute($sql);
$check_address = $check_address_result->fields;
if ($check_address['total'] == '1') {
if ($reset_shipping == true) {
unset($_SESSION['shipping']);
}
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
} else {
unset($_SESSION['sendto']);
}
} else {
$_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
}
}
if ($process == '0') {
$address_booktable = $oostable['address_book'];
$sql = "SELECT COUNT(*) AS total\n FROM {$address_booktable}\n WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'\n AND address_book_id != '" . intval($_SESSION['sendto']) . "'";
$addresses_count_result = $dbconn->Execute($sql);
$addresses_count = $addresses_count_result->fields['total'];
if ($addresses_count > 0) {
$radio_buttons = 0;
$address_booktable = $oostable['address_book'];
$sql = "SELECT address_book_id, entry_firstname AS firstname, entry_lastname AS lastname,\n entry_company AS company, entry_street_address AS street_address,\n entry_suburb AS suburb, entry_city AS city, entry_postcode AS postcode,\n entry_state AS state, entry_zone_id AS zone_id, entry_country_id AS country_id\n FROM {$address_booktable}\n WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'";
$addresses_result = $dbconn->Execute($sql);
$addresses_array = array();
while ($addresses = $addresses_result->fields) {
$format_id = oos_get_address_format_id($address['country_id']);
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:shipping_address.php
示例7: oos_redirect
}
oos_redirect(oos_href_link($aModules['user'], $aFilename['product_notifications'], '', 'SSL'));
} elseif (isset($_GET['action']) && $_GET['action'] == 'global_notify') {
if (isset($_POST['global']) && $_POST['global'] == 'enable') {
$customers_infotable = $oostable['customers_info'];
$dbconn->Execute("UPDATE {$customers_infotable}\n SET global_product_notifications = '1'\n WHERE customers_info_id = '" . intval($_SESSION['customer_id']) . "'");
} else {
$customers_infotable = $oostable['customers_info'];
$sql = "SELECT COUNT(*) AS total\n FROM {$customers_infotable}\n WHERE customers_info_id = '" . intval($_SESSION['customer_id']) . "'\n AND global_product_notifications = '1'";
$check_result = $dbconn->Execute($sql);
if ($check_result->fields['total'] > 0) {
$customers_infotable = $oostable['customers_info'];
$dbconn->Execute("UPDATE {$customers_infotable}\n SET global_product_notifications = '0'\n WHERE customers_info_id = '" . intval($_SESSION['customer_id']) . "'");
}
}
oos_redirect(oos_href_link($aModules['user'], $aFilename['product_notifications'], '', 'SSL'));
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title_1'], oos_href_link($aModules['user'], $aFilename['account'], '', 'SSL'));
$oBreadcrumb->add($aLang['navbar_title_2'], oos_href_link($aModules['user'], $aFilename['product_notifications'], '', 'SSL'));
$aOption['template_main'] = $sTheme . '/modules/user_product_notifications.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_ACCOUNT;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
require 'includes/oos_counter.php';
}
// assign Smarty variables;
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'account.gif'));
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:product_notifications.php
示例8: Copyright
Based on:
File: specials.php,v 1.46 2003/02/13 04:23:23 hpdl
----------------------------------------------------------------------
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
----------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
if (!$oEvent->installed_plugin('spezials')) {
$_SESSION['navigation']->remove_current_page();
oos_redirect(oos_href_link($aModules['main'], $aFilename['main'], 'history_back=true'));
}
// split-page-results
MyOOS_CoreApi::requireOnce('classes/class_split_page_results.php');
require 'includes/languages/' . $sLanguage . '/products_specials.php';
$aOption['template_main'] = $sTheme . '/products/specials.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$aOption['page_navigation'] = $sTheme . '/heading/page_navigation.html';
$nPageType = OOS_PAGE_TYPE_CATALOG;
$sGroup = trim($_SESSION['member']->group['text']);
$nPage = isset($_GET[page]) ? $_GET[page] + 0 : 1;
$contents_cache_id = $sTheme . '|info|' . $sGroup . '|spezials|' . $nPage . '|' . $sLanguage;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:specials.php
示例9: Copyright
Copyright (c) 2003 osCommerce
----------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
require 'includes/languages/' . $sLanguage . '/main_contact_us.php';
$error = '0';
if (isset($_POST['action']) && $_POST['action'] == 'send' && (isset($_SESSION['formid']) && $_SESSION['formid'] == $_POST['formid'])) {
$name = oos_prepare_input($_POST['name']);
$email = oos_prepare_input($_POST['email']);
$enquiry = oos_prepare_input($_POST['enquiry']);
if (oos_validate_is_email(trim($email))) {
oos_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $aLang['email_subject'], $enquiry, $name, $email);
oos_redirect(oos_href_link($aModules['main'], $aFilename['contact_us'], 'action=success'));
} else {
$error = '1';
}
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['main'], $aFilename['contact_us']));
$aOption['template_main'] = $sTheme . '/system/old_contact_us.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_MAINPAGE;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
require 'includes/oos_counter.php';
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:30, 代码来源:old_contact_us.php
示例10: create_plugin_instance
function create_plugin_instance()
{
global $request_type, $spider_flag, $spider_kill_sid;
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
$spider_flag = false;
$spider_kill_sid = '0';
// set the top level domains
$http_domain = oos_server_get_top_level_domain(OOS_HTTP_SERVER);
$https_domain = oos_server_get_top_level_domain(OOS_HTTPS_SERVER);
$current_domain = $request_type == 'NONSSL' ? $http_domain : $https_domain;
// set the session cookie parameters
if (function_exists('session_set_cookie_params')) {
session_set_cookie_params(0, '/', oos_is_not_null($current_domain) ? '.' . $current_domain : '');
} elseif (function_exists('ini_set')) {
ini_set('session.cookie_lifetime', '0');
ini_set('session.cookie_path', '/');
ini_set('session.cookie_domain', oos_is_not_null($current_domain) ? '.' . $current_domain : '');
}
// set the session ID if it exists
if (isset($_POST[oos_session_name()]) && ctype_alnum($_POST[oos_session_name()])) {
oos_session_id($_POST[oos_session_name()]);
} elseif (isset($_GET[oos_session_name()]) && ctype_alnum($_GET[oos_session_name()])) {
oos_session_id($_GET[oos_session_name()]);
}
if (empty($user_agent) === false) {
$spider_agent = @parse_ini_file('includes/ini/spiders.ini');
foreach ($spider_agent as $spider) {
if (empty($spider) === false) {
if (strpos($user_agent, trim($spider)) !== false) {
$spider_kill_sid = '1';
$spider_flag = true;
break;
}
}
}
}
if ($spider_flag === false) {
// set the session name and save path
oos_session_name('OOSSID');
// lets start our session
oos_session_start();
}
if (!isset($_SESSION)) {
$_SESSION = array();
}
// create the shopping cart
if (!isset($_SESSION['cart'])) {
$_SESSION['cart'] = new shoppingCart();
}
// navigation history
if (!isset($_SESSION['navigation'])) {
$_SESSION['navigation'] = new oosNavigationHistory();
}
if (!isset($_SESSION['error_cart_msg'])) {
$_SESSION['error_cart_msg'] = '';
}
$aFilename = oos_get_filename();
$aModules = oos_get_modules();
// verify the browser user agent
$http_user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
if (!isset($_SESSION['session_user_agent'])) {
$_SESSION['session_user_agent'] = $http_user_agent;
}
if ($_SESSION['session_user_agent'] != $http_user_agent) {
unset($_SESSION['customer_id']);
unset($_SESSION['session_user_agent']);
$_SESSION['cart']->reset();
$_SESSION['member']->default_member();
oos_redirect(oos_link($aModules['user'], $aFilename['login'], '', 'SSL'));
}
// verify the IP address
if (!isset($_SESSION['session_ip_address'])) {
$_SESSION['session_ip_address'] = MyOOS_Utilities::getRemoteHostAddress();
}
if ($_SESSION['session_ip_address'] != MyOOS_Utilities::getRemoteHostAddress()) {
unset($_SESSION['customer_id']);
unset($_SESSION['session_ip_address']);
$_SESSION['cart']->reset();
$_SESSION['member']->default_member();
oos_redirect(oos_link($aModules['user'], $aFilename['login'], '', 'SSL'));
}
return true;
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:83, 代码来源:oos_event_session.php
示例11: oos_db_perform
if (ACCOUNT_STATE == '1') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
}
oos_db_perform($oostable['address_book'], $sql_data_array);
$customers_infotable = $oostable['customers_info'];
$dbconn->Execute("INSERT INTO " . $customers_infotable . "\n (customers_info_id,\n customers_info_number_of_logons,\n customers_info_date_account_created) VALUES ('" . intval($customer_id) . "',\n '0',\n '" . date("Y-m-d H:i:s", time()) . "')");
$_SESSION['customer_id'] = $customer_id;
$_SESSION['customer_wishlist_link_id'] = $wishlist_link_id;
$_SESSION['customer_first_name'] = $firstname;
$_SESSION['customer_default_address_id'] = 1;
$_SESSION['customer_country_id'] = $country;
$_SESSION['customer_zone_id'] = $zone_id;
$_SESSION['customer_max_order'] = $customer_max_order;
$_SESSION['man_key'] = $keya;
if (ACCOUNT_VAT_ID == '1') {
if (ACCOUNT_COMPANY_VAT_ID_CHECK == '1' && $vatid_check_error === false) {
$_SESSION['customers_vat_id_status'] = 1;
} else {
$_SESSION['customers_vat_id_status'] = 0;
}
}
// restore cart contents
$_SESSION['cart']->restore_contents();
oos_redirect(oos_href_link($aModules['user'], $aFilename['create_account_success'], '', 'SSL'));
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:create_account_process.php
示例12: oos_prepare_input
$email_address = oos_prepare_input($_POST['email_address']);
$customerstable = $oostable['customers'];
$check_customer_sql = "SELECT customers_firstname, customers_lastname, customers_password, customers_id\n FROM {$customerstable}\n WHERE customers_email_address = '" . oos_db_input($email_address) . "'";
$check_customer_result = $dbconn->Execute($check_customer_sql);
if ($check_customer_result->RecordCount()) {
$check_customer = $check_customer_result->fields;
// Crypted password mods - create a new password, update the database and mail it to them
$newpass = oos_create_random_value(ENTRY_PASSWORD_MIN_LENGTH);
$crypted_password = oos_encrypt_password($newpass);
$customerstable = $oostable['customers'];
$dbconn->Execute("UPDATE {$customerstable}\n SET customers_password = '" . oos_db_input($crypted_password) . "'\n WHERE customers_id = '" . $check_customer['customers_id'] . "'");
oos_mail($check_customer['customers_firstname'] . " " . $check_customer['customers_lastname'], $email_address, $aLang['email_password_reminder_subject'], nl2br(sprintf($aLang['email_password_reminder_body'], $newpass)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$_SESSION['info_message'] = $aLang['text_password_sent'];
oos_redirect(oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL', true, false));
} else {
oos_redirect(oos_href_link($aModules['user'], $aFilename['password_forgotten'], 'email=nonexistent', 'SSL'));
}
} else {
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title_1'], oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL'));
$oBreadcrumb->add($aLang['navbar_title_2'], oos_href_link($aModules['user'], $aFilename['password_forgotten'], '', 'SSL'));
$aOption['template_main'] = $sTheme . '/modules/user_password_forgotten.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_SERVICE;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
require 'includes/oos_counter.php';
}
// assign Smarty variables;
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:password_forgotten.php
示例13: oos_redirect
}
}
if (strlen($_GET['pfrom']) > 0 && !(($errorno & 10000) == 10000) && strlen($_GET['pto']) > 0 && !(($errorno & 100000) == 100000)) {
if ($pfrom_to_check > $pto_to_check) {
$errorno += 1000000;
$error = 1;
}
}
if (strlen($_GET['keywords']) > 0) {
if (!oos_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
$errorno += 10000000;
$error = 1;
}
}
if ($error == 1) {
oos_redirect(oos_href_link($aModules['search'], $aFilename['advanced_search'], 'errorno=' . $errorno . '&' . oos_get_all_get_parameters()));
} else {
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title1'], oos_href_link($aModules['search'], $aFilename['advanced_search']));
$oBreadcrumb->add($aLang['navbar_title2'], oos_href_link($aModules['search'], $aFilename['advanced_search_result'], 'keywords=' . $_GET['keywords'] . '&search_in_description=' . $_GET['search_in_description'] . '&categories_id=' . $_GET['categories_id'] . '&inc_subcat=' . $_GET['inc_subcat'] . '&manufacturers_id=' . $_GET['manufacturers_id'] . '&pfrom=' . $_GET['pfrom'] . '&pto=' . $_GET['pto'] . '&dfrom=' . $_GET['dfrom'] . '&dto=' . $_GET['dto']));
// Search enhancement mod start
$search_keywords = oos_var_prep_for_os($_GET['keywords']);
$search_keywords = strip_tags($search_keywords);
$search_keywords = addslashes($search_keywords);
if ($search_keywords != $_SESSION['last_search_insert']) {
$dbconn->Execute("INSERT INTO " . $oostable['search_queries'] . " (search_text) VALUES ('" . oos_db_input($search_keywords) . "')");
$last_search_insert = $search_keywords;
$_SESSION['last_search_insert'] = $last_search_insert;
}
// Search enhancement mod end
// create column list
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:advanced_result.php
示例14: collect_posts
function collect_posts()
{
global $oCurrencies, $aLang;
// Get database information
$dbconn =& oosDBGetConn();
$oostable =& oosDBGetTables();
$aFilename = oos_get_filename();
$aModules = oos_get_modules();
if ($_POST['gv_redeem_code']) {
// get some info from the coupon table
$couponstable = $oostable['coupons'];
$sql = "SELECT coupon_id, coupon_amount, coupon_type, coupon_minimum_order,\n uses_per_coupon, uses_per_user, restrict_to_products,\n restrict_to_categories\n FROM {$couponstable}\n WHERE coupon_code = '" . oos_db_input($_POST['gv_redeem_code']) . "'\n AND coupon_active = 'Y'";
$coupon_query = $dbconn->Execute($sql);
$coupon_result = $coupon_query->fields;
if ($coupon_result['coupon_type'] != 'G') {
if ($coupon_query->RecordCount() == 0) {
$_SESSION['error_message'] = $aLang['error_no_invalid_redeem_coupon'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
$couponstable = $oostable['coupons'];
$sql = "SELECT coupon_start_date\n FROM {$couponstable}\n WHERE coupon_start_date <= '" . date("Y-m-d H:i:s", time()) . "'\n AND coupon_code= '" . oos_db_input($_POST['gv_redeem_code']) . "'";
$date_query = $dbconn->Execute($sql);
if ($date_query->RecordCount() == 0) {
$_SESSION['error_message'] = $aLang['error_invalid_startdate_coupon'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
$couponstable = $oostable['coupons'];
$sql = "SELECT coupon_expire_date\n FROM {$couponstable}\n WHERE coupon_expire_date >= '" . date("Y-m-d H:i:s", time()) . "'\n AND coupon_code= '" . oos_db_input($_POST['gv_redeem_code']) . "'";
$date_query = $dbconn->Execute($sql);
if ($date_query->RecordCount() == 0) {
$_SESSION['error_message'] = $aLang['error_invalid_finisdate_coupon'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
$coupon_redeem_tracktable = $oostable['coupon_redeem_track'];
$sql = "SELECT coupon_id\n FROM {$coupon_redeem_tracktable}\n WHERE coupon_id = '" . $coupon_result['coupon_id'] . "'";
$coupon_count = $dbconn->Execute($sql);
$coupon_redeem_tracktable = $oostable['coupon_redeem_track'];
$sql = "SELECT coupon_id\n FROM {$coupon_redeem_tracktable}\n WHERE coupon_id = '" . $coupon_result['coupon_id'] . "'\n AND customer_id = '" . intval($_SESSION['customer_id']) . "'";
$coupon_count_customer = $dbconn->Execute($sql);
if ($coupon_count->RecordCount() >= $coupon_result['uses_per_coupon'] && $coupon_result['uses_per_coupon'] > 0) {
$_SESSION['error_message'] = $aLang['error_invalid_uses_coupon'] . $coupon_result['uses_per_coupon'] . $aLang['times'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
if ($coupon_count_customer->RecordCount() >= $coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) {
$_SESSION['error_message'] = $aLang['error_invalid_uses_user_coupon'] . $coupon_result['uses_per_user'] . $aLang['times'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
if ($coupon_result['coupon_type'] == 'S') {
$coupon_amount = $oOrder->info['shipping_cost'];
} else {
$coupon_amount = $oCurrencies->format($coupon_result['coupon_amount']) . ' ';
}
if ($coupon_result['type'] == 'P') {
$coupon_amount = $coupon_result['coupon_amount'] . '% ';
}
if ($coupon_result['coupon_minimum_order'] > 0) {
$coupon_amount .= 'on orders greater than ' . $coupon_result['coupon_minimum_order'];
}
$_SESSION['cc_id'] = $coupon_result['coupon_id'];
}
if ($_POST['submit_redeem_coupon_x'] && !$_POST['gv_redeem_code']) {
$_SESSION['error_message'] = $aLang['error_no_invalid_redeem_coupon'];
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
}
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:66, 代码来源:ot_coupon.php
示例15: before_process
function before_process()
{
$aFilename = oos_get_filename();
$aModules = oos_get_modules();
if ($_POST['valid'] == '1') {
if ($remote_host = oos_server_get_var('REMOTE_HOST')) {
if ($remote_host != 'secpay.com') {
$remote_host = @gethostbyaddr($remote_host);
}
if ($remote_host != 'secpay.com') {
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], oos_session_name() . '=' . $_POST[oos_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
}
} else {
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], oos_session_name() . '=' . $_POST[oos_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
}
}
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:17, 代码来源:secpay.php
示例16: intval
}
// Die if remaining count is <=0
if ($downloads['download_count'] <= 0) {
die;
}
// Die if file is not there
if (!file_exists(OOS_DOWNLOAD_PATH . $downloads['orders_products_filename'])) {
die;
}
// Now decrement counter
$dbconn->Execute("UPDATE " . $oostable['orders_products_download'] . "\n SET download_count = download_count-1\n WHERE orders_products_download_id = '" . intval($_GET['id']) . "'");
// Now send the file with header() magic
header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: Application/octet-stream");
header("Content-disposition: attachment; filename=" . $downloads['orders_products_filename']);
if (DOWNLOAD_BY_REDIRECT == '1') {
// This will work only on Unix/Linux hosts
oos_unlink_temp_dir(OOS_DOWNLOAD_PATH_PUBLIC);
$tempdir = oos_random_name();
umask(00);
mkdir(OOS_DOWNLOAD_PATH_PUBLIC . $tempdir, 0777);
symlink(OOS_DOWNLOAD_PATH . $downloads['orders_products_filename'], OOS_DOWNLOAD_PATH_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);
oos_redirect(OOS_DOWNLOAD . $tempdir . '/' . $downloads['orders_products_filename']);
} else {
// This will work on all systems, but will need considerable resources
// We could also loop with fread($fp, 4096) to save memory
readfile(OOS_DOWNLOAD_PATH . $downloads['orders_products_filename']);
}
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:download.php
示例17: oos_redirect
if (isset($_SESSION['cart']->cartID) && isset($_SESSION['cartID'])) {
if ($_SESSION['cart']->cartID != $_SESSION['cartID']) {
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
}
}
// Stock Check
if (STOCK_CHECK == '1' && STOCK_ALLOW_CHECKOUT != '1') {
$products = $_SESSION['cart']->get_products();
$any_out_of_stock = 0;
for ($i = 0, $n = count($products); $i < $n; $i++) {
if (oos_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
$any_out_of_stock = 1;
}
}
if ($any_out_of_stock == 1) {
oos_redirect(oos_href_link($aModules['main'], $aFilename['main_shopping_cart']));
}
}
// if no billing destination address was selected, use the customers own address as default
if (!isset($_SESSION['billto'])) {
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
} else {
// verify the selected billing address
$address_booktable = $oostable['address_book'];
$sql = "SELECT COUNT(*) AS total\n FROM {$address_booktable}\n WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'\n AND address_book_id = '" . intval($_SESSION['billto']) . "'";
$check_address_result = $dbconn->Execute($sql);
$check_address = $check_address_result->fields;
if ($check_address['total'] != '1') {
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
if (isset($_SESSION['payment'])) {
unset($_SESSION['payment']);
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:payment.php
示例18: oos_redirect
$check_customer = $check_customer_result->fields;
$customerstable = $oostable['customers'];
$dbconn->Execute("UPDATE {$customerstable}\n SET customers_newsletter = '1'\n WHERE customers_id = '" . $check_customer['customers_id'] . "'");
oos_redirect(oos_href_link($aModules['newsletters'], $aFilename['newsletters_subscribe_success']));
} else {
$maillisttable = $oostable['maillist'];
$sql = "SELECT customers_firstname\n FROM {$maillisttable}\n WHERE customers_email_address = '" . oos_db_input($email_address) . "'";
$check_mail_customer_result = $dbconn->Execute($sql);
if ($check_mail_customer_result->RecordCount()) {
$maillisttable = $oostable['maillist'];
$dbconn->Execute("UPDATE {$maillisttable}\n SET customers_newsletter = '1'\n WHERE customers_email_address = '" . oos_db_input($email_address) . "'");
oos_redirect(oos_href_link($aModules['newsletters'], $aFilename['newsletters_subscribe_success']));
} else {
$sql_data_array = array('customers_firstname' => $firstname, 'customers_lastname' => $lastname, 'customers_email_address' => $email_address, 'customers_newsletter' => 1);
oos_db_perform($oostable['maillist'], $sql_data_array);
oos_redirect(oos_href_link($aModules['newsletters'], $aFilename['newsletters_subscribe_success']));
}
}
}
} else {
$oBreadcrumb->add($aLang['navbar_title_1'], oos_href_link($aModules['newsletters'], $aFilename['newsletters'], '', 'SSL'));
$aOption['template_main'] = $sTheme . '/modules/newsletters.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_SERVICE;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
require 'includes/oos_counter.php';
}
// assign Smarty variables;
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:newsletters.php
示例19: unset
}
if (isset($quote['error'])) {
unset($_SESSION['shipping']);
} else {
if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost'])) {
$_SESSION['shipping'] = array('id' => $_SESSION['shipping'], 'title' => $free_shipping == true ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')', 'cost' => $quote[0]['methods'][0]['cost']);
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
}
} else {
unset($_SESSION['shipping']);
}
}
} else {
$_SESSION['shipping'] = false;
oos_redirect(oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
}
}
// get all available shipping quotes
$quotes = $oShippingModules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!isset($_SESSION['shipping']) || isset($_SESSION['shipping']) && $_SESSION['shipping'] == false && oos_count_shipping_modules() > 1) {
$_SESSION['shipping'] = $oShippingModules->cheapest();
}
list($sess_class, $sess_method) = split('_', $_SESSION['shipping']['id']);
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title_1'], oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
$oBreadcrumb->add($aLang['navbar_title_2'], oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
开发者ID:BackupTheBerlios, 项目名称:oos-svn, 代码行数:31, 代码来源:shipping.php
M文件来源http://blog.chinaunix.net/u1/37798/showart_453835.html %% 符号变量与符
阅读:630| 2022-07-18
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1573| 2022-08-30
joaomh/curso-de-matlab
阅读:1144| 2022-08-17
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:999| 2022-11-06
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1070| 2022-08-17
方法一: onLoad: function () { this.setData({ height: wx.getSystemInfoSync().win
阅读:1026| 2022-07-18
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:752| 2022-08-16
The Motorola ACE1000 RTU through 2022-05-02 ships with a hardcoded SSH private k
阅读:633| 2022-07-29
在追求自己梦想的道路上,如果累了,可以停下来歇歇,然后继续前行,一定不要忘记最初
阅读:491| 2022-07-30
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:359| 2022-11-06
请发表评论