%@ Language=VBScript %>
<% option explicit %>
<%
Dim UserID
Dim Password
dim msg
dim cm
Function validateInput(UserID, Password)
if (UserID <> "") and (Password <> "") then
validateInput=True
else if Request("Submit") = "Register" then
msg = "You must enter a UserID and Password to apply to this site."
validateInput = False
else
msg = "You must enter your UserID and Password to enter this site."
validateInput = False
end if
end if
end function
if Request("Submit") = "Cancel" then
response.Redirect "ufcw-rframe.htm"
end if
' save the UserID and Password
UserID = Request("UserID")
Password = Request("Password")
Session("Update") = ""
'
'response.write UserID
'response.write Password
if Request("Submit") = "Register" then
if validateInput(UserID, Password) then
if not findUser(UserID, Password) then
if insertUser(UserID, Password) then
Session("UserID") = UserID
Session("Password") = Password
' Session("ReqID") = "ADD"
Response.Redirect "ufcw-ms.asp"
else
msg = "Unable to save your user information."
Response.end
end if
else
msg = "Sorry UserID already exist."
end if
end if
end if
if Request("Submit") = "Enter" then
if validateInput(UserID, Password) then
if not findUser(UserID, Password) then
msg = "Your UserID and password failed to authenticate."
' if insertUser(UserID, Password) then
' Response.Redirect "Bogus-MemberPage.asp"
' else
' msg = "Unable to save your user information."
' Response.end
' end if
' elseif Session("UserID") = "Admin" and Session("Password") = "Admin" then
' call addAppUser(Session("UserID"))
' response.redirect "ch23i4.asp"
else
call addAppUser(Session("UserID"))
' Response.redirect "ufcw-ms.asp"
Response.redirect "Friends.htm"
end if
else
msg = "Your UserID and password failed to authenticate."
end if
end if
%>