Exemplo n.º 1
0
    }
    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
}
// include the language translations
// Code moved further below since messageStack class must be initiated first.
// define our localization functions
require DIR_WS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
// setup our boxes
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// split-page-results
require DIR_WS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_WS_CLASSES . 'object_info.php';
// email classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
// file uploading class
require DIR_WS_CLASSES . 'upload.php';
// include the language translations
// BOF: [TiM's osC Solutions] Display english for missing language files
if (file_exists(DIR_WS_LANGUAGES . $language . '/core.php')) {
    require_once DIR_WS_LANGUAGES . $language . '/core.php';
} else {
    if (file_exists(DIR_WS_LANGUAGES . $language . '/core.php')) {
Exemplo n.º 2
0
                if (empty($htpasswd_array)) {
                    for ($i = 0, $n = sizeof($htaccess_array); $i < $n; $i++) {
                        if (in_array($htaccess_array[$i], $authuserfile_array)) {
                            unset($htaccess_array[$i]);
                        }
                    }
                    $fp = fopen(DIR_FS_ADMIN . '.htaccess', 'w');
                    fwrite($fp, implode("\n", $htaccess_array));
                    fclose($fp);
                }
            }
            tep_redirect(tep_href_link(FILENAME_ADMINISTRATORS));
            break;
    }
}
$secMessageStack = new messageStack();
if (is_array($htpasswd_array)) {
    if (empty($htpasswd_array)) {
        $secMessageStack->add(sprintf(HTPASSWD_INFO, implode('<br />', $authuserfile_array)), 'error');
    } else {
        $secMessageStack->add(HTPASSWD_SECURED, 'success');
    }
} else {
    $secMessageStack->add(HTPASSWD_PERMISSIONS, 'error');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
Exemplo n.º 3
0
install_lang('phreedom', $lang, 'language');
// install general language file
install_lang('phreeform', $lang, 'language');
// install general language file
require_once 'defaults.php';
require_once DIR_FS_MODULES . 'phreedom/defaults.php';
require_once DIR_FS_MODULES . 'phreeform/defaults.php';
require_once '../includes/common_functions.php';
require_once '../includes/common_classes.php';
require_once DIR_FS_MODULES . 'phreedom/functions/phreedom.php';
require_once DIR_FS_MODULES . 'phreeform/functions/phreeform.php';
require_once DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php';
/**************   page specific initialization  *************************/
$error = false;
$caution = false;
$messageStack = new messageStack();
/***************   act on the action request   *************************/
switch ($_REQUEST['action']) {
    default:
    case 'welcome':
        if (isset($_POST['license_consent']) && $_POST['license_consent'] == 'disagree') {
            header('location: index.php');
        }
        $include_template = 'template_welcome.php';
        define('PAGE_TITLE', TITLE_WELCOME);
        break;
    case 'inspect':
        // check for decline
        if ($_POST['license'] == 'disagree') {
            header('location: http://www.google.com');
        }
<?php

/**
 * functions/extra_functions/reloaded_related_products_functions
 * 
 * Add products_family field to the products table
 * 
 * @package ZenCart
 * @author Joe McFrederick
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */
if (!class_exists('messageStack')) {
    include '../../classes/message_stack.php';
}
if (!is_object($reloadedStack)) {
    $reloadedStack = new messageStack();
}
//Auto install check
$reloadedRelatedCheck = $db->Execute("SHOW COLUMNS FROM " . TABLE_PRODUCTS . " LIKE 'products_family'");
if (($reloadedRelatedCheck->RecordCount() < 1 or !defined('SHOW_PRODUCT_INFO_COLUMNS_RELATED_PRODUCTS')) and basename($_SERVER['PHP_SELF']) == 'index.php') {
    $reloadedStack->add('Related Products <b>not installed</b><a href="index.php?install_related_products=yes">[Click to Install]</a>');
}
/**
 * Install configuration into database
 * @param none
 */
function reloaded_related_install()
{
    global $db, $reloadedStack;
    // Maintenance to remove old configuration values
    $keys = reloaded_related_keys();
Exemplo n.º 5
0
// include the language translations
require DIR_WS_LANGUAGES . $language . '.php';
$current_page = basename($PHP_SELF);
if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {
    include DIR_WS_LANGUAGES . $language . '/' . $current_page;
}
// define our localization functions
require DIR_WS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
// setup our boxes
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// split-page-results
require DIR_WS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_WS_CLASSES . 'object_info.php';
// email classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
// file uploading class
require DIR_WS_CLASSES . 'upload.php';
// calculate category path
if (isset($_GET['cPath'])) {
    $cPath = $_GET['cPath'];
} elseif (isset($_POST['cPath'])) {
    $cPath = $_POST['cPath'];
} else {
Exemplo n.º 6
0
require DIR_WS_CLASSES . 'split_page_results.php';
// infobox
require DIR_WS_CLASSES . 'boxes.php';
// auto activate and expire banners
require DIR_WS_FUNCTIONS . 'banner.php';
tep_activate_banners();
tep_expire_banners();
// auto expire special products
//  require(DIR_WS_FUNCTIONS . 'specials.php');
//  tep_expire_specials();
// include the breadcrumb class and start the breadcrumb trail
require DIR_WS_CLASSES . 'breadcrumb.php';
$breadcrumb = new breadcrumb();
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
$default_page_query = tep_db_query("select pages_name from " . TABLE_PAGES . " where pages_filename = '" . tep_db_input(FILENAME_DEFAULT) . "' and language_id = '" . (int) $languages_id . "'");
$default_page = tep_db_fetch_array($default_page_query);
$breadcrumb->add($default_page['pages_name'], tep_href_link(FILENAME_DEFAULT));
if (substr($HTTP_GET_VARS['action'], 0, 11) == 'desactivate' || substr($HTTP_GET_VARS['action'], 0, 8) == 'activate') {
    list($product_action, $product_code, $product_type) = explode('_', $HTTP_GET_VARS['action']);
    if ($product_action == 'desactivate') {
        $product_new_status = 0;
    } elseif ($product_action == 'activate') {
        $product_new_status = 1;
    } else {
        $product_new_status = '';
    }
    if (($product_new_status == 0 || $product_new_status == 1) && (int) $product_code > 0) {
        $product_code = 'bbk' . sprintf('%010d', (int) $product_code);
        $product_check_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_code = '" . tep_db_input($product_code) . "' and products_types_id = '" . (int) $product_type . "'");
require 'includes/application.php';
require '../admin/includes/configure.php';
require_once DIR_FS_INC . 'xtc_db_connect.inc.php';
require_once DIR_FS_INC . 'xtc_validate_email.inc.php';
require_once DIR_FS_INC . 'xtc_db_input.inc.php';
require_once DIR_FS_INC . 'xtc_db_num_rows.inc.php';
require_once DIR_FS_INC . 'xtc_redirect.inc.php';
require_once DIR_FS_INC . 'xtc_href_link.inc.php';
require_once DIR_FS_INC . 'xtc_draw_pull_down_menu.inc.php';
require_once DIR_FS_INC . 'xtc_draw_input_field.inc.php';
require_once DIR_FS_INC . 'xtc_get_country_list.inc.php';
require_once DIR_FS_INC . 'xtc_get_country_name.inc.php';
include 'language/' . $lang . '.php';
// connect do database
xtc_db_connect() or die('Unable to connect to database server!');
$messageStack = new messageStack();
$process = false;
if (isset($_POST['action']) && $_POST['action'] == 'process') {
    $process = true;
    $store_name = xtc_db_prepare_input($_POST['STORE_NAME']);
    $email_from = xtc_db_prepare_input($_POST['EMAIL_ADRESS_FROM']);
    $zone_setup = xtc_db_prepare_input($_POST['ZONE_SETUP']);
    $company = xtc_db_prepare_input($_POST['COMPANY']);
    $street_address = xtc_db_prepare_input($_POST['STREET_ADRESS']);
    $postcode = xtc_db_prepare_input($_POST['POST_CODE']);
    $city = xtc_db_prepare_input($_POST['CITY']);
    $country = xtc_db_prepare_input($_POST['COUNTRY']);
    $telephone_number = xtc_db_prepare_input($_POST['TELEPHONE']);
    $error = false;
    if (strlen($store_name) < '3') {
        $error = true;
Exemplo n.º 8
0
$custom_path = DIR_FS_MODULES . $module . '/custom/pages/' . $page . '/extra_defines.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
gen_pull_language($module);
define('DIR_WS_THEMES', 'themes/' . (isset($_SESSION['admin_prefs']['theme']) ? $_SESSION['admin_prefs']['theme'] : DEFAULT_THEME) . '/');
define('MY_COLORS', isset($_SESSION['admin_prefs']['colors']) ? $_SESSION['admin_prefs']['colors'] : DEFAULT_COLORS);
define('MY_MENU', isset($_SESSION['admin_prefs']['menu']) ? $_SESSION['admin_prefs']['menu'] : DEFAULT_MENU);
define('DIR_WS_IMAGES', DIR_WS_THEMES . 'images/');
if (file_exists(DIR_WS_THEMES . 'icons/')) {
    define('DIR_WS_ICONS', DIR_WS_THEMES . 'icons/');
} else {
    define('DIR_WS_ICONS', 'themes/default/icons/');
}
// use default
$messageStack = new messageStack();
$toolbar = new toolbar();
// determine what company to connect to
$db_company = isset($_SESSION['company']) ? $_SESSION['company'] : $_SESSION['companies'][$_POST['company']];
if ($db_company && file_exists(DIR_FS_MY_FILES . $db_company . '/config.php')) {
    define('DB_DATABASE', $db_company);
    require_once DIR_FS_MY_FILES . $db_company . '/config.php';
    define('DB_SERVER_HOST', DB_SERVER);
    // for old PhreeBooks installs
    // Load queryFactory db classes
    require_once DIR_FS_INCLUDES . 'db/' . DB_TYPE . '/query_factory.php';
    $db = new queryFactory();
    $db->connect(DB_SERVER_HOST, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE);
    // set application wide parameters for phreebooks module
    $result = $db->Execute_return_error("select configuration_key, configuration_value from " . DB_PREFIX . "configuration");
    if ($db->error_number != '' || $result->RecordCount() == 0) {
require_once DIR_FS_INC . 'xtc_redirect.inc.php';
require_once DIR_FS_INC . 'xtc_href_link.inc.php';
require_once DIR_FS_INC . 'xtc_draw_pull_down_menu.inc.php';
require_once DIR_FS_INC . 'xtc_draw_input_field.inc.php';
require_once DIR_FS_INC . 'xtc_get_country_list.inc.php';
require_once DIR_FS_INC . 'xtc_draw_hidden_field_installer.inc.php';
require_once DIR_FS_INC . 'xtc_db_insert_id.inc.php';
include 'language/' . $lang . '.php';
// connect to database
xtc_db_connect() or die('Unable to connect to database server!');
// get configuration data
$configuration_query = xtc_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
while ($configuration = xtc_db_fetch_array($configuration_query)) {
    define($configuration['cfgKey'], $configuration['cfgValue']);
}
$messageStack = new messageStack();
$process = false;
if (isset($_POST['action']) && $_POST['action'] == 'process') {
    $process = true;
    $gender = xtc_db_prepare_input($_POST['GENDER']);
    $firstname = xtc_db_prepare_input($_POST['FIRST_NAME']);
    $lastname = xtc_db_prepare_input($_POST['LAST_NAME']);
    $email_address = xtc_db_prepare_input($_POST['EMAIL_ADRESS']);
    $street_address = xtc_db_prepare_input($_POST['STREET_ADRESS']);
    $postcode = xtc_db_prepare_input($_POST['POST_CODE']);
    $city = xtc_db_prepare_input($_POST['CITY']);
    $zone_id = xtc_db_prepare_input($_POST['zone_id']);
    $state = xtc_db_prepare_input($_POST['STATE']);
    $country = xtc_db_prepare_input($_POST['COUNTRY']);
    $telephone = xtc_db_prepare_input($_POST['TELEPHONE']);
    $password = xtc_db_prepare_input($_POST['PASSWORD']);
Exemplo n.º 10
0
if (file_exists(DIR_FS_LANGUAGES . $language . '/' . $current_page)) {
    include DIR_FS_LANGUAGES . $language . '/' . $current_page;
}
// define our localization functions
require DIR_FS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
require DIR_FS_FUNCTIONS . 'validations.php';
// setup our boxes
require DIR_FS_CLASSES . 'table_block.php';
require DIR_FS_CLASSES . 'box.php';
// # initialize the message stack for output messages
if (!tep_session_is_registered('messageToStack')) {
    tep_session_register('messageToStack');
}
require DIR_FS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// split-page-results
require DIR_FS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_FS_CLASSES . 'object_info.php';
// email classes
require DIR_FS_CLASSES . 'mime.php';
require DIR_FS_CLASSES . 'email.php';
// file uploading class
require DIR_FS_CLASSES . 'upload.php';
// orderlist
define('FILENAME_ORDERLIST', 'orderlist.php');
// calculate category path
$cPath = isset($_GET['cPath']) ? $_GET['cPath'] : '';
if (tep_not_null($cPath)) {
    $cPath_array = tep_parse_category_path($cPath);
    if (NOT_USE_AJAX || IS_AJAX_PROCESSING) {
        if (PERIOD_DOWN_FOR_MAINTENANCE != EMPTY_STRING) {
            $ErrorMessage .= ltrim(PERIOD_DOWN_FOR_MAINTENANCE);
        }
        require_once DIR_FS_INC . 'olc_image.inc.php';
        if ($IsAdminFunction or USE_AJAX) {
            global $messageStack;
            if (!is_object($messageStack)) {
                // initialize the message stack for output messages
                if (IS_ADMIN_FUNCTION) {
                    $file = 'table_block';
                } else {
                    $file = 'boxes';
                }
                require_once DIR_WS_CLASSES . $file . PHP;
                require_once DIR_WS_CLASSES . 'message_stack.php';
                $messageStack = new messageStack();
            }
            if ($IsAdminFunction) {
                $messageStack->add($ErrorMessage, 'warning');
            } else {
                $messageStack->add('maintenance', $ErrorMessage, 'warning');
            }
        } else {
            require_once DIR_FS_INC . 'olc_output_warning.inc.php';
            require_once DIR_WS_CLASSES . 'boxes.php';
            olc_output_warning($ErrorMessage, true);
        }
    }
}
//  W. Kaiser EOF: WebMakers.com Added: Down for Maintenance
Exemplo n.º 12
0
}
// include the language translations
require DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '.php';
$current_page = basename($_SERVER['PHP_SELF']);
if (file_exists(DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '/' . $current_page)) {
    include DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '/' . $current_page;
}
// define our localization functions
require DIR_WS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
// initialize the message stack for output messages
if (!@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/classes/message_stack.php')) {
    require DIR_WS_CLASSES . 'message_stack.php';
}
$messageStack = new messageStack();
// initialize configuration modules
require DIR_WS_CLASSES . 'cfg_modules.php';
$cfgModules = new cfg_modules();
// split-page-results
require DIR_WS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_WS_CLASSES . 'object_info.php';
// include the mail class
require DIR_WS_CLASSES . 'mailer.php';
// file uploading class
require DIR_WS_CLASSES . 'upload.php';
// calculate category path
if (isset($_GET['cPath'])) {
    $cPath = $_GET['cPath'];
} else {
Exemplo n.º 13
0
        if ($_GET['main_page'] != CUSTOMERS_AUTHORIZATION_FILENAME) {
            zen_redirect(zen_href_link(CUSTOMERS_AUTHORIZATION_FILENAME));
        }
        break;
    case CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customers_authorization'] != '0':
        // customer may browse but no prices
        break;
    default:
        // proceed normally
        break;
}
// infobox
require DIR_WS_CLASSES . 'boxes.php';
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// Shopping cart actions
if (isset($_GET['action'])) {
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
        zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
    }
    if (DISPLAY_CART == 'true') {
        $goto = FILENAME_SHOPPING_CART;
        $parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
    } else {
        $goto = $_GET['main_page'];
        if ($_GET['action'] == 'buy_now') {
            $parameters = array('action');
        } else {
            $parameters = array('action', 'pid', 'main_page');
Exemplo n.º 14
0
require '../includes/classes/xml.php';
require '../includes/classes/datetime.php';
// set the language
require 'includes/classes/language.php';
$osC_Language = new osC_Language_Admin();
if (isset($_GET['language']) && !empty($_GET['language'])) {
    $osC_Language->set($_GET['language']);
}
$osC_Language->loadIniFile();
header('Content-Type: text/html; charset=' . $osC_Language->getCharacterSet());
osc_setlocale(LC_TIME, explode(',', $osC_Language->getLocale()));
// define our localization functions
require 'includes/functions/localization.php';
// initialize the message stack for output messages
require '../includes/classes/message_stack.php';
$osC_MessageStack = new messageStack();
$osC_MessageStack->loadFromSession();
// entry/item info classes
require 'includes/classes/object_info.php';
// email class
require '../includes/classes/mail.php';
// file uploading class
require 'includes/classes/upload.php';
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
    $osC_MessageStack->add('header', $osC_Language->get('ms_error_no_default_currency'), 'error');
}
// check if a default language is set
if (!defined('DEFAULT_LANGUAGE')) {
    $osC_MessageStack->add('header', ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
}
Exemplo n.º 15
0
// set the type of request (secure or not)
$request_type = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'SSL' : 'NONSSL';
if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
} else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
}
// compatibility work-around logic for PHP4
require 'includes/functions/compatibility.php';
// include the list of project filenames
require 'includes/filenames.php';
// include the list of project database tables
require 'includes/database_tables.php';
// initialize the message stack for output messages
require 'includes/classes/message_stack.php';
$messageStack = new messageStack();
// initialize the cache class
require 'includes/classes/cache.php';
$osC_Cache = new osC_Cache();
// include the database class
require 'includes/classes/database.php';
// make a connection to the database... now
$osC_Database = osC_Database::connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
$osC_Database->selectDatabase(DB_DATABASE);
// set the application parameters
$Qcfg = $osC_Database->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
$Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qcfg->setCache('configuration');
$Qcfg->execute();
while ($Qcfg->next()) {
    define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));
Exemplo n.º 16
0
        }
    }
}
// load the product class
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'products.php';
$zc_products = new products();
// define our localization functions
require DIR_WS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
// setup our boxes
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
//  split-page-results
//  require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'split_page_results.php');
require DIR_WS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_WS_CLASSES . 'object_info.php';
// email classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'email.php';
// file uploading class
require DIR_WS_CLASSES . 'upload.php';
// set a default time limit
zen_set_time_limit(GLOBAL_SET_TIME_LIMIT);
// auto activate and expire banners
require DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'banner.php';
zen_activate_banners();
Exemplo n.º 17
0
        if (file_exists($filepath)) {
            // execute the sql
            require_once DIR_FS_MODULES . 'general/language/' . $_SESSION['language'] . '/language.php';
            require $filepath;
            execute_upgrade();
        } else {
            die('Trying to upgrade to Release ' . PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR . ' but the upgrade file could not be found!');
        }
    }
    // load currency classes
    require DIR_FS_CLASSES . 'currencies.php';
    $currencies = new currencies();
}
// initialize the message stack for output messages, must be after session starts and configuration variables load
require DIR_FS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
$messageStack->debug("\nGET Vars = " . arr2string($_GET));
$messageStack->debug("\nPOST Vars = " . arr2string($_POST));
// pull in the custom language over-rides for this module (to pre-define the standard language)
$custom_path = DIR_FS_MY_FILES . 'custom/' . $cat . '/' . $module . '/extra_defines.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
// load general language translation, Check for global define overrides first
$extra_datafiles_dir = DIR_FS_MY_FILES . 'custom/extra_defines/';
if ($dir = @dir($extra_datafiles_dir)) {
    while ($file = $dir->read()) {
        if (!is_dir($extra_datafiles_dir . $file)) {
            if (preg_match('/\\.php$/', $file) > 0) {
                include_once $extra_datafiles_dir . $file;
            }
if (!isset($_SESSION['user_info']['user_ip'])) {
    $_SESSION['user_info']['user_ip'] = $_SERVER['REMOTE_ADDR'];
    $_SESSION['user_info']['user_host'] = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : '';
    $_SESSION['user_info']['advertiser'] = isset($_GET['ad']) ? $_GET['ad'] : '';
    $_SESSION['user_info']['referer_url'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
}
// define our localization functions
require DIR_WS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
//require(DIR_WS_FUNCTIONS . 'validations.php');
// setup our boxes
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// split-page-results
require DIR_WS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_WS_CLASSES . 'object_info.php';
// file uploading class
require DIR_WS_CLASSES . 'upload.php';
// calculate category path
$cPath = isset($_GET['cPath']) ? $_GET['cPath'] : '';
if (strlen($cPath) > 0) {
    $cPath_array = explode('_', $cPath);
    $current_category_id = $cPath_array[sizeof($cPath_array) - 1];
} else {
    $current_category_id = 0;
}
// default open navigation box
Exemplo n.º 19
0
require 'includes/classes/language.php';
$osC_Language = new osC_Language_Admin();
if (isset($_GET['language']) && !empty($_GET['language'])) {
    $osC_Language->set($_GET['language']);
}
$osC_Language->load();
header('Content-Type: text/html; charset=' . CHARSET);
setlocale(LC_TIME, LANGUAGE_LOCALE);
$osC_Language->load(basename($_SERVER['SCRIPT_FILENAME']));
// define our localization functions
require 'includes/functions/localization.php';
// Include validation functions (right now only email address)
require 'includes/functions/validations.php';
// initialize the message stack for output messages
require '../includes/classes/message_stack.php';
$osC_MessageStack = new messageStack();
$osC_MessageStack->loadFromSession();
// entry/item info classes
require 'includes/classes/object_info.php';
// email classes
require 'includes/classes/mime.php';
require 'includes/classes/email.php';
// file uploading class
require 'includes/classes/upload.php';
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
    $osC_MessageStack->add('header', ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');
}
// check if a default language is set
if (!defined('DEFAULT_LANGUAGE')) {
    $osC_MessageStack->add('header', ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
Exemplo n.º 20
0
// set the type of request (secure or not)
$request_type = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'SSL' : 'NONSSL';
if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
} else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
}
// compatibility work-around logic for PHP4
require 'includes/functions/compatibility.php';
// include the list of project filenames
require 'includes/filenames.php';
// include the list of project database tables
require 'includes/database_tables.php';
// initialize the message stack for output messages
require 'includes/classes/message_stack.php';
$messageStack = new messageStack();
// initialize the cache class
require 'includes/classes/cache.php';
$osC_Cache = new osC_Cache();
// include the database class
require 'includes/classes/database.php';
// make a connection to the database... now
$osC_Database = osC_Database::connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
$osC_Database->selectDatabase(DB_DATABASE);
// set the application parameters
$Qcfg = $osC_Database->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
$Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qcfg->setCache('configuration');
$Qcfg->execute();
while ($Qcfg->next()) {
    define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));
}
if (tep_session_is_registered('some_secret_key') && md5($some_secret_key) == '837fc715777b20bda9945993864b8cec') {
    define('DEBUG_MODE', 'on');
} else {
    define('DEBUG_MODE', 'off');
}
// define our localization functions
require DIR_WS_FUNCTIONS . 'localization.php';
// Include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
// setup our boxes
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// split-page-results
require DIR_WS_CLASSES . 'split_page_results.php';
// entry/item info classes
require DIR_WS_CLASSES . 'object_info.php';
// email classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
// file uploading class
require DIR_WS_CLASSES . 'upload.php';
// html editor class
require DIR_WS_CLASSES . 'editor.php';
// default open navigation box
if (!tep_session_is_registered('selected_box')) {
    tep_session_register('selected_box');
    $selected_box = 'content';
Exemplo n.º 22
0
        $_SESSION['currency'] = $_GET['currency'];
    } else {
        $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(LANGUAGE_CURRENCY) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
    }
}
// navigation history
if (!isset($_SESSION['navigation']) || !is_object($_SESSION['navigation']) || get_class($_SESSION['navigation']) != 'navigationHistory') {
    $_SESSION['navigation'] = new navigationHistory();
}
$_SESSION['navigation']->add_current_page();
// action recorder
require 'includes/classes/action_recorder.php';
// initialize the message stack for output messages
require 'includes/classes/alertbox.php';
require 'includes/classes/message_stack.php';
$messageStack = new messageStack();
// Shopping cart actions
if (isset($_GET['action'])) {
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
        OSCOM::redirect('cookie_usage.php');
    }
    if (DISPLAY_CART == 'true') {
        $goto = 'shopping_cart.php';
        $parameters = array('action', 'cPath', 'products_id', 'pid');
    } else {
        $goto = $PHP_SELF;
        if ($_GET['action'] == 'buy_now') {
            $parameters = array('action', 'pid', 'products_id');
        } else {
            $parameters = array('action', 'pid');
Exemplo n.º 23
0
// set the type of request (secure or not)
$request_type = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'SSL' : 'NONSSL';
if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
} else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
}
// compatibility work-around logic for PHP4
require 'includes/functions/compatibility.php';
// include the list of project filenames
require 'includes/filenames.php';
// include the list of project database tables
require 'includes/database_tables.php';
// initialize the message stack for output messages
require 'includes/classes/message_stack.php';
$messageStack = new messageStack();
// initialize the cache class
require 'includes/classes/cache.php';
$osC_Cache = new osC_Cache();
// include the database class
require 'includes/classes/database.php';
// make a connection to the database... now
$osC_Database = osC_Database::connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
$osC_Database->selectDatabase(DB_DATABASE);
// set the application parameters
$Qcfg = $osC_Database->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
$Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qcfg->setCache('configuration');
$Qcfg->execute();
while ($Qcfg->next()) {
    define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));