Processing table: prc.create_account




 
If:
 

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

 
If:
 

 
 
Then:
declare global UName,FName,LName,URL,VPass,Email,SessID,SIDString,Remember,Cookie

 
If:
 

 
 
Then:
declare global PEncode(40,*),OutFile(256,*),ErrMsg,ErrReturn(8,*),Pass(20,*)

 
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:
OutFile=getenv("ONEGATE_OUTFILE")

 
If:
 

 
 
Then:
ErrReturn="NOT DONE"

 
If:
 

 
 
Then:
declare global OGParseResult(4,*,g)

 
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:
SIDString=@PW;call "make_sessionid";SessID=SIDString

 
If:
 

 
 
Then:
ff="0"

 
If:
 

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

If:
not cgi

 
 
Then:
close cgi;goto postcgi

 
If:
@pw ne cgi(1)

 
 
Then:
close cgi;goto postcgi

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

 
 
Then:
UName=cgi(3);ff="1"

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

 
 
Then:
Pass=cgi(3);ff="1"

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

 
 
Then:
VPass=cgi(3);ff="1"

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

 
 
Then:
Email=cgi(3);ff="1"

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

 
 
Then:
FName=cgi(3);ff="1"

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

 
 
Then:
LName=cgi(3);ff="1"

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

 
 
Then:
URL=cgi(3);ff="1"

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

 
 
Then:
Remember=cgi(3);ff="1"

 
If:
 

 
 
Then:
delete cgi;getnext cgi;goto cgiloop

If:
ff eq "0"

 
 
Then:
ErrMsg="";call "regform"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
UName eq ""

 
 
Then:
ErrMsg="No Username specified.";call "regform"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
Email eq ""

 
 
Then:
ErrMsg="No email address specified.";call "regform"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
 

 
 
Then:
lookup ebans = flfss_banned_emails k=(Email) i=A -nx

 
If:
ebans

 
 
Then:
close ebans;ErrMsg="You have been BANNED. You may not create a new account.";call "regform"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
 

 
 
Then:
close ebans

 
If:
 

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

 
If:
 

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

 
If:
 

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

 
If:
 

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

 
If:
 

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

 
If:
 

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

 
If:
 

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

 
If:
Pass eq "" or VPass eq "" or Pass ne VPass

 
 
Then:
ErrMsg="Password fields empty or do not match.";call "regform"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
 

 
 
Then:
call "scramble_pass"

 
If:
 

 
 
Then:
Cookie=""

 
If:
Remember eq "Y"

 
 
Then:
call "make_cookie"

 
If:
 

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

 
If:
account

 
 
Then:
close account;ErrMsg="Username already taken.";call "regform"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
 

 
 
Then:
lookup addacct = flfss_accounts r=free -n

 
If:
not addacct

 
 
Then:
ErrMsg="No free record found for account generation.";call "generr"

 
If:
ErrReturn eq "DONE"

 
 
Then:
goto myexit

 
If:
 

 
 
Then:
addacct(1)=UName;addacct(2)=Email;addacct(3)=FName;addacct(4)=LName

 
If:
 

 
 
Then:
addacct(5)="N";addacct(6)="Y";addacct(7)=URL;addacct(8)="N";addacct(9)=PEncode

 
If:
 

 
 
Then:
write addacct;close addacct

 
If:
 

 
 
Then:
call "insert_session"

 
If:
 

 
 
Then:
ErrMsg="\""&UName&"\" - Thank you for registering!";call "regdone"

 
If:
 

 
 
Then:
exit

If:
 

 
 
Then:
exit