require_once 'init.php'; session_start(); error_reporting(E_ERROR); $db = new DB($dbLogin); $db2 = new DB($dbLogin); $ta = new trueAdmin($db); $cartVals = new cartValues($db); if($truecart) { $db2 = new DB($dbLogin); $session = $cartVals->getSession(); $cart = new cart($db,$db2,$session); $customer = new customer(0,$db); $loginAttempts = new loginAttempts($db, $_SERVER['REMOTE_ADDR']); $login = new authentication(PRIVATE_KEY, LOGIN_TIME_REF, COOKIE_USER_CUST, COOKIE_HASH_CUST, COOKIE_LOCKOUT_CUST, COOKIE_COUNT_CUST, $customer, $loginAttempts); $cartQty = $cart->cartItemsQty(); $customerLoggedIn = ($login->isUserloggedin())? true:false; if($customerLoggedIn) {$login->userSetTokens($login->id()); $customerId = $login->id();} $customerIdCookie = COOKIE_USER_CUST; $recentCustomerId = $_COOKIE[$customerIdCookie]; } if($_SERVER['HTTPS']) $https = 'https'; else $https = 'http'; $taCache = new cacheLite(array('cacheDir' => DIR_SITE_CACHE,'lifeTime'=>3600)); $bInfo = new info(); if($customerLoggedIn) { $loginId = $login->id(); $customer->setId($loginId); if($loginId) { $customer = new customer($loginId, $db); if($customer->distributor()) $distributor = true; } if($distributor) $GLOBALS['customerBar2'] .= 'Distributor Shopping '; $GLOBALS['customerBar2'] .= 'Hello, '.$login->realName().' View Cart | Past Orders'; if(!$distributor) $GLOBALS['customerBar2'] .= '| Edit Account '; } elseif($recentCustomerId) { $customer->setId($recentCustomerId); $GLOBALS['customerBar'] = ' '; $recentCustomerEmail = $customer->email; } else $GLOBALS['customerBar'] .= ' '; if($_POST['qty']) $cartQty += $_POST['qty']; $GLOBALS['customerBar'] .= ' ('.(!$cartQty? '0':$cartQty).($cartQty == 1? ' Item':' Items').')'; if($customerLoggedIn) { $GLOBALS['customerBar'] .= ' '; $GLOBALS['customerLoggedIn'] = true; } ?>
NOW IN STOCK - NEXT DAY SHIPPING! 2-8 PLAYERS / AGES 12+ / 60 MIN. |