<% if LCASE(Application(cLICENSE_ID & "cREGISTER_PAGE"))<>"register.asp" then if Len(Application(cLICENSE_ID & "cREGISTER_PAGE"))>0 then Response.Redirect Application(cLICENSE_ID & "cREGISTER_PAGE") call RaiseError(STR_ERROR_DISABLED) end if if intCurrentUserID>0 then call RaiseError(STR_ERROR_ALREADY_REGISTERED) set objRequest = GetRequestForm(Application(cLICENSE_ID & "cATTACHMENTS_UPLOAD_METHOD")) strName = Trim(objRequest("name")) strEmail = Replace(objRequest("email"), " ", "") strPassword = objRequest("password") strPassword2 = objRequest("password2") blnRegistred = false if strEmail="" and strPassword="" and strPassword2="" and strName="" then strName = Request.Cookies(cLICENSE_ID)("name") strEmail = Request.Cookies(cLICENSE_ID)("email") else strError = CheckUserFormValues(intCurrentUserID, strName, strEmail, strPassword, strPassword2) if not Len(strError)>0 then intCurrentUserID = AddUser(GetDBCon(), strName, strEmail, strPassword, "", false) 'false=not a test user Session(cLICENSE_ID & "UID") = intCurrentUserID Response.Cookies(cLICENSE_ID)("name") = strName Response.Cookies(cLICENSE_ID)("email") = strEmail call SetUserPermissionCookies(GetDBCon(), intCurrentUserID) call SetLogonCookies(strName, strEmail, strPassword, objRequest("remember")="on", objRequest("autologon")="on") blnRegistred = true call ServerTransfer("default.asp") end if end if %>