%blnLogin = true%> <% if request.form("submit") = "Login" then sql = "select * from distributor where username = '" & request.form("username") & "' and password = '" & request.form("password") & "'" set rs = conn.Execute(sql) if rs.eof then msg = "Login Failed!
" else if rs("approved") = 0 then session("status") = "Pending" msg = "You have not yet been approved for access to the system.
" blnAccess = false elseif rs("access") = 0 then session("status") = "Locked out" msg = "You have been locked out of the system.
" blnAccess = false elseif rs("create_new") = 0 then session("status") = "Limited" blnAccess = true else session("status") = "Normal" blnAccess = true end if if blnAccess then session("dist_id") = rs("dist_id") response.redirect "home.asp" end if end if end if %>