} 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 {
    
            <div class="container">
                <?php 
if (isset($_SESSION['member_username'])) {
    include './account_information.php';
    echo '<div class="row-fluid">
                                <ul class="breadcrumb">
                                    <li><a href="../">Your Account</a></li>
                                    <li class="active">View/change Account Information</li>
                                </ul>
                            </div>';
    if (!isset($_POST["submit"])) {
        displayAccountInformation($_SESSION["member_username"], $us_state_abbrevs, "");
    } else {
        if (verifyEmail(trim($_POST["email"]))) {
            if (submitAccountInformation($_SESSION["member_username"], trim($_POST["firstName"]), trim($_POST["lastName"]), trim($_POST["address"]), trim($_POST["city"]), trim($_POST["state"]), trim($_POST["zip"]), preg_replace("/[^0-9]/", "", trim($_POST["phone"])), htmlentities(trim($_POST["notes"])), htmlentities(trim($_POST["email"])))) {
                $_SESSION['member_username'] = $_POST["email"];
                displayAccountInformation($_SESSION["member_username"], $us_state_abbrevs, "success");
            } else {
                displayAccountInformation($_SESSION["member_username"], $us_state_abbrevs, "fail");
            }
        } else {
            displayAccountInformation($_SESSION["member_username"], $us_state_abbrevs, "fail_email");
        }
    }
}
?>
            </div>
        </div>
        
        <?php 
     } else {
         displayAccountForm("fail");
     }
     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["email"]) && $_POST["automatedPasswordReset"] == TRUE) {
     $accountInfoStatus = FALSE;
     if (verifyEmail(trim($_POST["email"]))) {
         if (submitAccountInformation(trim($_POST["fname"]), trim($_POST["lname"]), trim($_POST["email"]))) {
             displayAccountForm("success");
             $accountInfoStatus = TRUE;
         } else {
             displayAccountForm("tech_diff");
         }
         if ($accountInfoStatus) {
             if (automatedPasswordReset()) {
                 displayPasswordForm("success_automated");
             } else {
                 displayPasswordForm("tech_diff_automated");
             }
         } else {
             displayPasswordForm("verify_account_info");
         }
     } else {
                                        </li>
                                        <li><a href="#password" data-toggle="tab">Password</a>
                                        </li>
                                    </ul>

                                    <!-- Tab panes -->
                                    <div class="tab-content">
                                        <div class="tab-pane fade in active" id="home">
                                            <h4>Account Information</h4>
                                            <?php 
include './account_information.php';
if (!isset($_POST["accountInfoSubmit"])) {
    displayAccountInformation($_SESSION["admin_username"], "");
} else {
    if (verifyEmail($_POST["email"])) {
        if (submitAccountInformation($_SESSION["admin_username"], trim($_POST["firstName"]), trim($_POST["lastName"]), trim($_POST["email"]))) {
            $_SESSION['admin_username'] = $_POST["email"];
            displayAccountInformation($_SESSION["admin_username"], "success");
        } else {
            displayAccountInformation($_SESSION["admin_username"], "fail");
        }
    } else {
        displayAccountInformation($_SESSION["admin_username"], "fail_email");
    }
}
?>
                                        </div>    
                                        <div class="tab-pane fade" id="password">
                                            <h4>Password</h4>
                                            <?php 
include './account_password.php';
Exemple #5
0
             } 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"]));
     }
 }