} if (!isset($_POST["state"])) { $_POST["state"] = ""; } if (isset($add_new_address)) { $smarty->assign("add_new_address", 1); } if (isset($address_editor)) { $smarty->assign("address_editor", $address_editor); } if (isset($_POST["first_name"])) { _copyDataFromPostToPage($smarty); } else { if (isset($address_editor)) { $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 == "") {
$city = 0; $address = 0; regGetContactInfo($log, $cust_password, $Email, $first_name, $last_name, $subscribed4news, $additional_field_values); $smarty->assign("login", $log); $smarty->assign("cust_password1", $cust_password); $smarty->assign("cust_password2", $cust_password); $smarty->assign("first_name", $first_name); $smarty->assign("last_name", $last_name); $smarty->assign("email", $Email); $smarty->assign("subscribed4news", $subscribed4news); $smarty->assign("additional_field_values", $additional_field_values); } if (isset($_POST["login"])) { _copyDataFromPostToPage($smarty); } else { _copyDataFromDataBaseToPage($smarty, $_SESSION["log"]); } if (isset($_POST["save"])) { $login = $_POST["login"]; $cust_password1 = $_POST["cust_password1"]; $cust_password2 = $_POST["cust_password2"]; $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $Email = $_POST["email"]; $subscribed4news = isset($_POST["subscribed4news"]) ? 1 : 0; $additional_field_values = ScanPostVariableWithId(array("additional_field")); if (trim($login) != trim($_SESSION["log"]) && regIsRegister($login)) { $error = ERROR_USER_ALREADY_EXISTS; } if (!isset($error)) { $error = regVerifyContactInfo($login, $cust_password1, $cust_password2, $Email, $first_name, $last_name, $subscribed4news, $additional_field_values);