} else { displayAccountForm("fail", $us_state_abbrevs, $relationships); } if (verifyPassword($_POST["newPassword1"], $_POST["newPassword2"])) { if (submitPassword($_POST["newPassword1"])) { displayPasswordForm("manual"); } else { displayPasswordForm("tech_diff"); } } else { displayPasswordForm("fail"); } } elseif (!empty($_POST["fname"]) && !empty($_POST["lname"]) && !empty($_POST["duedate"]) && !empty($_POST["status"]) && !empty($_POST["address"]) && !empty($_POST["city"]) && !empty($_POST["state"]) && !empty($_POST["zip"]) && !empty($_POST["phone"]) && !empty($_POST["email"]) && !empty($_POST["emergency_fname"]) && !empty($_POST["emergency_lname"]) && !empty($_POST["emergency_phone"]) && !empty($_POST["emergency_relationship"]) && $_POST["automatedPasswordReset"] == TRUE) { $accountInfoStatus = FALSE; if (verifyEmail(trim($_POST["email"]))) { if (submitAccountInformation($_POST["fname"], $_POST["lname"], $_POST["duedate"], $_POST["status"], $_POST["address"], $_POST["city"], $_POST["state"], $_POST["zip"], preg_replace("/[^0-9]/", "", $_POST["phone"]), $_POST["email"], $_POST["notes"], $_POST["adminnotes"], $_POST["buttonMemberID"]) && submitEmergencyContactInformation($_POST["emergency_fname"], $_POST["emergency_lname"], preg_replace("/[^0-9]/", "", $_POST["emergency_phone"]), $_POST["emergency_relationship"], $_POST["buttonMemberID"])) { displayAccountForm("success", $us_state_abbrevs, $relationships); $accountInfoStatus = TRUE; } else { displayAccountForm("tech_diff", $us_state_abbrevs, $relationships); } if ($accountInfoStatus) { if (automatedPasswordReset()) { displayPasswordForm("success_automated"); } else { displayPasswordForm("tech_diff_automated"); } } else { displayPasswordForm("verify_account_info"); } } else {
displayForm($us_state_abbrevs, $relationships, "tech_diff", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), trim($_POST["email"]), $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } } else { displayForm($us_state_abbrevs, $relationships, "fail_password", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), trim($_POST["email"]), $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } } else { displayForm($us_state_abbrevs, $relationships, "fail_email", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), "", $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } } elseif (!empty($_POST["fname"]) && !empty($_POST["lname"]) && !empty($_POST["duesdate"]) && !empty($_POST["street"]) && !empty($_POST["city"]) && !empty($_POST["state"]) && !empty($_POST["zip"]) && !empty($_POST["phone"]) && !empty($_POST["email"]) && !empty($_POST["emergency_fname"]) && !empty($_POST["emergency_lname"]) && !empty($_POST["emergency_phone"]) && !empty($_POST["emergency_relationship"]) && (empty($_POST["generatePassword"]) && (empty($_POST["newPassword1"]) || empty($_POST["newPassword2"])))) { displayForm($us_state_abbrevs, $relationships, "fail_password", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), trim($_POST["email"]), $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } elseif (!empty($_POST["fname"]) && !empty($_POST["lname"]) && !empty($_POST["duesdate"]) && !empty($_POST["street"]) && !empty($_POST["city"]) && !empty($_POST["state"]) && !empty($_POST["zip"]) && !empty($_POST["phone"]) && !empty($_POST["email"]) && !empty($_POST["emergency_fname"]) && !empty($_POST["emergency_lname"]) && !empty($_POST["emergency_phone"]) && !empty($_POST["emergency_relationship"]) && $_POST["generatePassword"] == TRUE) { $accountInfoStatus = FALSE; if (verifyEmail(trim($_POST["email"]))) { $password = generatePassword(); if (submitAccountInformation(trim($_POST["fname"]), trim($_POST["lname"]), $_POST["duesdate"], 1, trim($_POST["street"]), trim($_POST["city"]), $_POST["state"], $_POST["zip"], preg_replace("/[^0-9]/", "", trim($_POST["phone"])), trim($_POST["email"]), $_POST["notes"], $password)) { if (submitEmergencyContactInformation(trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), preg_replace("/[^0-9]/", "", trim($_POST["emergency_phone"])), $_POST["emergency_relationship"], trim($_POST["email"]))) { if (sendMail(trim($_POST["email"]), $password)) { sendAuditAlert(htmlentities(trim($_POST["fname"]), ENT_QUOTES) . " " . htmlentities(trim($_POST["lname"]), ENT_QUOTES), htmlentities(trim($_POST["email"]), ENT_QUOTES), "member", date("D M j y G:i:s e"), $_SESSION['admin_username']); displayForm($us_state_abbrevs, $relationships, "success_auto", "", "", "", "", "", "", "", "", "", "", "", "", "", ""); } else { displayForm($us_state_abbrevs, $relationships, "tech_diff", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), trim($_POST["email"]), $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } } } else { displayForm($us_state_abbrevs, $relationships, "tech_diff", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), trim($_POST["email"]), $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } } else { displayForm($us_state_abbrevs, $relationships, "fail_email", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["duesdate"]), trim($_POST["street"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), trim($_POST["phone"]), "", $_POST["notes"], trim($_POST["emergency_fname"]), trim($_POST["emergency_lname"]), trim($_POST["emergency_phone"]), trim($_POST["emergency_relationship"])); } } }