// initialize the logger class
require DIR_WS_CLASSES . 'logger.php';
// include shopping cart class
require DIR_WS_CLASSES . 'shopping_cart.php';
// 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', 'osCMallAdmin');
    define('PHP_SESSION_PATH', '/');
    define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);
    include DIR_WS_CLASSES . 'sessions.php';
}
// define how the session functions will be used
require DIR_WS_FUNCTIONS . 'sessions.php';
// set the session name and save path
smn_session_name('osCMallAdmin');
smn_session_save_path(SESSION_WRITE_DIRECTORY);
// set the session cookie parameters
if (function_exists('session_set_cookie_params')) {
    session_set_cookie_params(0, DIR_WS_ADMIN);
} elseif (function_exists('ini_set')) {
    ini_set('session.cookie_lifetime', '0');
    ini_set('session.cookie_path', DIR_WS_ADMIN);
}
// lets start our session
smn_session_start();
if (PHP_VERSION >= 4.3 && function_exists('ini_get') && ini_get('register_globals') == false) {
    extract($_SESSION, EXTR_OVERWRITE + EXTR_REFS);
}
if ($_GET['ID'] && !$store_id) {
    if (!smn_session_is_registered('store_id')) {
        smn_session_register('store_id');
?>
</td>
              </tr>
            </table></td>
<?php 
$heading = array();
$contents = array();
if (isset($info)) {
    $heading[] = array('text' => '<b>' . TABLE_HEADING_SHOPPING_CART . '</b>');
    if (STORE_SESSIONS == 'mysql') {
        $session_data = smn_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $info . "'");
        $session_data = smn_db_fetch_array($session_data);
        $session_data = trim($session_data['value']);
    } else {
        if (file_exists(smn_session_save_path() . '/sess_' . $info) && filesize(smn_session_save_path() . '/sess_' . $info) > 0) {
            $session_data = file(smn_session_save_path() . '/sess_' . $info);
            $session_data = trim(implode('', $session_data));
        }
    }
    if ($length = strlen($session_data)) {
        if (PHP_VERSION < 4) {
            $start_id = strpos($session_data, 'customer_id[==]s');
            $start_cart = strpos($session_data, 'cart[==]o');
            $start_currency = strpos($session_data, 'currency[==]s');
            $start_country = strpos($session_data, 'customer_country_id[==]s');
            $start_zone = strpos($session_data, 'customer_zone_id[==]s');
        } else {
            $start_id = strpos($session_data, 'customer_id|s');
            $start_cart = strpos($session_data, 'cart|O');
            $start_currency = strpos($session_data, 'currency|s');
            $start_country = strpos($session_data, 'customer_country_id|s');
Example #3
0
define('TEXT_REVIEW_RATING', 'Rating: %s [%s]');
define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');
define('TEXT_NO_REVIEWS', 'There are currently no product reviews.');
define('BOX_REVIEWS_TEXT_OF_5_STARS', '%s of 5 Stars!');
define('BOX_NOTIFICATIONS_NOTIFY', 'Notify me of updates to <b>%s</b>');
define('BOX_NOTIFICATIONS_NOTIFY_REMOVE', 'Do not notify me of updates to <b>%s</b>');
define('BOX_MANUFACTURER_INFO_HOMEPAGE', '%s Homepage');
define('TEXT_NO_NEW_PRODUCTS', 'There are currently no products.');
define('TEXT_UNKNOWN_TAX_RATE', 'Unknown tax rate');
define('TEXT_REQUIRED', '<span class="errorText">Required</span>');
define('TEXT_MAIN', 'This is a <b>closed online-shop, any products purchased will not be delivered nor billed</b>. <br>Any information seen on these products are to be treated fictional.<br>This shop is based on <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');
define('ERROR_SMN_MAIL', '<font face="Verdana, Arial" size="2" color="#ff0000"><b><small>smn ERROR:</small> Cannot send the email through the specified SMTP server. Please check your php.ini setting and correct the SMTP server if necessary.</b></font>');
define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warning: Installation directory exists at: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install. Please remove this directory for security reasons.');
define('WARNING_CONFIG_FILE_WRITEABLE', 'Warning: I am able to write to the configuration file: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.');
define('WARNING_SESSION_DIRECTORY_NON_EXISTENT', 'Warning: The sessions directory does not exist: ' . smn_session_save_path() . '. Sessions will not work until this directory is created.');
define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Warning: I am not able to write to the sessions directory: ' . smn_session_save_path() . '. Sessions will not work until the right user permissions are set.');
define('WARNING_SESSION_AUTO_START', 'Warning: session.auto_start is enabled - please disable this php feature in php.ini and restart the web server.');
define('WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT', 'Warning: The downloadable products directory does not exist: ' . DIR_FS_DOWNLOAD . '. Downloadable products will not work until this directory is valid.');
define('WARNING_STORE_IS_CLOSED', 'Warning: this Store is currently closed, please see use durning regular business hours.');
define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid.<br>Please check the date and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid.<br>Please check the number and try again.');
define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'The first four digits of the number entered are: %s<br>If that number is correct, we do not accept that type of credit card.<br>If it is wrong, please try again.');
define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?');
define('TEXT_GREETING_PERSONAL_RELOGON', '<small>If you are not %s, please <a href="%s"><u>log yourself in</u></a> with your account information.</small>');
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? <br>Or would you prefer to <a href="%s"><u>create an account</u></a>?');
define('ENTRY_AFFILIATE_ACCEPT_AGB_TEXT', '<a href="' . smn_href_link('affiliate_terms.php', '') . '" target="_blank">Affiliate Agent Program Conditions</a>');
switch ($page_name) {
    case "affiliate_faq":
        define('TEXT_INFORMATION', '' . MALL_NAME . ' has compiled this info so that you may be better informed about our Affiliate Agent program.<br>
 If you have any questions please <a href="' . smn_href_link(FILENAME_AFFILIATE_CONTACT) . '">' . BOX_AFFILIATE_CONTACT . '</a> for more information.<br>
<ul>
Example #4
0
    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
        $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
    }
}
// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php') && is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) {
        $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
    }
}
// check if the session folder is writeable
if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
    if (STORE_SESSIONS == '') {
        if (!is_dir(smn_session_save_path())) {
            $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
        } elseif (!is_writeable(smn_session_save_path())) {
            $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
        }
    }
}
// check session.auto_start is disabled
if (function_exists('ini_get') && WARN_SESSION_AUTO_START == 'true') {
    if (ini_get('session.auto_start') == '1') {
        $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
    }
}
if (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true' && DOWNLOAD_ENABLED == 'true') {
    if (!is_dir(DIR_FS_DOWNLOAD)) {
        $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
    }
}