<% action = request.querystring("action") dim ownerType,ownertypeqstring ownertype = request.querystring("ownertype") if ownertype = "forsale" then ownertypeqstring = "ownertype=forsale" elseif ownertype = "forlease" then ownertypeqstring = "ownertype=forlease" elseif request.querystring<> "" then response.write "please specify ownertype" response.end end if Select Case action Case "login" sql = "SELECT * from tblUsers WHERE userName = '" & request.Form("userName") & "'" rs.Open sql, conn If rs.EOF Then errorFlag = True errorMsg = "

Please enter the proper user name." Else if request.form("userPassword") = rs("userPassword") Then session("userID") = rs("userID") If VarType(rs("agentID")) = 1 Then session("agentLogin") = False Else session("agentLogin") = True End If If rs("admin") = 0 Then session("adminLogin") = False Else session("adminLogin") = True End If Response.Redirect "/properties/index.asp?page=search&cat=showall" & "&" & ownertypeqstring Else errorFlag1 = True errorMsg = "

Please enter the correct password." End If End IF rs.close Case "reqpw" sql = "SELECT * from tblUsers WHERE userEmail = '" & request.Form("userEmail") & "'" rs.Open sql, conn If rs.EOF Then errorFlag2 = True errorMsg = "

We currently do not have that email address on file. Please try another email address or check your spelling." Else Set Mail = Server.CreateObject("CDONTS.NewMail") Mail.From = "YourHomesite.Com " Mail.To = rs("userEmail") Mail.Subject = "Your Request" Mail.MailFormat = 0 Mail.BodyFormat = 0 Mail.Body = rs("userName") & ",

Here is the password you requested that will allow you to access YourHomeSite.net.

" & rs("userPassword") Mail.Send Set Mail = Nothing Response.Redirect "/properties/index.asp" End If rs.close Case "logout" Session.Abandon Response.Redirect "/properties/index.asp" Case "register" errorFlag = False SetVars "form" errorMsg = "" If userName = "" or vartype(userName) = 1 or userPassword = "" or vartype(userPassword) = 1 or userEmail = "" or vartype(userEmail) = 1 then errorFlag3 = True errorMsg = "

Please be sure to fill all three fields on the form." End If sql = "SELECT * from tblUsers WHERE userEmail = '" & request.Form("userEmail") & "'" rs.open sql, conn If not RS.EOF then errorFlag4 = True errorMsg = "

That email address is already in use, please use a different email address or log in using your current one." End if rs.close If not errorFlag3 AND not errorFlag4 Then sql="SELECT * from tblUsers WHERE 1 <> 1" rs.open sql, conn rs.addNew 'REQUEST.FORM not needed because of SetVars "form" rs("userName") = userName rs("userEmail") = userEmail rs("userPassword") = userPassword rs.Update rs.Close Response.Redirect "/properties/index.asp?page=login&msg=yes" & "&" & ownertypeqstring thankMsg = "

Thank you for registering, please login now." End If End Select %> Login to YourHomeSite.net <%If request.querystring ("cat")<>"register" then%> <%end if%> <%If request.querystring ("cat")="register" then%> <%end if%>

<% If request.querystring ("msg") = "yes" then response.write (thankMsg) end if If errorFlag then response.write (errorMsg) end if If errorFlag1 then response.write (errorMsg) end if If errorFlag2 then response.write (errorMsg) end if If errorFlag3 then response.write (errorMsg) end if If errorFlag4 then response.write (errorMsg) end if%>

Login to YourHomeSite.net

Please enter your username and password

Login:
Password:
 

If you don't have a username or password you may register here.

Did you forget your password?


Enter your email address below and we will send you your password
  
Create an account at YourHomeSite.net

Please fill in the information below

User Name:
E-Mail:
Password: