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 global CString,CSan(1,YESNO),CNoAmp(1,YESNO),CNoQuest(1,YESNO),CNoSlash(1,YESNO),CNoSpUn(1,YESNO)
If:
cp ne "0"
Then:
CLUName=mid(Cookie,"1",cp-"1");CLPass=mid(Cookie,cp+"1",len(Cookie)-cp);PEncode=CLPass
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 "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:
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 "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:
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:
call "scramble_pass";valt(9)=PEncode;write valt;close valt;ErrMsg="Account Password Changed";call "logindone";exit
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" and valt(1) eq UName
Then:
delete valt;close valt;ErrMsg="Account Cancelled. Goodbye.";call "canceldone"