Example #1
0
require_once CLASSPATH . "htmlTools.class.php";
require_once CLASSPATH . "phpInputFilter/class.inputfilter.php";
// Instantiate the DB class
$db = new ps_DB();
// Instantiate the permission class
$perm = new ps_perm();
// Instantiate the HTML helper class
$ps_html = new ps_html();
// Constructor initializes the session!
$sess = new ps_session();
// Instantiate the ps_shopper_group class
$ps_shopper_group = new ps_shopper_group();
// Get default and this users's Shopper Group
$shopper_group = $ps_shopper_group->get_shoppergroup_by_id($my->id);
// User authentication
$auth = $perm->doAuthentication($shopper_group);
// Initialize the cart
$cart = ps_cart::initCart();
// Initialise Recent Products
$recentproducts = ps_session::initRecentProducts();
// Instantiate the module class
$ps_module = new ps_module();
// Instantiate the function class
$ps_function = new ps_function();
// Set the mosConfig_live_site to its' SSL equivalent
$GLOBALS['real_mosConfig_live_site'] = $GLOBALS['mosConfig_live_site'];
if ($_SERVER['SERVER_PORT'] == 443 || @$_SERVER['HTTPS'] == 'on' || @strstr($page, "checkout.")) {
    // Change the global Live Site Value to HTTPS
    $GLOBALS['mosConfig_live_site'] = ereg_replace('/$', '', SECUREURL);
    $mm_action_url = SECUREURL;
} else {