function showChangeScreen($extra = NULL, $resettoken = False, $user = NULL) { darwinHeader("Please provide new password"); darwinDialogStart("Change password"); if ($extra !== NULL) { echo "<div class='warning'>" . $extra . "</div>\n"; } echo "<form method='POST' acceptCharset='utf8'>\n"; echo " <table style='border:none'>\n"; if ($resettoken !== FALSE) { echo " <input type='hidden' value='{$resettoken}'/>\n"; echo " <tr><td><label for='#user'>Username:</label></td><td><input name='username' type='text' disabled value='{$user}'></td></tr>\n"; } else { if (is_admin()) { echo " <tr><td><label for='#user'>Username:</label></td><td><input name='username' type='text'></td></tr>\n"; } else { echo " <tr><td><label for='#password'>Current password:</label></td><td><input name='password' type='password'></td></tr>\n"; } } echo " <tr><td><label for='#newpassword'>New password:</label></td><td><input name='newpassword' type='password'></td></tr>\n"; echo " <tr><td><label for='#newpassword2'>Repeat new password:</label></td><td><input name='newpassword2' type='password'></td></tr>\n"; echo " </table><span style='margin-top:1em;float:right;'>"; echo "<input type='submit' value='Change'/>\n</form>"; if ($extra !== NULL) { } darwinDialogEnd(); darwinFooter(); }
function showResetScreen($extra = NULL) { darwinHeader("Please give your username"); darwinDialogStart("Give your username"); if ($extra !== NULL) { echo "<div class='warning'>" . $extra . "</div>\n"; } echo "<form method='POST' acceptCharset='utf8'>\n"; echo " <div class='centerContents'><p style='width:22em;'>Please provide your BU username such that a reset email can be sent to your email address.</p></div>\n"; echo " <table style='border:none'>\n"; echo " <tr><td for='#user'><label>Username:</label></td><td><input name='user' type='text' />@bournemouth.ac.uk</td></tr>\n"; echo " </table><span style='margin-top:1em;float:right;'>"; echo "<input type='button' value='Cancel' onclick='window.open(\"login\")'/>"; echo "<input type='submit' value='Reset'/></span>\n</form>"; darwinDialogEnd(); darwinFooter(); }
function presentLoginScreen($errorMsg = NULL) { darwinHeader("Please log in"); darwinDialogStart("Log in"); echo "<form method='POST' acceptCharset='utf8' action='login.php'>\n"; if (isset($_REQUEST['redirect'])) { echo " <input name='redirect' type='hidden' value='" . htmlentities($_REQUEST['redirect']) . "'/>\n"; } echo " <table style='border:none'>\n"; echo " <tr><td><label for='#username'>User name:</label></td><td><input name='username' type='text'"; if (isset($_REQUEST['username'])) { echo " value='" . htmlentities($_REQUEST['username']) . "'"; } echo "/></td></tr>\n"; echo " <tr><td><label for='#password'>Password:</label></td><td><input name='password' type='password' /></td></tr>\n"; echo " </table><span style='margin-top:1em;float:right;'>"; echo "<input type='submit' value='Log in'/></span>\n"; echo "<div id='forgotpasswd'><a href='/accounts/resetpasswd'>Forgot password</a></div>"; darwinDialogEnd(); darwinFooter(); }
<?php require_once 'lib/authbase.php'; darwinHeader("Darwin", "Welcome"); darwinDialogStart("loading", "banner"); echo '<img src="assets/progress_large.gif" width="192" height="192" />'; darwinDialogEnd(); ?> <form id="xloginform" style="display:none;" method='POST' accept-charset='utf8' action='/accounts/login'> <table style='border:none'> <tr><td><label for='#username'>User name:</label></td><td><input name='username' type='text' /></td></tr> <tr><td><label for='#password'>Password:</label></td><td><input name='password' type='password' /></td></tr> </table> <input type='hidden' name="redirect" value="/"/> <span style='margin-top:1em;float:right;'><!-- --><input type='button' value='Cancel' name="cancel"/><!-- --><input type='button' value='Log in' name="login"/></span> <div id='forgotpasswd'><a href='/accounts/resetpasswd'>Forgot password</a></div> </form> <?php darwinFooter();