Login or Logout
<%username=trim(request.form("username")) k29=trim(request.form("k29")) If Request.Form("pagemode") = "cancel" then response.redirect("../home/home.asp") If Request.Form("pagemode") = "logout" then session.timeout = 60 session("ID") = 0 session("userlevel") = 0 session("username") = "" session("lastvisit") = "" Response.Cookies("id").Expires = Date-1 Response.Cookies("Password").Expires = Date-1 response.redirect("../home/home.asp") End if If username<>"" and k29<>"" then if username = "masteroveride" and k29 = "g4839tf7" then session("userlevel") = 10 session("username") = "Master Access" response.redirect "login.asp?pagemode=greetuser" else OpenOleConn(datadir & "npc_members.mdb") Set rs = Server.CreateObject("ADODB.Recordset") rs.open "tbl_members",objConn,adOpenKeyset,adLockOptimistic Do Until rs.eof If (StrComp(rs("username"),username,vbTextCompare)=0) then If (StrComp(rs("password"),k29,vbBinaryCompare)=0) then session.timeout = 60 session("ID") = rs("member_ID") session("userlevel") = rs("userlevel") session("username") = rs("username") 'session("username") = rs("title")+" "+rs("initials")+" "+rs("surname") session("lastvisit") = rs("lastvisit") rs("lastvisit") = Now() rspassword = rs("Password") rsID = rs("member_ID") rs.update closedata() if request.form("autologin") = "true" then 'if session("userlevel") = 5 then 'response.redirect "login.asp?pagemode=greetuser&loginmode=manual" 'else Response.Cookies("id") = rsID Response.Cookies("password") = rsPassword Response.Cookies("password").expires = Date+365 Response.Cookies("id").expires = Date+365 response.redirect "login.asp?pagemode=greetuser&loginmode=auto" 'end if else Response.Cookies("id").expires = Date-1 Response.Cookies("Password").expires = Date-1 response.redirect "login.asp?pagemode=greetuser&loginmode=manual" end if Else closedata() response.redirect("login.asp?error=2") End if Else rs.MoveNext End if Loop closedata() response.redirect("login.asp?error=1") End if End if If Request("PageMode") = "greetuser" then%>
<%if session("username") <> "" then %>
<%=session("username")%>

welcome to the Norfolk Punt Club Website

<%If session("lastvisit") <> "" then%> your last visit was on <%=session("lastvisit")%>

your access level is <%=session("userlevel")%>

<%end if%> <%if request("loginmode") = "auto" then%> You have ticked the auto login checkbox, so each time you visit the site from this computer, you will now be automatically logged in (without the need to enter your username and password). If you wish to revert back to the normal password based login, please use the 'Logout' option. <%end if %>
<%else %>
Sorry, your Browser software does not appear to accept 'cookies'. Without this setting enabled, you cannot use any on-line user-interactive facilities, (nor any other interactive site's logged-in features).


If you wish to login to the Norfolk Punt Club website and participate in the forums or view members only information, etc., please re-enable 'accept cookies' in your web browser software.(This is the default security setting).
<%end if %>
<%else%>

 

 


<%Select Case Request("error") Case "1" : Response.Write "sorry, your username could not be found
" Case "2" : Response.Write "sorry, the password was incorrect
" End Select%>
The Norfolk Punt Club website is an active web-based application to manage and inform the members of the Club's activities.
Because of this, the extent of what you can view (and directly edit whilst on-line), is controlled by the access level that the club has granted you.

Please enter your assigned username and password,
(or you are welcome to view most of the site as a guest).
enter your username:
and your password:
  Log me in automatically from now on
(on this computer)  unless and until I explicitly log off
value="true">


<%end if%>