<%response.buffer = true%> <% 'select t1.*, t2.field from table1 as t1, table2 as t2 where t1.id= t2.f_id and t1.id = 5 '*******Need to add extra phone number, email to owner database 'Clubs:ClubID, Club, MgrLast, MgrFirst, Login, Password, Phone, EMail 'Deadlines: Week, Date, Time 'Lineups: LineupID, ClubID, Date, Time, C, BackupC, 1B, Backup1B, 2B, Backup2B, 3B, Backup3B, SS, BackupSS, OF1-OF3, BackupOF, P1-P4, BackupP, ExtraP, DH 'Pitchers: PitcherID, ClubID, Last, First, Team, Position 'Players: PlayerID, ClubID, Last, First, Team, Position 'Rosters: RosterID, ClubID, Club, Date, Time, C, BackupC, 1B, Backup1B, 2B, Backup2B, 3B, Backup3B, SS, BackupSS, OF1-OF6, P1-P6, DL1-DL8 'Transactions: TransactionID, ClubID, Club, Date, Time, Type, MovedPlayers, ActivatedPlayers, Approved, OtherClub dim rs, sql, conn, manager, C, First, Sec, Third, SS, OF1, OF2, OF3, BackupOF, P1, P2, P3, P4, BackupP, ExtraP, DH dim dayte, thyme, MgrFirst, MgrLast, Club, dtDate, dtTime, ClubID, lineup 'if session("ActiveSession") = "" then 'If no session variable at all, log back in ' response.redirect "fb_mainframeset.asp" 'else if isnumeric(request.querystring("manager")) then 'Must be via the querystring ' manager = request.querystring("manager") ' lineup = request.querystring("lineup") 'else ' manager = session("manager") 'inserts hidden form response from login form ' lineup = session("lineup") 'response.write "manager session variable prior to code is: " & session("manager") & "
" 'response.write "lineup session variable prior to code is: " & session("lineup") if session("ActiveSession") = "" then 'If no active login, sends back to login response.redirect "fb_mainframeset.asp" end if if request.querystring("manager") <> "" then manager = request.querystring("manager") lineup = request.querystring("lineup") 'response.write "lineup via the querystring is: " & lineup 'response.write "manager via the querystring is: " & manager else manager = session("manager") 'inserts hidden form response from login form lineup = session("lineup") 'response.write "lineup via the session variable is: " & lineup 'response.write "manager via the session variable is: " & manager end if 'If neither of the other possibilities, use session variables dtDate = date() dtTime = time() set conn = server.createobject("adodb.connection") set rs = server.createobject("adodb.recordset") 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where t1.ClubID = t2.ClubID and t1.ClubID =" & manager CONN.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\brink-premfs1\sites\premium3\williamnewman\database\billnewman.mdb" 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where ((t1.ClubID = t2.ClubID and t1.ClubID ='" & manager &"') and (t2.MostRecent ='" & lineup & "'))" 'retrieves current lineup for input 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where ((t1.ClubID = t2.ClubID and t1.ClubID ='" & manager &") and (t2.MostRecent ='" & lineup & "' and t2.MostRecent = t1.LineupID))" 'retrieves current lineup for input sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where t1.ClubID = t2.ClubID and t1.ClubID =" & manager 'imported from backup 'sql = "select * from Lineups where LineupID =" & lineup rs.open sql, conn if not rs.eof then do until rs.eof 'if rs("LineupID") = lineup then C = rs("C") 'Loads current lineup into variables First = rs("1B") Sec = rs("2B") Third = rs("3B") SS = rs("SS") OF1 = rs("OF1") OF2 = rs("OF2") OF3 = rs("OF3") BackupOF = rs("BackupOF") P1 = rs("P1") P2 = rs("P2") P3 = rs("P3") P4 = rs("P4") BackupP = rs("BackupP") ExtraP = rs("ExtraP") DH = rs("DH") dayte = rs("Date") 'MgrFirst = rs("MgrFirst") 'MgrLast = rs("MgrLast") 'Club = rs("Club") 'ClubID = rs("ClubID") 'end if rs.movenext loop end if rs.close conn.close set rs = nothing set conn = nothing set conn = server.createobject("adodb.connection") set rs = server.createobject("adodb.recordset") 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where t1.ClubID = t2.ClubID and t1.ClubID =" & manager CONN.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\brink-premfs1\sites\premium3\williamnewman\database\billnewman.mdb" 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where ((t1.ClubID = t2.ClubID and t1.ClubID ='" & manager &"') and (t2.MostRecent ='" & lineup & "'))" 'retrieves current lineup for input 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where ((t1.ClubID = t2.ClubID and t1.ClubID ='" & manager &") and (t2.MostRecent ='" & lineup & "' and t2.MostRecent = t1.LineupID))" 'retrieves current lineup for input 'sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where t1.ClubID = t2.ClubID and t1.ClubID =" & manager 'imported from backup sql = "select * from Clubs where ClubID =" & manager rs.open sql, conn if not rs.eof then do until rs.eof MgrFirst = rs("MgrFirst") MgrLast = rs("MgrLast") Club = rs("Club") ClubID = rs("ClubID") 'response.write "
rs(MgrFirst) = " & rs("MgrFirst") 'response.write "rs(MgrLast) = " & rs("MgrLast") 'response.write "rs(Club) = " & rs("Club") 'response.write "rs(ClubID) = " & rs("ClubID") rs.movenext loop end if rs.close conn.close set rs = nothing set conn = nothing 'Needs to have team name, date of lineup brought up from database %> lineup1.asp
<%=Club%>
Lineup created <%=dayte%>
Input changes to your lineup, and click submit.
Catcher
First Base
Second Base
Third Base
Shortstop
Outfield
Outfield
Outfield
Pitcher
Pitcher
Pitcher
Pitcher
DH
Backup OF
Backup P
Extra P

<% response.write "Delete Lineup
" %>