Processing table: prc.manage_account




 
If:
 

 
 
Then:
2=@td;3=@tm;write

 
If:
 

 
 
Then:
declare global ErrMsg,ErrReturn(8,*),OutFile(256,*),FString,FMDate,FMTime

 
If:
 

 
 
Then:
declare global UName,Pass(20,*),FName,LName,Email,URL,SessID,Expire,SIDString,SessUName,FileRoot,TUser(12,ALLUP)

 
If:
 

 
 
Then:
declare global UpReal,UpOrig,UpSize,UpDest,UpBase,RmBase,SUpdate(1,YESNO),AuthGet(1,YESNO),FileID,Oper

 
If:
 

 
 
Then:
declare OHandle(4,.0),Msg,IHandle(4,.0),SelfURL,Style,Pre,FPos(20,.0),FLine

 
If:
 

 
 
Then:
declare global PEncode(40,*),UpPass,UpDesc,VPass(20,*),NPass(20,*)

 
If:
 

 
 
Then:
declare Cookie,CLUName,CLPass

 
If:
 

 
 
Then:
declare global CookiePresent(1,YESNO),RemCookie(1,YESNO),NCookie

 
If:
 

 
 
Then:
declare FControl(20,.0),ISDeleted,ISRestricted,TimesDownloaded

 
If:
 

 
 
Then:
declare global CString,CSan(1,YESNO),CNoAmp(1,YESNO),CNoQuest(1,YESNO),CNoSlash(1,YESNO),CNoSpUn(1,YESNO)

 
If:
 

 
 
Then:
declare global CNoPlus(1,YESNO)

 
If:
 

 
 
Then:
ErrReturn="NOT DONE"

 
If:
 

 
 
Then:
OutFile=getenv("ONEGATE_OUTFILE")

 
If:
 

 
 
Then:
declare global OGParseResult(4,*)

 
If:
 

 
 
Then:
call "onegate/ogcgixml"

 
If:
OGParseResult eq "FAIL"

 
 
Then:
ErrMsg="OGCGIXML Parse Failed.";call "generr"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
 

 
 
Then:
lookup cgi = onegate k=@PW i=A -npx

If:
not cgi

 
 
Then:
close cgi;goto postcgi

 
If:
cgi(1) ne @PW

 
 
Then:
close cgi;goto postcgi

 
If:
cgi(2) eq "session" and cgi(8) eq "N"

 
 
Then:
SessID=cgi(3)

 
If:
cgi(2) eq "email" and cgi(8) eq "N"

 
 
Then:
Email=cgi(3)

 
If:
cgi(2) eq "oper" and cgi(8) eq "N"

 
 
Then:
Oper=cgi(3)

 
If:
cgi(2) eq "flfsslog" and cgi(8) eq "Y"

 
 
Then:
Cookie=cgi(3)

 
If:
cgi(2) eq "url" and cgi(8) eq "N"

 
 
Then:
URL=cgi(3)

 
If:
cgi(2) eq "pass" and cgi(8) eq "N"

 
 
Then:
NPass=cgi(3)

 
If:
cgi(2) eq "vpass" and cgi(8) eq "N"

 
 
Then:
VPass=cgi(3)

 
If:
 

 
 
Then:
delete cgi;getnext cgi;goto cgiloop

If:
Cookie eq ""

 
 
Then:
goto nocook

 
If:
Cookie ne ""

 
 
Then:
cp=instr(Cookie,"|");CookiePresent="Y"

 
If:
cp ne "0"

 
 
Then:
CLUName=mid(Cookie,"1",cp-"1");CLPass=mid(Cookie,cp+"1",len(Cookie)-cp);PEncode=CLPass

 
If:
 

 
 
Then:
lookup ckchk = flfss_accounts k=(CLUName) i=A -nx

 
If:
not ckchk

 
 
Then:
close ckchk;goto nocook

 
If:
 

 
 
Then:
Pass=ckchk(9);close ckchk

If:
(SessID eq "" or SessID eq "NOSESSION") and Cookie eq ""

 
 
Then:
ErrMsg="Your session has expired. Please log in again.";call "loginform";exit

 
If:
 

 
 
Then:
SUpdate="Y";call "verify_session"

 
If:
SessID eq "CHANGEDIP"

 
 
Then:
ErrMsg="Your session ID does not match your IP Address.";call "loginform";exit

 
If:
(SessID eq "" or SessID eq "NOSESSION") and Cookie eq ""

 
 
Then:
ErrMsg="Your session has expired. Please log in again.";call "loginform";exit

 
If:
(SessID eq "" or SessID eq "NOSESSION") and (Cookie ne "" and PEncode eq Pass)

 
 
Then:
UName=CLUname;SIDString=@PW;call "make_sessionid";SessID=SIDString;UName=CLUName;call "insert_session";SUpdate="N"

 
If:
SUpdate eq "Y"

 
 
Then:
call "update_session"

 
If:
Cookie eq ""

 
 
