📄 application_top.php
字号:
<?php
/*
$Id: application_top.php,v 1.238 2002/07/11 17:20:07 dgw_ Exp $
网络商店 - 吉鑫网络
http://www.chinaifc.com
Copyright (c) 2000,2001 网络商店
汗化版权所有吉鑫网络
*/
// Start the clock for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
// Check if register_globals is enabled.
// Since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.
ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');
// Disable use_trans_sid as tep_href_link() does this manually
if (function_exists('ini_set')) {
ini_set('session.use_trans_sid', 0);
}
// Set the local configuration parameters - mainly for developers
if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');
// include server parameters
require('includes/configure.php');
// Define the project version
define('PROJECT_VERSION', 'F60 在线商店');
// define the filenames used in the project
define('FILENAME_ACCOUNT', 'account.php');
define('FILENAME_ACCOUNT_EDIT', 'account_edit.php');
define('FILENAME_ACCOUNT_EDIT_PROCESS', 'account_edit_process.php');
define('FILENAME_ACCOUNT_HISTORY', 'account_history.php');
define('FILENAME_ACCOUNT_HISTORY_INFO', 'account_history_info.php');
define('FILENAME_ADDRESS_BOOK', 'address_book.php');
define('FILENAME_ADDRESS_BOOK_PROCESS', 'address_book_process.php');
define('FILENAME_ADVANCED_SEARCH', 'advanced_search.php');
define('FILENAME_ADVANCED_SEARCH_RESULT', 'advanced_search_result.php');
define('FILENAME_ALSO_PURCHASED_PRODUCTS', 'also_purchased_products.php'); // This is the bottom of product_info.php (found in modules)
define('FILENAME_CCVAL_FUNCTION', 'ccval.php');
define('FILENAME_CHECKOUT_ADDRESS', 'checkout_address.php');
define('FILENAME_CHECKOUT_CONFIRMATION', 'checkout_confirmation.php');
define('FILENAME_CHECKOUT_PAYMENT', 'checkout_payment.php');
define('FILENAME_CHECKOUT_PROCESS', 'checkout_process.php');
define('FILENAME_CHECKOUT_SUCCESS', 'checkout_success.php');
define('FILENAME_CONTACT_US', 'contact_us.php');
define('FILENAME_CONDITIONS', 'conditions.php');
define('FILENAME_CREATE_ACCOUNT', 'create_account.php');
define('FILENAME_CREATE_ACCOUNT_PROCESS', 'create_account_process.php');
define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php');
define('FILENAME_DEFAULT', 'default.php');
define('FILENAME_DOWNLOAD', 'download.php');
define('FILENAME_INFO_SHOPPING_CART', 'info_shopping_cart.php');
define('FILENAME_LOGIN', 'login.php');
define('FILENAME_LOGOFF', 'logoff.php');
define('FILENAME_NEW_PRODUCTS', 'new_products.php'); // This is the middle of default.php (found in modules)
define('FILENAME_PASSWORD_CRYPT', 'password_funcs.php');
define('FILENAME_PASSWORD_FORGOTTEN', 'password_forgotten.php');
define('FILENAME_POPUP_IMAGE', 'popup_image.php');
define('FILENAME_POPUP_SEARCH_HELP', 'popup_search_help.php');
define('FILENAME_PRIVACY', 'privacy.php');
define('FILENAME_PRODUCT_INFO', 'product_info.php');
define('FILENAME_PRODUCT_LISTING', 'product_listing_col.php');
define('FILENAME_PRODUCT_NOTIFICATIONS', 'product_notifications.php');
define('FILENAME_PRODUCT_REVIEWS', 'product_reviews.php');
define('FILENAME_PRODUCT_REVIEWS_INFO', 'product_reviews_info.php');
define('FILENAME_PRODUCT_REVIEWS_WRITE', 'product_reviews_write.php');
define('FILENAME_PRODUCTS_NEW', 'products_new.php');
define('FILENAME_REDIRECT', 'redirect.php');
define('FILENAME_REVIEWS', 'reviews.php');
define('FILENAME_SHIPPING', 'shipping.php');
define('FILENAME_SHOPPING_CART', 'shopping_cart.php');
define('FILENAME_SPECIALS', 'specials.php');
define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');
define('FILENAME_KSY', 'ksy.php');
define('FILENAME_HALP', 'help.php');
define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php'); // This is the bottom of default.php (found in modules)
// define the database table names used in the project
define('TABLE_ADDRESS_BOOK', 'address_book');
define('TABLE_ADDRESS_FORMAT', 'address_format');
define('TABLE_BANNERS', 'banners');
define('TABLE_BANNERS_HISTORY', 'banners_history');
define('TABLE_CATEGORIES', 'categories');
define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');
define('TABLE_CONFIGURATION', 'configuration');
define('TABLE_CONFIGURATION_GROUP', 'configuration_group');
define('TABLE_COUNTER', 'counter');
define('TABLE_COUNTER_HISTORY', 'counter_history');
define('TABLE_COUNTRIES', 'countries');
define('TABLE_CURRENCIES', 'currencies');
define('TABLE_CUSTOMERS', 'customers');
define('TABLE_CUSTOMERS_BASKET', 'customers_basket');
define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', 'customers_basket_attributes');
define('TABLE_CUSTOMERS_INFO', 'customers_info');
define('TABLE_LANGUAGES', 'languages');
define('TABLE_MANUFACTURERS', 'manufacturers');
define('TABLE_MANUFACTURERS_INFO', 'manufacturers_info');
define('TABLE_ORDERS', 'orders');
define('TABLE_ORDERS_PRODUCTS', 'orders_products');
define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', 'orders_products_attributes');
define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', 'orders_products_download');
define('TABLE_ORDERS_STATUS', 'orders_status');
define('TABLE_ORDERS_STATUS_HISTORY', 'orders_status_history');
define('TABLE_ORDERS_TOTAL', 'orders_total');
define('TABLE_PRODUCTS', 'products');
define('TABLE_PRODUCTS_ATTRIBUTES', 'products_attributes');
define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', 'products_attributes_download');
define('TABLE_PRODUCTS_DESCRIPTION', 'products_description');
define('TABLE_PRODUCTS_NOTIFICATIONS', 'products_notifications');
define('TABLE_PRODUCTS_OPTIONS', 'products_options');
define('TABLE_PRODUCTS_OPTIONS_VALUES', 'products_options_values');
define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', 'products_options_values_to_products_options');
define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories');
define('TABLE_REVIEWS', 'reviews');
define('TABLE_REVIEWS_DESCRIPTION', 'reviews_description');
define('TABLE_SESSIONS', 'sessions');
define('TABLE_SPECIALS', 'specials');
define('TABLE_TAX_CLASS', 'tax_class');
define('TABLE_TAX_RATES', 'tax_rates');
define('TABLE_GEO_ZONES', 'geo_zones');
define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');
define('TABLE_WHOS_ONLINE', 'whos_online');
define('TABLE_ZONES', 'zones');
// customization for the design layout
define('TAX_DECIMAL_PLACES', 0); // Pad the tax value this amount of decimal places
define('DISPLAY_PRICE_WITH_TAX', true); // Display prices with tax (true) or without tax (false)
define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)
// Control what fields of the customer table are used
define('ACCOUNT_GENDER', 'false');
define('ACCOUNT_DOB', 'false');
define('ACCOUNT_COMPANY', 'false');
define('ACCOUNT_SUBURB', 'false');
define('ACCOUNT_STATE', 'true');
// Categories Box: recursive products count
define('SHOW_COUNTS', 'true'); // show category count: true=Yes False=No
define('USE_RECURSIVE_COUNT', 'true'); // recursive count: true=Yes False=No
// check to see if php implemented session management functions - if not, include php3/php4 compatible session class
if (!function_exists('session_start')) {
define('PHP_SESSION_NAME', 'sID');
define('PHP_SESSION_SAVE_PATH', '/tmp');
include(DIR_WS_CLASSES . 'sessions.php');
}
// define how the session functions will be used
require(DIR_WS_FUNCTIONS . 'sessions.php');
tep_session_name('osCsid');
// include the database functions
require(DIR_WS_FUNCTIONS . 'database.php');
// make a connection to the database... now
tep_db_connect() or die('Unable to connect to database server!');
// set the application parameters (can be modified through the administration tool)
$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION . '');
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
// Get variables from $PATH_INFO
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
if (strlen($PATH_INFO) > 1) {
$PHP_SELF = str_replace($PATH_INFO,'',$PHP_SELF);
$vars = explode('/', substr($PATH_INFO, 1));
while (list(, $var) = each($vars)) {
list(, $val) = each($vars);
$HTTP_GET_VARS[$var] = $val;
$GLOBALS[$var] = $val;
}
}
}
// include cache functions if enabled
if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php');
// include shopping cart class
require(DIR_WS_CLASSES . 'shopping_cart.php');
// include navigation history class
require(DIR_WS_CLASSES . 'navigation_history.php');
// some code to solve compatibility issues
require(DIR_WS_FUNCTIONS . 'compatibility.php');
// lets start our session
if ($HTTP_POST_VARS[tep_session_name()]) {
tep_session_id($HTTP_POST_VARS[tep_session_name()]);
}
if ( (getenv('HTTPS') == 'on') && ($HTTP_GET_VARS[tep_session_name()]) ) {
tep_session_id($HTTP_GET_VARS[tep_session_name()]);
}
if (function_exists('session_set_cookie_params')) {
session_set_cookie_params(0, substr(DIR_WS_CATALOG, 0, -1));
}
tep_session_start();
// Create the cart & Fix the cart if necesary
if ($cart) {
if (PHP_VERSION < 4) {
$broken_cart = $cart;
$cart = new shoppingCart;
$cart->unserialize($broken_cart);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -