function cookie_check($cookie = null) { $cartDB = new CartDBAccess(); $user = null; $cookie = $this->get_cookie(); $user = $cartDB->User_read($cookie['password1'], $cookie['mailaddress1']); #if(!$user) {return Mypage_login(); } return $user; }
function step5() { $cartDB = new CartDBAccess(); $cookie_check = new OliveCartCookie(); if ($_POST['zip_search']) { new WPOliveCartZipcodeSearch(); } $_POST['name'] = $_POST['customer_name']; //wordpress //Session check $session_check = $GLOBALS['session']->sission_cart(); if (empty($session_check)) { return $this->step2(); } //User check $cookie = $cookie_check->get_cookie(); if ($cartDB->User_read($cookie['password1'], $cookie['mailaddress1']) and !$_POST['zip_search']) { $user = $cartDB->User_read($cookie['password1'], $cookie['mailaddress1']); $user['member'] = 'yes'; } elseif ($cartDB->User_read($_POST['password1'], $_POST['mailaddress1']) and !$_POST['zip_search']) { $user = $cartDB->User_read($_POST['password1'], $_POST['mailaddress1']); $user['member'] = 'yes'; } else { $user = $_POST; } if (!$user['name']) { return $this->step2(); } $error = array(); $form =& $GLOBALS['_indispen']; $deliver =& $GLOBALS['_deliver']; if ($_POST['mode'] == 'send_deliver' and !$_POST['zip_search']) { $error_check = new error_check(); $error = $error_check->postdata_check($form, $error); $error = $error_check->deliver_check($deliver, $error); if (!empty($error)) { $error['error'] = "error"; $user = $_POST; } if (empty($error)) { return $this->step6(); } } $count = 0; $pref =& $GLOBALS['_pref']; $pref1 = $pref[$user['pref']]; $pref2 = $pref[$_POST['pref2']]; require dirname(__FILE__) . '/' . $GLOBALS['cart_theme_type'] . '/cart-step5.php'; }