Esempio n. 1
0
                displayForm("fail_password", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["email"]));
            }
        } else {
            displayForm("fail_email", trim($_POST["fname"]), trim($_POST["lname"]), "");
        }
    }
    // Account information entered, but no password
    if (!empty($_POST["fname"]) && !empty($_POST["lname"]) && !empty($_POST["email"]) && (empty($_POST["generatePassword"]) && (empty($_POST["newPassword1"]) || empty($_POST["newPassword2"])))) {
        displayForm("fail_password", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["email"]));
    } elseif (!empty($_POST["fname"]) && !empty($_POST["lname"]) && !empty($_POST["email"]) && $_POST["generatePassword"] == TRUE) {
        $accountInfoStatus = FALSE;
        if (verifyEmail(trim($_POST["email"]))) {
            $password = generatePassword();
            if (submitInformation(trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["email"]), $password)) {
                if (sendMail(trim($_POST["email"]), $password)) {
                    sendAuditAlert(trim($_POST["fname"]) . " " . trim($_POST["lname"]), trim($_POST["email"]), "admin", date("D M j y G:i:s e"), $_SESSION['admin_username']);
                    displayForm("success_auto", "", "", "");
                } else {
                    displayForm("tech_diff", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["email"]));
                }
            } else {
                displayForm("tech_diff", trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["email"]));
            }
        } else {
            displayForm("fail_email", trim($_POST["fname"]), trim($_POST["lname"]), "");
        }
    }
}
function generatePassword()
{
    $password_string = '!@#$%*&abcdefghijklmnpqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789';
Esempio n. 2
0
            } 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"]));
        }
    }
}
function createStateAbbrevOptions($us_state_abbrevs, $submittedState)
{