Example #1
0
                                <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 
include "../../assets/virtual/footer_in.inc";
?>
    </body>
</html>

Example #2
0
                                        <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';
if (isset($_POST["currentPassword"]) && isset($_POST["newPassword1"]) && isset($_POST["newPassword2"])) {
    if (checkCurrentPassword($_SESSION["admin_username"], $_POST["currentPassword"])) {
        if (checkNewPasswordMatch($_POST["newPassword1"], $_POST["newPassword2"])) {
            if (checkNewPasswordRequirements($_POST["newPassword1"])) {
                if (submitPassword($_SESSION["admin_username"], $_POST["newPassword1"])) {
                    displayPasswordForm("success");
                } else {