% if (Request.Form("action") = "Login") then Username = Replace(Request("username"),"'","") Password = Replace(Request("password"),"'","") SQL = "SELECT * FROM user WHERE username = '" & SqlEsc(Username) & "' AND password = '" & SqlEsc(Password) & "' AND (disabled = 0 or disabled=2)" Set RS = Conn.Execute(SQL) if not RS.EOF then If RS("disabled") = 0 Then Call LoginUser(Username, RS("access")) If Len(Request("redir")) > 0 Then Session("redir") = Request("redir") Call LogIt("login.asp", "", "", "LoginRedir", Request("redir"), "", "", "") Response.Redirect("default.asp") else Response.Redirect("default.asp") end if else Session("username") = "" LoginErr="NotConfirmed" Call LogIt("login.asp", "", "", "LoginErr", LoginErr, "", "", "") End If else Session("username") = "" LoginErr="FailedLogin" Call LogIt("login.asp", "", "", "LoginErr", LoginErr, "", "", "") end if end if if (Request("action") = "Logout") then Call LogoutUser LoginErr="LogoffComplete" end if if Session("username") = "" then %>
| Login <% If LoginErr="FailedLogin" Then %> Wrong username or password. <% End If %> <% If LoginErr="NotConfirmed" Then %> Account not yet confirmed. Please click the link in the email you received earlier. <% End If %> <% If LoginErr="LogoffComplete" Then %> Logged off. <% End If %> Not yet a member? Register here. It's free, and you get access to all the cool freebies as well. Forgot your password? |