WWW Home Page Request Handler
%gset(sitename,www.3dcom.com)
%gset(vendorname,www)
%if(%equal(%client-method%,POST),
'%set(state,%client-body%%client-query%),
'%set(state,%client-query%))
%if(%lt(%len(%form(EMail)),6),'%redirect(http://%sitename%/web.html?%state%&Error=%url-encode("A valid Email address is required.")))
%gset(cleanmail,%trimleft(%trimright(%tolower(%form(EMail)))))
%if(%not(%wcmatch(%cleanmail%,*@*)),'%redirect(http://%sitename%/web.html?%state%&Error=%url-encode("The Email address does not contain an @ in it")))
%if(%not(%wcmatch(%cleanmail%,*.*)),'%redirect(http://%sitename%/web.html?%state%&Error=%url-encode("The Email address does not contain a period in it")))
%gset(cmax,%len(%cleanmail%))%gset(fixedmail,%null%)%gset(ix,0)%null(
%if(%wcmatch(%cleanmail%,*@aol.com),'%do('%gset(ch,%mid(%cleanmail%,%ix%,1))%if(%not(%equal(%ch%," ")),'%gset(fixedmail,%fixedmail%%ch%))%gset(ix,%iadd(%ix%,1)),'%lt(%ix%,%cmax%)))
%if(%wcmatch(%cleanmail%,*@compuserve.com),'%do('%gset(ch,%mid(%cleanmail%,%ix%,1))%if(%equal(%ch%,\,),'%gset(fixedmail,%fixedmail%.),'%gset(fixedmail,%fixedmail%%ch%))%gset(ix,%iadd(%ix%,1)),'%lt(%ix%,%cmax%)))
%if(%fixedmail%,%gset(cleanmail,%fixedmail%))%if(%wcmatch(%cleanmail%,*\,*),'%redirect(http://%sitename%/web.html?%state%&Error=%url-encode("The Email address should not contain a comma")))%if(%wcmatch(%cleanmail%,"* *"),'%redirect(http://%sitename%/web.html?%state%&Error=%url-encode("The Email address should not contain a space"))))
%if(%not(%client-authname%),'%redirect(web.html?%state%&Error=%url-encode("Something is broken, please try again later")))
%if(%not(%hash-get(%client-authname%)),'%redirect(web.html?%state%&Error=%url-encode("Something is broken, please try again later")))
%redirect(http://chat.tgforum.com/makeweb.html?&userN=%url-encode(%client-authname%)&passW=%url-encode(%hash-get(%client-authname%))&emailAddr=%url-encode(%cleanmail%))