Skip to content
Snippets Groups Projects
Commit 6842efdb authored by runemaster's avatar runemaster
Browse files

New Change Password page plus allow for FTP download of QWK packets for those that still use it.

parent 8a7a5ba7
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,12 @@ if(http_request.virtual_path=="/index.ssjs" || http_request.virtual_path=="/")
else
template.topnav.push({html: '<a class="tlink" href="/">Home</a>'});
if(http_request.virtual_path=="/members/newpw.ssjs")
template.topnav.push({html: '<span class="tlink">Changing Password</span>'});
if(http_request.virtual_path=="/members/changepw.ssjs")
template.topnav.push({html: '<span class="tlink">Password Change Result</span>'});
if(http_request.virtual_path=="/nodelist.ssjs")
template.topnav.push({html: '<span class="tlink">Who\'s Online</span>'});
......
var sub="";
load("sbbsdefs.js");
load("../web/lib/template.ssjs");
today = time();
var success=false;
template.backurl=http_request.header.referer;
template.resultmsg='';
var oldpw = http_request.query["oldpass"];
oldpw = oldpw.toString();
oldpw = oldpw.toUpperCase();
var newpw1 = http_request.query["newpass1"];
newpw1 = newpw1.toString();
newpw1 = newpw1.toUpperCase();
var newpw2 = http_request.query["newpass2"];
newpw2 = newpw2.toString();
newpw2 = newpw2.toUpperCase();
if(oldpw == '') {
template.resultmsg="Old password is empty. Please enter old password."
}
else
if(oldpw != user.security.password) {
template.resultmsg="Old password is not correct. Please Re-Enter."
}
else
if(newpw1 == '') {
template.resultmsg="New password cannot be blank! Please enter a new password.";
}
else
if(newpw1 != newpw2) {
template.resultmsg="New Passwords do not match. Please Re-Enter."
}
else {
template.resultmsg="Password Changed Successfully."
user.security.password = newpw1;
user.security.password_date = today;
success=true;
}
write_template("header.inc");
load("../web/lib/topnav_html.ssjs");
write_template("leftnav.inc");
write_template("changepw.inc");
write_template("footer.inc");
var sub="";
load("sbbsdefs.js");
load("../web/lib/template.ssjs");
template.title = "Change User Password";
template.pwchangedate=strftime("%A, %B %d, %Y." ,user.security.password_date);
write_template("header.inc");
load("../web/lib/topnav_html.ssjs");
write_template("leftnav.inc");
write_template("newpw.inc");
write_template("footer.inc");
\ No newline at end of file
<!-- $Id$ -->
<!-- Main Content -->
</td>
<td class="main" valign="top"><br />
<h1>@@resultmsg@@</h1>
@@JS:if(success)'Please <a href="/logout.ssjs">Logout</a> and re-login with your new password.'; else'<a href="@@backurl@@">Back to Change Password Page</a>';@@
<br />
@@JS:writeln(today);@@
......@@ -14,15 +14,16 @@
<div id="sectionLinks">
<p>
<a href="/nodelist.ssjs">Who's Online</a>
@@JS:if(user.number==0 || user.security.restrictions&UFLAG_G)'<a href="/login.ssjs">Login</a><a href="/newuser.ssjs">New User'; else'<a href="/members/userlist.ssjs">User Listing</a><a href="/members/info.ssjs">Information</a><a href="/members/themes.ssjs">Change Theme</a><a href="/msgs/msgs.ssjs?msg_sub=mail">E-mail</a>';@@</a>
@@JS:if(user.number==0 || user.security.restrictions&UFLAG_G)'<a href="/login.ssjs">Login</a><a href="/newuser.ssjs">New User'; else'<a href="/members/userlist.ssjs">User Listing</a><a href="/members/info.ssjs">Information</a><a href="/members/themes.ssjs">Change Theme</a><a href="/members/newpw.ssjs">Change Password</a><a href="/msgs/msgs.ssjs?msg_sub=mail">E-mail</a>';@@</a>
@@JS:if(user.number || (this.login!=undefined && system.matchuser("Guest")))'<a href="/msgs">Message Groups</a>'@@
<a href="%%ftp_url%%">File Libraries</a>
@@JS:if(user.number!=0 || !user.security.restrictions&UFLAG_G)'<a href="@@ftp_url@@%%ftpqwk%%">Download QWK Packet</a>';@@
<a href="@@ftp_url@@%%ftpidx%%">File Libraries</a>
</p>
</div>
<!-- start Nodelisting -->
@@JS:if(!template.node_list.length || http_request.virtual_path=="/nodelist.ssjs")'<!--';@@Who's Online now ...<br /><br /><table class="left_nodelist"><tbody><<REPEAT node_list>><tr><td class="left_nodelist"><a href="mailto:@@node_list:email@@">%%node_list:name%%</a> %%node_list:action%%</td></tr><<END REPEAT node_list>></tbody></table>@@JS:if(!template.node_list.length || http_request.virtual_path=="/nodelist.ssjs")'-->';@@
@@JS:if(!template.node_list.length || http_request.virtual_path=="/nodelist.ssjs")'<!--';@@Who's Online now ...<br /><table class="left_nodelist"><tbody><<REPEAT node_list>><tr><td class="left_nodelist"><a href="mailto:@@node_list:email@@">%%node_list:name%%</a> %%node_list:action%%</td></tr><<END REPEAT node_list>></tbody></table>@@JS:if(!template.node_list.length || http_request.virtual_path=="/nodelist.ssjs")'-->';@@
</div>
</td>
......
<!-- $Id$ -->
<!-- Main Content -->
</td>
<td class="main" valign="top"><br /><br />
<p>Your password was last changed on <b>@@pwchangedate@@</b><br /><br />
Please Enter your existing password and well as your new password. Re-Enter your new password to confirm.<br /><br />
Your password is currently coverted to UPPERCASE for Legacy compatibility. Remember this when checking your E-Mail.</p>
<br /><br />
<form action="changepw.ssjs" method="post">
<table border="1" align="center">
<tr>
<td>Old Password: </td><td><input type="password" name="oldpass" size="8" maxlength="8" value="" /><br /></td>
</tr>
<tr>
<td>New Password: </td><td><input type="password" name="newpass1" size="8" maxlength="8" value="" />
Retype New Password: <input type="password" name="newpass2" size="8" maxlength="8" value="" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Change Password" /></td>
</tr>
</table>
</form>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment