ruạṛ
<?php /** * Process login form * @version 0.9 * @author Robert Urquhart <programmer@activatedesign.co.nz> * @package dreamdiamondstore */ /* * site data and definitions * @var string $include_path - for easy global search/replace if include location changes */ $include_path = $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/'; require_once $include_path.'universal.php'; /* * start the session (after includes so objects stored in $_SESSION are created properly) */ session_start(); $connID = connect_to_db(); /** * suhosin workaround - load from database data that should be able to be kept in $_SESSION * @var object $customer * @var object $anon need a copy for comparing carts after login * @var object $cart */ $customer = user_load(); $anon = user_load(); //print_r($customer); exit; /** * shouldn't be trying to access this script if already logged in */ if(!$customer->logged_in) { getout('',select_one('page_data','path','page_type','customer')); exit; } /** * @var string $message */ $message = ''; /* * update stored carts * @var object $cart */ if($customer->cart != ''){ $cart = $customer->load_cart(); print_r($cart); echo '<br/>'; $cart->update_prices(); print_r($cart); echo '<br/>'; //$customer->update_cart($cart); unset($cart); } if($customer->wishlist != ''){ $cart = $customer->load_cart('wishlist'); print_r($cart); echo '<br/>'; $cart->update_prices(); print_r($cart); echo '<br/>'; //$customer->update_cart($cart,'wishlist'); unset($cart); } exit; ?>
cải xoăn