Exemple #1
0
 function shipping($module = '')
 {
     global $PHP_SELF, $messageStack;
     if (defined('MODULE_SHIPPING_INSTALLED') && zen_not_null(MODULE_SHIPPING_INSTALLED)) {
         $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
             $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1));
         } else {
             reset($this->modules);
             while (list(, $value) = each($this->modules)) {
                 $class = substr($value, 0, strrpos($value, '.'));
                 $include_modules[] = array('class' => $class, 'file' => $value);
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/' . $include_modules[$i]['file']);
             $lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/', $include_modules[$i]['file'], 'false');
             if (@file_exists($lang_file)) {
                 include_once $lang_file;
             } else {
                 if (IS_ADMIN_FLAG === false) {
                     $messageStack->add(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 } else {
                     $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 }
             }
             include_once DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
     }
 }
Exemple #2
0
 function order_total()
 {
     global $messageStack;
     if (defined('MODULE_ORDER_TOTAL_INSTALLED') && zen_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {
         $module_list = explode(';', MODULE_ORDER_TOTAL_INSTALLED);
         reset($module_list);
         while (list(, $value) = each($module_list)) {
             //include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/' . $value);
             $lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/', $value, 'false');
             if (@file_exists($lang_file)) {
                 include_once $lang_file;
             } else {
                 if (IS_ADMIN_FLAG === false && is_object($messageStack)) {
                     $messageStack->add('header', WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 } else {
                     $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 }
             }
             $module_file = DIR_WS_MODULES . 'order_total/' . $value;
             if (@file_exists($module_file)) {
                 include_once $module_file;
                 $class = substr($value, 0, strrpos($value, '.'));
                 $GLOBALS[$class] = new $class();
                 $this->modules[] = $value;
             }
         }
     }
 }
 function CommerceShipping($module = '')
 {
     global $gBitCustomer;
     if (defined('MODULE_SHIPPING_INSTALLED') && zen_not_null(MODULE_SHIPPING_INSTALLED)) {
         $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '.') + 1), $this->modules)) {
             $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '.') + 1));
         } else {
             reset($this->modules);
             while (list(, $value) = each($this->modules)) {
                 $base = basename($value);
                 $class = substr($base, 0, strrpos($base, '.'));
                 $include_modules[] = array('class' => $class, 'file' => $value);
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             //					include(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/modules/shipping/' . $include_modules[$i]['file']);
             $langFile = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/modules/shipping/', $include_modules[$i]['file'], 'false');
             if (file_exists($langFile)) {
                 include_once $langFile;
             }
             include_once BITCOMMERCE_PKG_PATH . DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
     }
 }