Then:
UName=SessUName

 
If:
Cookie ne ""

 
 
Then:
UName=CLUname

 
If:
 

 
 
Then:
lookup valt = flfss_accounts k=(UName) i=A -nx

 
If:
not valt

 
 
Then:
close valt;ErrMsg="User '"{UName{"' does not exist.";call "logindone";exit

 
If:
 

 
 
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="N";CNoQuest="N";CNoSlash="N";CNoPlus="N";CString=Oper;call "clean_strings";Oper=CString

 
If:
 

 
 
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="N";CNoQuest="N";CNoSlash="N";CNoPlus="N";CString=Email;call "clean_strings";Email=CString

 
If:
 

 
 
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="N";CNoQuest="N";CNoSlash="N";CNoPlus="N";CString=VPass;call "clean_strings";VPass=CString

 
If:
 

 
 
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="N";CNoQuest="N";CNoSlash="N";CNoPlus="N";CString=NPass;call "clean_strings";NPass=CString

 
If:
 

 
 
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="Y";CNoQuest="Y";CNoSlash="Y";CNoPlus="Y";CString=URL;call "clean_strings";URL=CString

 
If:
Oper ne "cu" and Oper ne "ce" and Oper ne "np" and Oper ne "da" and Oper ne "sc"

 
 
Then:
ErrMsg="No valid operation specified.";close valt;call "logindone";exit

 
If:
Oper eq "sc"

 
 
Then:
close valt;call "cancelform";exit

 
If:
Oper eq "np" and NPass ne VPass

 
 
Then:
ErrMsg="Passwords did not match. Password not changed.";close valt;call "logindone";exit

 
If:
Oper eq "da" and NPass ne VPass

 
 
Then:
ErrMsg="Passwords did not match. Account not cancelled.";close valt;call "logindone";exit

 
If:
 

 
 
Then:
IHandle=open("flfss.styleurl","r")

 
If:
IHandle lt "0"

 
 
Then:
Style="";goto skiprd

 
If:
 

 
 
Then:
ln=readline(IHandle,Style,"999")

 
If:
 

 
 
Then:
ln=close(Ihandle)

If:
 

 
 
Then:
IHandle=open("flfss.baseurl","r")

 
If:
IHandle lt "0"

 
 
Then:
SelfURL="/~fairlite/cgi-bin/cgiwrap/filepro/onegate";goto skiprd2

 
If:
 

 
 
Then:
ln=readline(IHandle,SelfURL,"999")

 
If:
 

 
 
Then:
ln=close(IHandle)

If:
valt(1) ne UName

 
 
Then:
close valt;ErrMsg="You are not the authorised to change this account profile. Access Denied.";call "logindone";exit

 
If:
Oper eq "cu"

 
 
Then:
valt(7)=URL;write valt;close valt;ErrMsg="User URL Changed.";call "logindone";exit

 
If:
Oper eq "ce"

 
 
Then:
valt(2)=Email;write valt;close valt;ErrMsg="User Email Address Changed.";call "logindone";exit

 
If:
Oper eq "np"

 
 
Then:
Pass=NPass

 
If:
Oper eq "np"

 
 
Then:
call "scramble_pass";valt(9)=PEncode;write valt;close valt;ErrMsg="Account Password Changed";call "logindone";exit

 
If:
Oper eq "da"

 
 
Then:
Pass=NPass;call "scramble_pass"

 
If:
Oper eq "da" and PEncode ne valt(9)

 
 
Then:
ErrMsg="Password Incorrect. Account not cancelled.";close valt;call "logindone";exit

 
If:
Oper eq "da"

 
 
Then:
lookup wipeup = flfss_uploads k=(UName) i=A -npx

If:
Oper eq "da" and not wipeup

 
 
Then:
close wipeup;goto endwipe

 
If:
Oper eq "da" and wipeup(1) ne UName

 
 
Then:
close wipeup;goto endwipe

 
If:
Oper eq "da" and wipeup(1) eq UName

 
 
Then:
UpReal=wipeup(3);ln=remove(UpReal);delete wipeup

 
If:
Oper eq "da"

 
 
Then:
getnext wipeup;goto wipelp

If:
Oper eq "da"

 
 
Then:
close wipeup

 
If:
Oper eq "da"

 
 
Then:
lookup wipesess = flfss_sessionids k=(SessID) i=B -npx

 
If:
Oper eq "da" and not wipesess

 
 
Then:
close wipesess

 
If:
Oper eq "da" and wipesess

 
 
Then:
delete wipesess;close wipesess

 
If:
Oper eq "da"

 
 
Then:
RemCookie="Y";call "make_cookie"

 
If:
Oper eq "da" and valt(1) eq UName

 
 
Then:
delete valt;close valt;ErrMsg="Account Cancelled. Goodbye.";call "canceldone"

 
If:
 

 
 
Then:
close valt;exit

If:
 

 
 
Then:
exit