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=FileID;call "clean_strings";FileID=CString
If:
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="N";CNoQuest="N";CNoSlash="N";CNoPlus="N";CString=UpPass;call "clean_strings";UpPass=CString
If:
Then:
CNoSpUn="Y";CSan="Y";CNoAmp="N";CNoQuest="N";CNoSlash="N";CNoPlus="N";CString=UpDesc;call "clean_strings";UpDesc=CString
If:
Oper ne "sd" and Oper ne "hd" and Oper ne "ud" and Oper ne "cp" and Oper ne "rp" and Oper ne "cd" and Oper ne "ms"
Then:
ErrMsg="No valid operation specified.";call "logindone";exit
If:
upmg(1) ne UName
Then:
close upmg;ErrMsg="You are not the file's owner. Access Denied.";call "logindone";exit
If:
upmg(10) eq "Y" and Oper eq "sd"
Then:
close upmg;ErrMsg="File already deleted.";call "logindone";exit
If:
Oper eq "cp" and UpPass eq ""
Then:
close upmg;ErrMsg="No new password provided. Password not changed.";call "logindone";exit
If:
upmg(10) eq "N" and Oper eq "sd"
Then:
upmg(10)="Y";write upmg;close upmg;ErrMsg="File deleted.";call "logindone";exit
If:
upmg(10) eq "N" and Oper eq "ud"
Then:
close upmg;ErrMsg="File already undeleted.";call "logindone";exit
If:
upmg(10) eq "Y" and Oper eq "ud"
Then:
upmg(10)="N";write upmg;close upmg;ErrMsg="File undeleted.";call "logindone";exit
If:
Oper eq "hd"
Then:
UpReal=upmg(3);ln=remove(UpReal);delete upmg;close upmg;ErrMsg="File permanently deleted.";call "logindone";exit
If:
Oper eq "cp"
Then:
Pass=UpPass;call "scramble_pass";upmg(8)="Y";upmg(12)=PEncode;write upmg;close upmg;ErrMsg="File Password Changed."
If:
Oper eq "rp"
Then:
upmg(8)="N";upmg(12)="";write upmg;close upmg;ErrMsg="File Password Removed.";call "logindone";exit
If:
Oper eq "ms"
Then:
call "make_shareusername";call "publicize_file";close upmg;call "logindone";exit