<%option explicit%> <% '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, MostRecent '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, DB, lineup 'If sent via querystring from admin page, use that. Otherwise use session variable sent via login if request.querystring("manager") <> "" then manager = request.querystring("manager") 'lineup = request.querystring("lineup") else manager = session("manager") 'inserts hidden form response from login form 'set DB = server.createobject("DBEdit.DBAccessProcs") 'DB.DSN="billnewman" 'Names data source 'DB.TableName="Clubs" 'Names table 'set RS = DB.GetRecords ("no","no") 'Retrieves all records in table 'if not rs.eof then 'do until rs.eof 'if manager = rs("ClubID") then 'lineup = rs("MostRecent") 'Gets most recent lineup number 'response.write "lineup = " & lineup & " and manager = " & manager 'response.write "There is something in the recordset!" 'end if 'rs.movenext 'loop 'end if end if 'rs.close 'conn.close 'set rs = nothing 'set conn = nothing dtDate = date() dtTime = time() set conn = server.createobject("adodb.connection") set rs = server.createobject("adodb.recordset") conn.open "billnewman" sql = "select t1.*, t2.* from Lineups as t1, Clubs as t2 where t1.ClubID = t2.ClubID and t1.ClubID =" & manager 'retrieves current lineup for input rs.open sql, conn if not rs.eof then do until rs.eof 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") 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