Esempio n. 1
0
function loadForm($formPass)
{
    echo "<h1>Reset your Password</h1>";
    $form = new HtmlForm();
    $form->renderStart("resetPasswordForm", "");
    $form->renderPassword("newPassword1", "New Password ", true, 255);
    $form->renderPassword("newPassword2", "Confirm New Password ", true, 255);
    if (!$formPass && !checkPasswordMatch()) {
        echo "<span class='pswdMtchFail'>does not match new password entered</span>";
    }
    $form->renderSubmitEnd("submitReset", "Change Password");
}
function loadForm($formPass)
{
    echo "<h1>Change your Password</h1>";
    $form = new HtmlForm();
    $form->renderStart("changePasswordForm", "");
    $form->renderPassword("currentPassword", "Current Password: "******"<span class='pswdMtchFail'>This is not your password. Forgot your password? <a href='ResetPassword.php'>Reset it here</a></span>";
    }
    $form->renderPassword("newPassword1", "New Password: "******"newPassword2", "Again: ", true, 255);
    if (!$formPass && !checkPasswordMatch()) {
        echo "<span class='pswdMtchFail'>does not match new password entered</span>";
    }
    $form->renderSubmitEnd("submitPasswordChange", "Change Password");
}
Esempio n. 3
0
function loadForm($formPass)
{
    //note: there are echoed divs here to help render error messages
    //if the passwords do not match. The way error checking is done
    //by renderTextBox does not allow for other error messages otherwise.
    //I needed to improvise here - seems to work.
    $form = new HtmlForm();
    $form->renderStart("frmRegisterForm", "Register", true);
    echo "<div >";
    $form->renderTextbox("txtUsername", "Username:"******"", "pattern='^[A-Za-z0-9\\_]{3,25}\$'");
    echo "<span id = 'pWord'></span>";
    echo "</div>";
    echo "<div>";
    $form->renderTextbox("txtEmail", "Email:", true, 50, "", "pattern='^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}\$'");
    echo "</div>";
    echo "<div>";
    $form->renderPassword("txtPassword", "Password:"******"</div>";
    //if the passwords entered match
    if ($formPass) {
        echo "<div>";
        $form->renderPassword("txtRetypePassword", "Retype Password:"******"</div>";
    } else {
        if (!$formPass && !checkPasswordMatch()) {
            echo "<div>";
            $form->renderPassword("txtRetypePassword", "Retype Password:"******"txtRetypePassword"])) {
                echo "<span class='pswdMtchFail'>does not match password entered</span>";
                echo "</div>";
            }
        } else {
            $form->renderPassword("txtRetypePassword", "Retype Password:"******"<div>";
        $form->renderTextbox("txtQst1", "Enter a challenge question: ", true, 255, "", "");
        echo "</div>";
        echo "<div>";
        $form->renderTextbox("txtQst1Answer", "Answer: ", true, 255, "", "");
        echo "</div>";
        echo "<div>";
        $form->renderTextbox("txtQst2", "Enter another challenge question: ", true, 255, "", "");
        echo "</div>";
        echo "<div>";
        $form->renderTextbox("txtQst2Answer", "Answer: ", true, 255, "", "");
        echo "</div>";
    } else {
        if (!$formPass && !checkChallengeQuestions()) {
            echo "<div>";
            $form->renderTextbox("txtQst1", "Enter a challenge question: ", true, 255, "", "");
            echo "</div>";
            echo "<div>";
            $form->renderTextbox("txtQst1Answer", "Answer: ", true, 255, "", "");
            echo "</div>";
            echo "<div>";
            $form->renderTextbox("txtQst2", "Enter another challenge question: ", true, 255, "", "");
            echo "<span class='QstMtchFail'>Your challenge questions cannot be the same</span>";
            echo "</div>";
            echo "<div>";
            $form->renderTextbox("txtQst2Answer", "Answer: ", true, 255, "", "");
            echo "</div>";
        } else {
            if (!$formPass && checkChallengeQuestions()) {
                echo "<div>";
                $form->renderTextbox("txtQst1", "Enter a challenge question: ", true, 255, "", "");
                echo "</div>";
                echo "<div>";
                $form->renderTextbox("txtQst1Answer", "Answer: ", true, 255, "", "");
                echo "</div>";
                echo "<div>";
                $form->renderTextbox("txtQst2", "Enter another challenge question: ", true, 255, "", "");
                echo "</div>";
                echo "<div>";
                $form->renderTextbox("txtQst2Answer", "Answer: ", true, 255, "", "");
                echo "</div>";
            }
        }
    }
    $form->renderSubmitEnd("subRegisterSubmit", "Register");
}
Esempio n. 4
0
 function __check()
 {
     return checkPasswordMatch($this->password1, $this->password2);
 }