<%on error resume next%> <% dim Action, text, manager, lineup dim Login, ActiveSession dim strLogin, strPassword dim ID Action = request.querystring("ActionType") 'If user has active session variable, means they have successfully logged in 'in previous ten minutes. Otherwise, start from scratch, with action = "" if Action = "" and session("ActiveSession") = "xyz123abc456uvw789rst01234" then Action = "Loginsuccess" end if 'Login starts here, with action being empty if Action = "" and session(ActiveSession) = "" then %>







Login
Password
<% elseif Action = "Login" then strLogin = request.form("User") strPassword = request.form("Pass") 'Sets connection and recordset object variables to current database settings Set CONN = Server.CreateObject("ADODB.Connection") set RECORDSET = server.createobject("ADODB.Recordset") 'Statement to select any record with matching email and password fields SQL = "SELECT * from Clubs where Login='"& strLogin &"' and Password = '"& strPassword &"'" CONN.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\brink-premfs1\sites\premium3\williamnewman\database\billnewman.mdb" RECORDSET.OPEN SQL,CONN 'opens recordset, reads statement "sql" and acts on active connection "conn" if not (RECORDSET.eof)then do while not RECORDSET.EOF Response.write "
" Response.Write "







" Response.Write "
" Response.Write "
" Response.Write "
" & RECORDSET("Club") & " Clubhouse
" Response.Write "" Response.Write "
" Response.Write "
" 'Next part adjusted for Carmena if RECORDSET("ClubID") = 9 then Response.Write "
Welcome, Ms. " & RECORDSET("MgrLast") & ".
" else Response.Write "
Welcome, Mr. " & RECORDSET("MgrLast") & ".
" end if manager = RECORDSET("ClubID") lineup = RECORDSET("MostRecent") session("manager") = RECORDSET("ClubID") session("lineup") = RECORDSET("MostRecent") 'response.write "Lineup Session Variable is: " & session("lineup") 'response.write "Manager Session Variable is: " & session("manager") 'response.write "manager variable is currently: " & manager 'response.write "lineup variable is currently: " & lineup RECORDSET.MoveNext loop 'Sets action to proceed 'response.write "manager variable is currently: " & manager 'response.write "lineup variable is currently: " & lineup action = "Loginsuccess" 'Sets session variable to specific (arbitrary) string. 'Will allow user to remain logged in for 10 minutes, if inactive. session("ActiveSession") = "xyz123abc456uvw789rst01234" else 'If no match, inform user Response.Write "







" Response.Write "
" Response.Write "
" Response.Write """Login or Password are incorrect.""

" Response.Write "Try Again?
" Response.Write "
" end if RECORDSET.Close CONN.Close set RECORDSET = nothing set CONN = nothing 'If login successful, open frameset elseif Action = "Loginsuccess" then 'response.write "manager variable is currently " & manager tried to use variable again, and it had cleared 'response.write "manager session is currently " & session("manager") 'response.write "lineup variable is currently " & lineup 'response.write "linuep session is currently " & session("lineup") %> <br><br><br><br><br> <div align="center"> <h1>This site is maintained with 'Frame' Technology. <p>Please use a browser that allows frames.</p></h1> <h3><p>Thank you, Bill Newman</p></h3> </div> </noframe> </html> <% 'else ' response.write "Login unsuccessful. Refresh browser to try to log in again." end if %>