Skip to content
Snippets Groups Projects
Commit 8d5e3b6d authored by deuce's avatar deuce
Browse files

Use the new profile_config.ssjs library.

parent 98ee03bb
No related branches found
No related tags found
No related merge requests found
/* $Id$ */
load("../web/lib/template.ssjs");
load("../web/lib/profile_config.ssjs");
var sub = '';
......@@ -13,63 +14,7 @@ else
template.title=system.name +" - Edit Your Profile";
usr = new Object;
usr.name = user.name;
if(usr.name==undefined)
usr.name='';
usr.alias = user.alias;
if(usr.alias==undefined)
usr.alias='';
usr.handle = user.handle;
if(usr.handle==undefined)
usr.handle='';
usr.netmail = user.netmail;
if(usr.netmail==undefined)
usr.netmail='';
usr.location = user.location;
if(usr.location==undefined)
usr.location='';
usr.address = user.address;
if(usr.address==undefined)
usr.address='';
usr.zipcode = user.zipcode;
if(usr.zipcode==undefined)
usr.zipcode='';
usr.phone = user.phone;
if(usr.phone==undefined)
usr.phone='';
if(file_exists(prefs_dir +format("%04d.html_prefs",user.number))) {
prefsfile=new File(prefs_dir + format("%04d.html_prefs",user.number));
if(prefsfile.open("r",false)) {
usr.icq = prefsfile.iniGetValue('Profile', 'ICQ');
if(usr.icq==undefined)
usr.icq='';
usr.msn = prefsfile.iniGetValue('Profile', 'MSN');
if(usr.msn==undefined)
usr.msn='';
usr.yahoo = prefsfile.iniGetValue('Profile', 'Yahoo');
if(usr.yahoo==undefined)
usr.yahoo='';
usr.aim = prefsfile.iniGetValue('Profile', 'AIM');
if(usr.aim==undefined)
usr.aim='';
usr.homepage = prefsfile.iniGetValue('Profile', 'Homepage');
if(usr.homepage==undefined)
usr.homepage='';
usr.hobbies = prefsfile.iniGetValue('Profile', 'Hobbies');
if(usr.hobbies==undefined)
usr.hobbies='';
usr.picture = prefsfile.iniGetValue('Profile', 'Picture');
if(usr.picture==undefined)
usr.picture='';
usr.avatar = prefsfile.iniGetValue('Profile', 'Avatar');
if(usr.avatar==undefined)
usr.avatar='';
prefsfile.close();
}
}
use=new HTML_Profile(user.number);
template.profile = new Array;
......
/* $Id$ */
load("../web/lib/template.ssjs");
load("../web/lib/profile_config.ssjs");
var sub = '';
......@@ -9,24 +10,7 @@ var is_sysop=false;
if(user.number==1 || user.security.level>=90)
is_sysop=true;
var u = new User(http_request.query.showuser[0]);
usr=new Object;
if(system.newuser_questions & UQ_REALNAME)
usr.name=u.name.toString();
if(system.newuser_questions & UQ_ALIASES)
usr.alias=u.alias.toString();
if(system.newuser_questions & UQ_HANDLE)
usr.handle=u.handle.toString();
if(system.newuser_questions & UQ_LOCATION)
usr.location=u.location.toString();
usr.netmail=u.netmail.toString();
if(system.newuser_questions & UQ_PHONE)
usr.phone=u.phone.toString();
usr.connection=u.connection.toString();
usr.logon=strftime("%b-%d-%y",u.stats.laston_date);
usr.laston=0-u.stats.laston_date;
var usr=new HTML_Profile(http_request.query.showuser[0]);
if(is_sysop)
template.title = system.name + " - View/Edit Profile for: " + usr.alias;
......@@ -35,39 +19,6 @@ template.title = system.name + " - View Profile for: " + usr.alias;
template.profile = new Array;
if(file_exists(prefs_dir +format("%04d.html_prefs",u.number))) {
prefsfile=new File(prefs_dir + format("%04d.html_prefs",u.number));
if(prefsfile.open("r",false)) {
usr.icq = prefsfile.iniGetValue('Profile', 'ICQ');
usr.msn = prefsfile.iniGetValue('Profile', 'MSN');
usr.yahoo = prefsfile.iniGetValue('Profile', 'Yahoo');
usr.aim = prefsfile.iniGetValue('Profile', 'AIM');
usr.homepage = prefsfile.iniGetValue('Profile', 'Homepage');
usr.hobbies = prefsfile.iniGetValue('Profile', 'Hobbies');
usr.picture = prefsfile.iniGetValue('Profile', 'Picture');
usr.avatar = prefsfile.iniGetValue('Profile', 'Avatar');
prefsfile.close();
}
}
if(usr.icq==undefined)
usr.icq='';
if(usr.msn==undefined)
usr.msn='';
if(usr.yahoo==undefined)
usr.yahoo='';
if(usr.aim==undefined)
usr.aim='';
if(usr.homepage==undefined)
usr.homepage='';
if(usr.hobbies==undefined)
usr.hobbies='';
if(usr.picture==undefined)
usr.picture='';
if(usr.avatar==undefined)
usr.avatar='';
if(is_sysop) {
template.profile.push({html: '<h1>Edit/View Profile</h1>' });
template.profile.push({html: '<p>Personal Information</p>' });
......
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