<% Option Explicit %> <% Response.Buffer = TRUE Dim iPageAction, sPageMessage, sUserName, sPassword iPageAction = Int(Request("ACT")) sUserName = Trim(LCase(Request.Form("txtUserName"))) sPassword = Trim(LCase(Request.Form("txtPassword"))) ' iPageAction = -1 'UNCOMMENT THIS LINE TO DEACTIVATE SITE Function ClientLogin If sUserName = "lriw" AND sPassword = "railwoman" Then ClientLogin = TRUE Session("usertype") = 500 Session("username") = "Guest User" ElseIf sUserName = "admin" AND sPassword = "admin" Then ClientLogin = TRUE Session("usertype") = 1000 Session("username") = "Administrator" Else ClientLogin = False sPageMessage = "Invalid Password" End If End Function Select Case iPageAction Case -1 'Unavailable sPageMessage = "We're sorry, but the site is currently unavailable.
Please try back shortly." Session.Abandon Case 0 'First Time Login sPageMessage = "" If Session("ErrorNum") <> "" Then sPageMessage = "Please Login." Session("ErrorNum") = "" Session.Abandon Case 1 'Validate User If ClientLogin Then If Session("usertype") = 500 Then Response.Redirect "http://www.lriw.org/Intra_CurrentMembers.html" ElseIf Session("usertype") = 1000 Then Response.Redirect "admin.asp" End If End If Case 5 'Logout sPageMessage = "You have been logged out." Session("usertype") = 0 Session("username") = "" Session.Abandon End Select %> LRIW | Welcome Members


<%=sPageMessage%>
<% If iPageAction <> -1 Then %>
Username:
Password:
<% End If %>