function loadForm($formPass) { $form = new HtmlForm(); $form->renderStart("resetFRM", "Enter your Email Address To Recover Password"); echo "<div>"; $form->renderTextbox("email", "Email", true, 50, "", "pattern='^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}\$'"); echo "<span id = 'sMail'></span>"; echo "</div >"; $form->renderSubmitEnd("resetForm", "Reset Password"); }
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"); }
{ $("#addButton").attr("disabled", true); } } </script> </head> <body> <div class="container"> <?php $form->renderStart("createSecret", "Secret Page Data"); $form->renderTextbox("txtTitle", "Title for page", true, 50); $form->renderTextbox("txtMessage", "Secret Message (up to 500 characters)", true, 500); $form->renderTextbox("txtImagePath", "Image File Path (16KB image size max"); $form->renderTextbox("txtChallengeQuestion_1", "Challenge Question", true, 140); echo "<div id = 'challenge'></div>"; $form->renderTextbox("txtChallengeAnswer_1", "Challenge Answer", true, 50); echo "<div id = 'answer'></div>"; $form->renderTextbox("txtEmail_1", "Email:", true, 50, "", "pattern='^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}\$'"); echo "<div id = 'email'></div>"; echo "<button type='button' id='addButton' onClick='count++;addRecipient(count);' value='Add Recipients'>Add Recipients</button>"; echo "<div id = 'secret'></div>"; $form->renderSubmitEnd("submitSecret", "Submit", "Cancel"); ?> </div>
$form = new HtmlForm(); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css"> <link type=text/css" rel="stylesheet" href="style/SecretStyles.css" /> <title>Login</title> </head> <body> <div class="container"> <?php $form->renderStart("loginForm", "Enter your username and password"); $form->renderTextbox("username", "Username", true); $form->renderPassword("password", "Password", true); $form->renderSubmitEnd("submitLogin", "Submit"); ?> <div id="linking"> <p> Don't have an account?<a href="register.php" > Click Here</a> to register!</a></p> <p>Forgot Your Password? <a href="ResetPassword.php">click here</a> to reset your password</p> </div> </div> <div id="toExplore"> //Insert Image Link Here </div> </body> </html>
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"); }