Exemple #4
0
 function payment($module = '')
 {
     global $PHP_SELF, $language, $credit_covers, $messageStack;
     if (defined('MODULE_PAYMENT_INSTALLED') && zen_not_null(MODULE_PAYMENT_INSTALLED)) {
         $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             // Free Payment Only shows
             if (zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') and ($_SESSION['cart']->show_total() == 0 and $_SESSION['shipping']['cost'] == 0)) {
                 $this->selected_module = $module;
                 if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger.php')) {
                     $include_modules[] = array('class' => 'freecharger', 'file' => 'freecharger.php');
                 }
             } else {
                 // All Other Payment Modules show
                 while (list(, $value) = each($this->modules)) {
                     // double check that the module really exists before adding to the array
                     if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . $value)) {
                         $class = substr($value, 0, strrpos($value, '.'));
                         // Don't show Free Payment Module
                         if ($class != 'freecharger') {
                             $include_modules[] = array('class' => $class, 'file' => $value);
                         }
                     }
                 }
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $include_modules[$i]['file']);
             $lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', $include_modules[$i]['file'], 'false');
             if (@file_exists($lang_file)) {
                 include_once $lang_file;
             } else {
                 if (IS_ADMIN_FLAG === false) {
                     $messageStack->add(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 } else {
                     $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 }
             }
             include_once DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         // $_POST['payment'] value which will be empty (no radio button selection possible)
         if (zen_count_payment_modules() == 1 && (!isset($_SESSION['payment']) || isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) {
             if (!$credit_covers) {
                 $_SESSION['payment'] = $include_modules[0]['class'];
             }
         }
         if (zen_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
 function order_total()
 {
     if (defined('MODULE_ORDER_TOTAL_INSTALLED') && zen_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {
         $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);
         reset($this->modules);
         while (list(, $value) = each($this->modules)) {
             //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/' . $value);
             include zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/', $value, 'false');
             include DIR_WS_MODULES . 'order_total/' . $value;
             $class = substr($value, 0, strrpos($value, '.'));
             $GLOBALS[$class] = new $class();
         }
     }
 }
 function __construct($module = '')
 {
     global $payment, $gBitCustomer;
     if (defined('MODULE_PAYMENT_INSTALLED') && zen_not_null(MODULE_PAYMENT_INSTALLED)) {
         $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array($module . '.' . substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             // Free Payment Only shows
             if (zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') and ($gBitCustomer->mCart->show_total() == 0 and $gBitCustomer->mCart->show_weight() == 0)) {
                 $this->selected_module = $module;
                 if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger.php')) {
                     $include_modules[] = array('class' => 'freecharger', 'file' => 'freecharger.php');
                 }
             } else {
                 // All Other Payment Modules show
                 while (list(, $value) = each($this->modules)) {
                     // double check that the module really exists before adding to the array
                     if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . $value)) {
                         $class = substr($value, 0, strrpos($value, '.'));
                         // Don't show Free Payment Module
                         if ($class != 'freecharger') {
                             $include_modules[] = array('class' => $class, 'file' => $value);
                         }
                     }
                 }
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             $langFile = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/modules/payment/', $include_modules[$i]['file'], 'false');
             if (file_exists($langFile)) {
                 include $langFile;
             }
             include DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         // $_POST['payment'] value which will be empty (no radio button selection possible)
         if (zen_count_payment_modules() == 1 && (!isset($_SESSION['payment']) || isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) {
             $_SESSION['payment'] = $include_modules[0]['class'];
         }
         if (zen_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
Exemple #7
0
 function order_total()
 {
     global $gBitCustomer;
     if (defined('MODULE_ORDER_TOTAL_INSTALLED') && zen_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {
         $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);
         reset($this->modules);
         while (list(, $value) = each($this->modules)) {
             //          include(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/modules/order_total/' . $value);
             $class = substr($value, 0, strrpos($value, '.'));
             if (!class_exists($class)) {
                 $langFile = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/modules/order_total/', $value, 'false');
                 if (file_exists($langFile)) {
                     include $langFile;
                 }
                 include DIR_WS_MODULES . 'order_total/' . $value;
             }
             $GLOBALS[$class] = new $class();
         }
     }
 }
Exemple #8
0
 function shipping($module = '')
 {
     global $PHP_SELF;
     if (defined('MODULE_SHIPPING_INSTALLED') && zen_not_null(MODULE_SHIPPING_INSTALLED)) {
         $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
             $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1));
         } else {
             reset($this->modules);
             while (list(, $value) = each($this->modules)) {
                 $class = substr($value, 0, strrpos($value, '.'));
                 $include_modules[] = array('class' => $class, 'file' => $value);
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/' . $include_modules[$i]['file']);
             include zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/', $include_modules[$i]['file'], 'false');
             include DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
     }
 }
<?php

/**
 * Privacy Page
 * 
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_ESTIMATE_DELIVERY_TIME, 'false');
$breadcrumb->add("Estimate Delivery Time");
Exemple #10
0
define('TEXT_VIRTUAL_EDIT', 'Warning: This product is marked - Free Shipping and Skips Shipping Address<br />No shipping will be requested when all products in the order are Virtual Products');
define('TEXT_FREE_SHIPPING_PREVIEW', 'Warning: This product is marked - Free Shipping, Shipping Address Required<br />Free Shipping Module is required when all products in the order are Always Free Shipping Products');
define('TEXT_FREE_SHIPPING_EDIT', 'Warning: Yes makes the product - Free Shipping, Shipping Address Required<br />Free Shipping Module is required when all products in the order are Always Free Shipping Products');
// admin activity log warnings
define('WARNING_ADMIN_ACTIVITY_LOG_DATE', 'WARNING: The Admin Activity Log table has records over 2 months old and should be archived to conserve space ... ');
define('WARNING_ADMIN_ACTIVITY_LOG_RECORDS', 'WARNING: The Admin Activity Log table has over 50,000 records and should be archived to conserve space ... ');
define('RESET_ADMIN_ACTIVITY_LOG', 'You can view and archive Admin Activity details via the Admin Access Management menu, if you have appropriate permissions.');
define('TEXT_ACTIVITY_LOG_ACCESSED', 'Admin Activity Log accessed. Output format: %s. Filter: %s. %s');
define('TEXT_ERROR_FAILED_ADMIN_LOGIN_FOR_USER', 'Failed admin login attempt: ');
define('TEXT_ERROR_ATTEMPTED_TO_LOG_IN_TO_LOCKED_ACCOUNT', 'Attempted to log into locked account:');
define('TEXT_ERROR_ATTEMPTED_ADMIN_LOGIN_WITHOUT_CSRF_TOKEN', 'Attempted login without CSRF token.');
define('TEXT_ERROR_ATTEMPTED_ADMIN_LOGIN_WITHOUT_USERNAME', 'Attempted login without username.');
define('TEXT_ERROR_INCORRECT_PASSWORD_DURING_RESET_FOR_USER', 'Incorrect password while attempting a password reset for: ');
define('CATEGORY_HAS_SUBCATEGORIES', 'NOTE: Category has SubCategories<br />Products cannot be added');
define('WARNING_WELCOME_DISCOUNT_COUPON_EXPIRES_IN', 'WARNING! Welcome Email Discount Coupon expires in %s days');
define('WARNING_ADMIN_FOLDERNAME_VULNERABLE', 'CAUTION: <a href="http://tutorials.zen-cart.com/index.php?article=33" target="_blank">Your /admin/ foldername should be renamed to something less common</a>, to prevent unauthorized access.');
define('WARNING_EMAIL_SYSTEM_DISABLED', 'WARNING: The email subsystem is turned off. No emails will be sent until it is re-enabled in Admin->Configuration->Email Options.');
define('TEXT_CURRENT_VER_IS', 'You are presently using: ');
define('ERROR_NO_DATA_TO_SAVE', 'ERROR: The data you submitted was found to be empty. YOUR CHANGES HAVE *NOT* BEEN SAVED. You may have a problem with your browser or your internet connection.');
define('TEXT_HIDDEN', 'Hidden');
define('TEXT_VISIBLE', 'Visible');
define('TEXT_HIDE', 'Hide');
define('TEXT_EMAIL', 'Email');
define('TEXT_NOEMAIL', 'No Email');
define('BOX_HEADING_PRODUCT_TYPES', 'Product Types');
define('ERROR_DATABASE_MAINTENANCE_NEEDED', '<a href="http://www.zen-cart.com/content.php?334-ERROR-0071-There-appears-to-be-a-problem-with-the-database-Maintenance-is-required" target="_blank">ERROR 0071: There appears to be a problem with the database. Maintenance is required.</a>');
///////////////////////////////////////////////////////////
// include additional files:
require DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_EMAIL_EXTRAS;
include zen_get_file_directory(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/', FILENAME_OTHER_IMAGES_NAMES, 'false');
 /**
  * Retrieve a list of core plugin files required to install a plugin.
  * These resources are only needed if they are not already installed.
  *
  * @return multitype:string
  */
 private function getPluginCoreFiles()
 {
     $retval = array(DIR_FS_ADMIN . DIR_WS_CLASSES . 'plugin.php', DIR_FS_ADMIN . DIR_WS_CLASSES . strtolower($this->getUniqueKey()) . '_plugin.php');
     foreach (new DirectoryIterator(DIR_FS_ADMIN . DIR_WS_LANGUAGES) as $folder) {
         if ($folder->isDot() || !$folder->isDir()) {
             continue;
         }
         $core = zen_get_file_directory(DIR_FS_ADMIN . DIR_WS_LANGUAGES . $folder->getFilename() . '/modules/plugin', '/plugin.php', 'false');
         $subclass = zen_get_file_directory(DIR_FS_ADMIN . DIR_WS_LANGUAGES . $folder->getFilename() . '/modules/plugin', '/' . strtolower($this->getUniqueKey()) . '.php', 'false');
         if (file_exists($core)) {
             $retval[] = $core;
         }
         if (file_exists($subclass)) {
             $retval[] = $subclass;
         }
     }
     return $retval;
 }
Exemple #12
0
<?php

//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id$
//
require_once DIR_FS_MODULES . 'require_languages.php';
// include template specific file name defines
$define_shippinginfo = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/html_includes/', FILENAME_DEFINE_SHIPPINGINFO, 'false');
$breadcrumb->add(NAVBAR_TITLE);
<?php

/**
 * Privacy Page
 * 
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_LOCATIONS_WE_SHIP_TO, 'false');
$breadcrumb->add("Locations We Ship To");
<?php

/**
 * Privacy Page
 * 
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_TRACK_YOUR_ORDER, 'false');
$breadcrumb->add("Track Your Order");
<?php

/**
 * login_as_customer info
 *
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// logout
// kill active session
unset($_SESSION['customer_id']);
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_LOGIN_AS_CUSTOMER, 'false');
            $notificationsArray[] = array('counter' => $counter, 'products_id' => $products->fields['products_id'], 'products_name' => $products->fields['products_name']);
            $counter++;
            $products->MoveNext();
        }
    }
    $flag_show_products_notification = (CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS == '1' and sizeof($notificationsArray) > 0 and $flag_global_notifications != '1') ? true : false;
    $products_displayed = array();
    $gv_query = "SELECT amount\n               FROM " . TABLE_COUPON_GV_CUSTOMER . "\n               WHERE customer_id = :customersID ";
    $gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $gv_result = $db->Execute($gv_query);
    if ($gv_result->fields['amount'] > 0) {
        $customer_has_gv_balance = true;
        $customer_gv_balance = $currencies->format($gv_result->fields['amount']);
    }
    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', 'define_checkout_failure', 'false');
} else {
    echo '<html><head>';
    echo '<script type="text/javascript">
<!--
theTimer = 0;
timeOut = 12;

function submit_form()
{
  theTimer = setTimeout("submit_form();", 100);
  if (timeOut > 0) {
    timeOut -= 1;
  }
  else
  {
$za_who = $_GET['za_lookup'];
if ($action == 'new_page') {
    $page = $_GET['define_it'];
    $check_directory = array();
    $check_directory[] = DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/';
    $directory_files = zen_display_files();
    $za_lookup = array();
    for ($i = 0, $n = sizeof($directory_files); $i < $n; $i++) {
        $za_lookup[] = array('id' => $i, 'text' => $directory_files[$i]);
    }
    // This will cause it to look for 'define_conditions.php'
    $_GET['filename'] = $za_lookup[$page]['text'];
    $_GET['box_name'] = BOX_TOOLS_DEFINE_CONDITIONS;
}
// define template specific file name defines
$file = zen_get_file_directory(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/html_includes/', $_GET['filename'], 'false');
switch ($_GET['action']) {
    case 'set_editor':
        if ($_GET['reset_editor'] == '0') {
            $_SESSION['html_editor_preference_status'] = 'NONE';
        } else {
            $_SESSION['html_editor_preference_status'] = 'HTMLAREA';
        }
        $action = '';
        zen_redirect(zen_href_link(FILENAME_DEFINE_PAGES_EDITOR));
        break;
    case 'save':
        if ($_GET['lngdir'] && $_GET['filename']) {
            if (file_exists($file)) {
                if (file_exists('bak' . $file)) {
                    @unlink('bak' . $file);
	          </table>
		</fieldset>
		<br />
	    <?php 
                }
                ?>
	    <?php 
            }
        }
        ?>
	    <!-- eof Gift Wrap -->
		<!-- bof doublebox -->
      <?php 
        if (MODULE_ORDER_TOTAL_DOUBLEBOX_STATUS == 'true') {
            $value = "ot_doublebox_checkout.php";
            include_once zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/', $value, 'false');
            include_once DIR_WS_MODULES . "order_total/" . $value;
            $doublebox_mod = new ot_doublebox_checkout();
            $use_doublebox = true;
            if ($doublebox_mod->check() && $doublebox_mod->enabled) {
                ?>
            <br />
		<hr />
		<fieldset class="shipping" id="doublebox">
			<legend><?php 
                echo DOUBLEBOX_HEADING;
                ?>
</legend>
      <?php 
                echo '<div id="cartDoubleBoxExplain">';
                echo '<a href="javascript:alert(\'' . DOUBLEBOX_EXPLAIN_DETAILS . '\')">' . DOUBLEBOX_EXPLAIN_LINK . '</a>';
 /**
  * class constructor
  */
 function paypalwpp()
 {
     include_once zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', 'paypalwpp.php', 'false');
     global $order;
     $this->code = 'paypalwpp';
     $this->codeTitle = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC;
     $this->codeVersion = '1.3.9h';
     $this->enableDirectPayment = FALSE;
     $this->enabled = MODULE_PAYMENT_PAYPALWPP_STATUS == 'True';
     // Set the title & description text based on the mode we're in ... EC vs US/UK vs admin
     if (IS_ADMIN_FLAG === true) {
         $this->description = sprintf(MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_DESCRIPTION, ' (rev' . $this->codeVersion . ')');
         switch (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE) {
             case 'PayPal':
                 $this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC;
                 break;
             case 'Payflow-UK':
                 $this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PRO20;
                 break;
             case 'Payflow-US':
                 if (defined('MODULE_PAYMENT_PAYPALWPP_PAYFLOW_EC') && MODULE_PAYMENT_PAYPALWPP_PAYFLOW_EC == 'Yes') {
                     $this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_EC;
                 } else {
                     $this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_GATEWAY;
                 }
                 break;
             default:
                 $this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC;
         }
         if ($this->enabled) {
             if (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' && (MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '' || MODULE_PAYMENT_PAYPALWPP_APIUSERNAME == '' || MODULE_PAYMENT_PAYPALWPP_APIPASSWORD == '') || substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' && (MODULE_PAYMENT_PAYPALWPP_PFPARTNER == '' || MODULE_PAYMENT_PAYPALWPP_PFVENDOR == '' || MODULE_PAYMENT_PAYPALWPP_PFUSER == '' || MODULE_PAYMENT_PAYPALWPP_PFPASSWORD == '')) {
                 $this->title .= '<span class="alert"><strong> NOT CONFIGURED YET</strong></span>';
             }
             if (MODULE_PAYMENT_PAYPALWPP_SERVER == 'sandbox') {
                 $this->title .= '<strong><span class="alert"> (sandbox active)</span></strong>';
             }
             if (MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log File' || MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log and Email') {
                 $this->title .= '<strong> (Debug)</strong>';
             }
             if (!function_exists('curl_init')) {
                 $this->title .= '<strong><span class="alert"> CURL NOT FOUND. Cannot Use.</span></strong>';
             }
         }
     } else {
         $this->description = MODULE_PAYMENT_PAYPALWPP_TEXT_DESCRIPTION;
         $this->title = MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TITLE;
         //pp
     }
     if ((!defined('PAYPAL_OVERRIDE_CURL_WARNING') || defined('PAYPAL_OVERRIDE_CURL_WARNING') && PAYPAL_OVERRIDE_CURL_WARNING != 'True') && !function_exists('curl_init')) {
         $this->enabled = false;
     }
     $this->enableDebugging = MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log File' || MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log and Email';
     $this->emailAlerts = MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log File' || MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log and Email' || MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Alerts Only';
     $this->doDPonly = MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-US' && !(defined('MODULE_PAYMENT_PAYPALWPP_PAYFLOW_EC') && MODULE_PAYMENT_PAYPALWPP_PAYFLOW_EC == 'Yes');
     $this->showPaymentPage = MODULE_PAYMENT_PAYPALWPP_SKIP_PAYMENT_PAGE == 'No' ? true : false;
     $this->sort_order = MODULE_PAYMENT_PAYPALWPP_SORT_ORDER;
     $this->buttonSourceEC = 'ZenCart-EC_us';
     $this->buttonSourceDP = 'ZenCart-DP_us';
     if (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-UK') {
         $this->buttonSourceEC = 'ZenCart-EC_uk';
         $this->buttonSourceDP = 'ZenCart-DP_uk';
     }
     if (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-US') {
         $this->buttonSourceEC = 'ZenCart-ECGW_us';
         $this->buttonSourceDP = 'ZenCart-GW_us';
     }
     $this->order_pending_status = MODULE_PAYMENT_PAYPALWPP_ORDER_PENDING_STATUS_ID;
     if ((int) MODULE_PAYMENT_PAYPALWPP_ORDER_STATUS_ID > 0) {
         $this->order_status = MODULE_PAYMENT_PAYPALWPP_ORDER_STATUS_ID;
     }
     $this->new_acct_notify = MODULE_PAYMENT_PAYPALWPP_NEW_ACCT_NOTIFY;
     $this->zone = (int) MODULE_PAYMENT_PAYPALWPP_ZONE;
     if (is_object($order)) {
         $this->update_status();
     }
     if (PROJECT_VERSION_MAJOR != '1' && substr(PROJECT_VERSION_MINOR, 0, 3) != '3.9') {
         $this->enabled = false;
     }
     $this->cards = array();
     // if operating in markflow mode, start EC process when submitting order
     if (!$this->in_special_checkout()) {
         $this->form_action_url = zen_href_link('ipn_main_handler.php', 'type=ec&markflow=1&clearSess=1&stage=final', 'SSL', true, true, true);
     }
     // debug setup
     if (!@is_writable($this->_logDir)) {
         $this->_logDir = DIR_FS_CATALOG . $this->_logDir;
     }
     if (!@is_writable($this->_logDir)) {
         $this->_logDir = DIR_FS_SQL_CACHE;
     }
     // Regular mode:
     if ($this->enableDebugging) {
         $this->_logLevel = PEAR_LOG_INFO;
     }
     // DEV MODE:
     if (defined('PAYPAL_DEV_MODE') && PAYPAL_DEV_MODE == 'true') {
         $this->_logLevel = PEAR_LOG_DEBUG;
     }
     if (IS_ADMIN_FLAG === true) {
         $this->tableCheckup();
     }
 }
Exemple #20
0
<?php

//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id$
//
require_once DIR_FS_MODULES . 'require_languages.php';
// include template specific file name defines
$define_privacy = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/html_includes/', FILENAME_DEFINE_PRIVACY, 'false');
$breadcrumb->add(NAVBAR_TITLE);
Exemple #21
0
<?php

//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: header_php.php 290 2004-09-15 19:48:26Z wilt $
//
require DIR_WS_MODULES . 'require_languages.php';
// include template specific file name defines
$define_conditions = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_CONDITIONS, 'false');
$breadcrumb->add(NAVBAR_TITLE);
Exemple #22
0
            $notificationsArray[] = array('counter' => $counter, 'products_id' => $products->fields['products_id'], 'products_name' => $products->fields['products_name']);
            $counter++;
            $products->MoveNext();
        }
    }
    $flag_show_products_notification = (CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS == '1' and sizeof($notificationsArray) > 0 and $flag_global_notifications != '1') ? true : false;
    $products_displayed = array();
    $gv_query = "SELECT amount\r\n               FROM " . TABLE_COUPON_GV_CUSTOMER . "\r\n               WHERE customer_id = :customersID ";
    $gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $gv_result = $db->Execute($gv_query);
    if ($gv_result->fields['amount'] > 0) {
        $customer_has_gv_balance = true;
        $customer_gv_balance = $currencies->format($gv_result->fields['amount']);
    }
    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_CHECKOUT_SUCCESS, 'false');
} else {
    echo '<html><head>';
    echo '<script type="text/javascript">
<!--
theTimer = 0;
timeOut = 12;

function submit_form()
{
  theTimer = setTimeout("submit_form();", 100);
  if (timeOut > 0) {
    timeOut -= 1;
  }
  else
  {
<?php

/**
 * Privacy Page
 * 
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_YH_CONTACT_US, 'false');
$breadcrumb->add("Contact Us");
if (isset($_GET['action']) && $_GET['action'] == 'update') {
    $notify_string = 'action=notify&';
    if (!empty($_POST['notify']) && is_array($_POST['notify'])) {
        for ($i = 0, $n = sizeof($_POST['notify']); $i < $n; $i++) {
            $notify_string .= 'notify[]=' . $_POST['notify'][$i] . '&';
        }
        if (strlen($notify_string) > 0) {
            $notify_string = substr($notify_string, 0, -1);
        }
    }
    if ($notify_string == 'action=notify&') {
        zen_redirect(zen_href_link(FILENAME_DEFAULT, '', 'SSL'));
    } else {
        zen_redirect(zen_href_link(FILENAME_DEFAULT, $notify_string));
    }
}
require_once DIR_FS_MODULES . 'require_languages.php';
$breadcrumb->add(NAVBAR_TITLE_1);
$breadcrumb->add(NAVBAR_TITLE_2);
if ($gBitCustomer->getGlobalNotifications() != '1') {
    $products_array = array();
    $products_query = "SELECT DISTINCT `products_id`, `products_name` from " . TABLE_ORDERS_PRODUCTS . "\n\t\t\t\t\t   WHERE `orders_id` = ?\n\t\t\t\t\t   ORDER BY `products_name`";
    $products = $gBitDb->getAssoc($products_query, array($newOrdersId));
    $gBitSmarty->assign_by_ref('notifyProducts', $products);
}
$gv_query = "SELECT `amount` from " . TABLE_COUPON_GV_CUSTOMER . " WHERE `customer_id`=?";
$gBitSmarty->assign('gvAmount', $gBitDb->getOne($gv_query, array($gBitUser->mUserId)));
// include template specific file name defines
$define_checkout_success = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/html_includes/', FILENAME_DEFINE_CHECKOUT_SUCCESS, 'false');
define('HEADING_TITLE', tra('Order Success!') . " #{$newOrdersId}");
print $gBitSmarty->fetch('bitpackage:bitcommerce/page_checkout_success.tpl');
<?php

/**
 * page_not_found header_php.php 
 *
 * @package page
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_PAGE_NOT_FOUND');
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// include template-specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_PAGE_NOT_FOUND, 'false');
$breadcrumb->add(NAVBAR_TITLE);
require DIR_WS_CLASSES . 'site_map.php';
$zen_SiteMapTree = new zen_SiteMapTree();
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_PAGE_NOT_FOUND');
<?php

/**
 * editable sidebox - allows an admin-editable sidebox to be added to your site
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
 * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-08-10 kuroi $
 */
// test if box should display
$show_editable_sidebox2 = true;
$define_sidebox = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', DEFINE_EDITABLE_SIDEBOX2_NAME, 'false');
if ($show_editable_sidebox2 == true) {
    require $template->get_template_dir('tpl_editable_sidebox2.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_editable_sidebox2.php';
    $title = BOX_HEADING_EDITABLE_SIDEBOX2;
    $title_link = false;
    require $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base, 'common') . '/' . $column_box_default;
}
Exemple #27
0
        $paypalec_enabled = false;
    }
    // PayPal module cannot be used for purchase > $10,000 USD or 5500 GBP
    if ($_SESSION['currency'] == 'USD' && $currencies->value($_SESSION['cart']->total, true, 'USD') > 10000 || $_SESSION['currency'] == 'GBP' && $currencies->value($_SESSION['cart']->total, true, 'GBP') > 5500) {
        $paypalec_enabled = false;
    }
}
// if all is okay, display the button
if ($paypalec_enabled) {
    // If they're here, they're either about to go to PayPal or were
    // sent back by an error, so clear these session vars.
    unset($_SESSION['paypal_ec_temp']);
    unset($_SESSION['paypal_ec_token']);
    unset($_SESSION['paypal_ec_payer_id']);
    unset($_SESSION['paypal_ec_payer_info']);
    include zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', 'paypalwpp.php', 'false');
    ?>
<div id="PPECbutton" class="buttonRow">
  <a href="<?php 
    echo zen_href_link('ipn_main_handler.php', 'type=ec', 'SSL', true, true, true);
    ?>
"><img src="<?php 
    echo MODULE_PAYMENT_PAYPALWPP_EC_BUTTON_IMG;
    ?>
" alt="<?php 
    echo MODULE_PAYMENT_PAYPALWPP_TEXT_BUTTON_ALTTEXT;
    ?>
" /></a>
</div>
<?php 
}
Exemple #28
0
 /**
  * class constructor
  */
 function paypaldp()
 {
     include_once zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', 'paypaldp.php', 'false');
     global $order;
     $this->code = 'paypaldp';
     $this->codeTitle = MODULE_PAYMENT_PAYPALDP_TEXT_ADMIN_TITLE_WPP;
     $this->codeVersion = '1.5.0';
     $this->enableDirectPayment = true;
     $this->enabled = MODULE_PAYMENT_PAYPALDP_STATUS == 'True';
     // Set the title & description text based on the mode we're in
     if (IS_ADMIN_FLAG === true) {
         $this->description = sprintf(MODULE_PAYMENT_PAYPALDP_TEXT_ADMIN_DESCRIPTION, ' (rev' . $this->codeVersion . ')');
         $this->title = MODULE_PAYMENT_PAYPALDP_TEXT_ADMIN_TITLE_WPP . (defined('MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY') ? ' (' . MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY . ')' : '');
         if ($this->enabled) {
             if ((MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'US' || MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'Canada') && (MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '' || MODULE_PAYMENT_PAYPALWPP_APIUSERNAME == '' || MODULE_PAYMENT_PAYPALWPP_APIPASSWORD == '') || (!defined('MODULE_PAYMENT_PAYPALWPP_STATUS') || MODULE_PAYMENT_PAYPALWPP_STATUS != 'True')) {
                 $this->title .= '<span class="alert"><strong> NOT CONFIGURED YET</strong></span>';
             }
             if (MODULE_PAYMENT_PAYPALDP_SERVER == 'sandbox') {
                 $this->title .= '<strong><span class="alert"> (sandbox active)</span></strong>';
             }
             if (MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Log File' || MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Log and Email') {
                 $this->title .= '<strong> (Debug)</strong>';
             }
             if (!function_exists('curl_init')) {
                 $this->title .= '<strong><span class="alert"> CURL NOT FOUND. Cannot Use.</span></strong>';
             }
         }
     } else {
         $this->description = MODULE_PAYMENT_PAYPALDP_TEXT_DESCRIPTION;
         $this->title = MODULE_PAYMENT_PAYPALDP_TEXT_TITLE;
         //cc
     }
     if ((!defined('PAYPAL_OVERRIDE_CURL_WARNING') || defined('PAYPAL_OVERRIDE_CURL_WARNING') && PAYPAL_OVERRIDE_CURL_WARNING != 'True') && !function_exists('curl_init')) {
         $this->enabled = false;
     }
     $this->enableDebugging = MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Log File' || MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Log and Email';
     $this->emailAlerts = MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Log File' || MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Log and Email' || MODULE_PAYMENT_PAYPALDP_DEBUGGING == 'Alerts Only';
     $this->sort_order = MODULE_PAYMENT_PAYPALDP_SORT_ORDER;
     $this->buttonSource = MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'UK' ? 'ZenCart-DP_uk' : 'ZenCart-DP_us';
     $this->order_pending_status = MODULE_PAYMENT_PAYPALDP_ORDER_PENDING_STATUS_ID;
     if ((int) MODULE_PAYMENT_PAYPALDP_ORDER_STATUS_ID > 0) {
         $this->order_status = MODULE_PAYMENT_PAYPALDP_ORDER_STATUS_ID;
     }
     //    $this->new_acct_notify = MODULE_PAYMENT_PAYPALDP_NEW_ACCT_NOTIFY;
     $this->zone = (int) MODULE_PAYMENT_PAYPALDP_ZONE;
     if (is_object($order)) {
         $this->update_status();
     }
     if (PROJECT_VERSION_MAJOR != '1' && substr(PROJECT_VERSION_MINOR, 0, 3) != '5.0') {
         $this->enabled = false;
     }
     // offer credit card choices for pull-down menu -- only needed for UK version
     $this->cards = array();
     if (MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'UK') {
         if (CC_ENABLED_VISA == '1') {
             $this->cards[] = array('id' => 'Visa', 'text' => 'Visa');
         }
         if (CC_ENABLED_MC == '1') {
             $this->cards[] = array('id' => 'MasterCard', 'text' => 'MasterCard');
         }
         if (CC_ENABLED_MAESTRO == '1') {
             $this->cards[] = array('id' => 'Maestro', 'text' => 'Maestro');
         }
         if (CC_ENABLED_SWITCH == '1') {
             $this->cards[] = array('id' => 'Switch', 'text' => 'Switch');
         }
         if (CC_ENABLED_SOLO == '1') {
             $this->cards[] = array('id' => 'Solo', 'text' => 'Solo');
         }
     }
     // debug setup
     if (!@is_writable($this->_logDir)) {
         $this->_logDir = DIR_FS_CATALOG . $this->_logDir;
     }
     if (!@is_writable($this->_logDir)) {
         $this->_logDir = DIR_FS_SQL_CACHE;
     }
     // Regular mode:
     if ($this->enableDebugging) {
         $this->_logLevel = 2;
     }
     // DEV MODE:
     if (defined('PAYPAL_DEV_MODE') && PAYPAL_DEV_MODE == 'true') {
         $this->_logLevel = 3;
     }
     if (IS_ADMIN_FLAG === true) {
         $this->tableCheckup();
     }
 }
 /**
  * Display appropriate error message when needed
  */
 function get_error()
 {
     include_once zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', 'paypalwpp.php', 'false');
     $error = array('title' => MODULE_PAYMENT_PAYPALWPP_ERROR_HEADING, 'error' => isset($_GET['error']) ? stripslashes(urldecode($_GET['error'])) : MODULE_PAYMENT_PAYPALWPP_TEXT_CARD_ERROR);
     return $error;
 }
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: header_php.php,v 1.1 2006/06/16 01:46:15 Owner Exp $  dmcl1/notgoddess
//
if ($_SESSION['customer_id']) {
    zen_redirect(zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS));
}
$_SESSION['navigation']->remove_current_page();
require DIR_WS_MODULES . 'require_languages.php';
// include template specific file name defines
$definedpage = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_SUBSCRIBE, 'false');
$subscribe = false;
$error = false;
$email_address = empty($_POST['email']) ? '' : $_POST['email'];
$email_format = empty($_POST['email_format']) ? 'HTML' : $_POST['email_format'];
$email_address = zen_db_prepare_input($email_address);
$email_format = zen_db_prepare_input($email_format);
if (!defined('NEWSONLY_SUBSCRIPTION_ENABLED') || NEWSONLY_SUBSCRIPTION_ENABLED == 'false') {
    $error = true;
    $messageStack->add('subscribe', TEXT_NEWSONLY_SUBSCRIPTIONS_DISABLED);
} elseif (preg_match("/" . $email_address . "/i", HEADER_SUBSCRIBE_DEFAULT_TEXT) || empty($email_address)) {
    $error = true;
    $messageStack->add('subscribe', '');
    //$email_address = 'what the f**k';
} elseif (!$email_address || strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
    $error = true;