function quickOrderBillingAddressVerify() { if (isset($_POST["billing_address_check"])) { return quickOrderReceiverAddressVerify(); } $payer_first_name = $_POST["payer_first_name"]; $payer_last_name = $_POST["payer_last_name"]; $billingCountryID = $_POST["billingCountryID"]; if (isset($_POST["billingState"])) { $billingState = $_POST["billingState"]; } else { $billingState = ""; } $billingCity = $_POST["billingCity"]; $billingAddress = $_POST["billingAddress"]; if (isset($_POST["billingZoneID"])) { $billingZoneID = $_POST["billingZoneID"]; } else { $billingZoneID = 0; } $error = regVerifyAddress($payer_first_name, $payer_last_name, $billingCountryID, $billingZoneID, $billingState, $billingCity, $billingAddress); return $error; }
$address_editor = (int) $address_editor; _copyDataFromDataBaseToPage($smarty, $address_editor); } else { $zones = znGetZonesById((int) $countryID); $smarty->assign("zones", $zones); } } if (isset($_POST["save"])) { $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $countryID = (int) $_POST["countryID"]; $zoneID = (int) $_POST["zoneID"]; $state = $_POST["state"]; $city = $_POST["city"]; $address = $_POST["address"]; $error = regVerifyAddress($first_name, $last_name, $countryID, $zoneID, $state, $city, $address); if ($error == "") { unset($error); } else { $smarty->assign("error", $error); } if (!isset($error)) { //regTransformAddressToSafeForm( // &$first_name, &$last_name, // &$countryID, &$zoneID, &$state, // &$city, &$address ); if (isset($add_new_address)) { regAddAddress($first_name, $last_name, $countryID, $zoneID, $state, $city, $address, $_SESSION["log"], $errorCode); Redirect("index.php?address_book=yes"); } else { if (isset($address_editor)) {
if (regIsRegister($login)) { $error = ERROR_USER_ALREADY_EXISTS; } } if (!isset($error)) { if (!isset($order)) { $error = regVerifyAddress($first_name, $last_name, $countryID, $zoneID, $state, $city, $address); } else { $error = regVerifyAddress($receiver_first_name, $receiver_last_name, $countryID, $zoneID, $state, $city, $address); } if ($error == "") { unset($error); } } if (!isset($error) && isset($order)) { $error = regVerifyAddress($payer_first_name, $payer_last_name, $billingCountryID, $billingZoneID, $billingState, $billingCity, $billingAddress); if ($error == "") { unset($error); } } if (!isset($error)) { $cust_password = $cust_password1; $registerResult = regRegisterCustomer($login, $cust_password, $Email, $first_name, $last_name, $subscribed4news, $additional_field_values, $affiliationLogin); if ($registerResult) { if (isset($order)) { $addressID = regAddAddress($receiver_first_name, $receiver_last_name, $countryID, $zoneID, $state, $city, $address, $login, $errorCode); $billingAddressID = $addressID; if (!isset($_POST["billing_address_check"])) { $billingAddressID = regAddAddress($payer_first_name, $payer_last_name, $billingCountryID, $billingZoneID, $billingState, $billingCity, $billingAddress, $login, $errorCode); } regSetDefaultAddressIDByLogin($login, $addressID);