<%Response.Buffer=true%> <% on error resume next %> ALPHABETICAL | UP & IN FANTASY BASEBALL <%=year(date)%> DRAFT DAY
>> Click here to get back to HOME page <<


ALREADY GONE!! (Players already taken <%=year(date)%>. Alphabetical order.)

" end if end if else 'do without time info here: (pos arrays, etc. only) end if 'can't split nothing! %>
<% 'show times of person's draft, etc! fieldStr = "tblDraft.DraftNumber,tblDraft.POS,tblDraft.DraftTime,tblDraft.MLBTeam,tblDraft.Player" arStr = "DraftNumber,POS,DraftTime,MLBTeam,Player" strArray = split(arStr,",") set rs = server.CreateObject("ADODB.Recordset") 'sql = "select " & fieldStr & " from tblDraft where (not tblDraft.DraftNumber = 0) and (tblDraft.FantasyTeam= '"& aTeam(CurrPick) & "') order by tblDraft.DraftNumber desc" sql = "select " & fieldStr & " from tblDraft where (tblDraft.FantasyTeam= '"& aTeam(CurrPick) & "') order by tblDraft.DraftNumber desc" 'rw sql 'Response.End rs.Open sql,connstring if rs.eof = true and rs.bof = true then 'no records rw " There are NO PLAYERS LEFT TO PICK " & vbCrLf rs.Close:set rs = nothing else 'records aX = 0 'reset position counters a=Catcher, etc. bX = 0 cX = 0 dX = 0 eX = 0 fX = 0 DraftTimeStr = "" LastDraftStr = "" PositionStr = "" MLBStr = "" PlayerStr = "" colArray = rs.GetRows(-1,0,strArray)'specify fields rs.Close:set rs = nothing cols = UBound(colArray,1) rows = UBound(colArray,2) numRecs = rows + 1 LastDraft = 0 for x = 0 to rows 'Player,FantasyTeam,MLBTeam,Franchised,DraftNumber,Round,Position DraftNumber = trim(colArray(0,x)) if isnumeric(DraftNumber) then DraftNumber = cint(DraftNumber) Position = trim(colArray(1,x)) Position = right(Position,len(Position)-1) if DraftNumber > 0 then 'only build strings if draft number not zero (franchise) if PositionStr = "" then 'build string of last drafted positions: PositionStr = Position else PositionStr = PositionStr & "~" & Position end if DraftTime = trim(colArray(2,x)) 'Response.Write "DraftTime: " & DraftTime 'Response.End if not isnull(DraftTime) then DraftTime = cstr(DraftTime) if DraftTimeStr = "" then 'build string of current draft times: DraftTimeStr = DraftTime else DraftTimeStr = DraftTimeStr & "~" & DraftTime end if 'DraftNumber = trim(colArray(3,x)) 'can't build string if time is null! if isnumeric(DraftNumber) then DraftNumber = cint(DraftNumber) DraftNumber = DraftNumber - 1 end if if LastDraftStr = "" then 'build string of last draft numbers: LastDraftStr = DraftNumber else LastDraftStr = LastDraftStr & "," & DraftNumber end if end if 'Response.Write "DraftTimeStr: " & DraftTimeStr & "
" 'Response.Write "LastDraftStr: " & LastDraftStr & "
" 'Response.End MLBTeam = trim(colArray(3,x)) if MLBStr = "" then 'build string of mlb teams MLBStr = MLBTeam else MLBStr = MLBStr & "~" & MLBTeam end if Player = trim(colArray(4,x)) if PlayerStr = "" then 'build string of player names PlayerStr = Player else PlayerStr = PlayerStr & "~" & Player end if end if 'only build strings if Draftnumber <> 0 select case Position case "C" aX = aX + 1 case "1B" bX = bX + 1 case "2B" cX = cX + 1 case "3B" dX = dX + 1 case "SS" eX = eX + 1 case "OF" fX = fX + 1 case "P" gX = gX + 1 end select DraftNumber=0'reset next end if 'Response.Write "DraftTimeStr: " & DraftTimeStr & "
" ' Response.Write "LastDraftStr: " & LastDraftStr & "
" ' Response.End Response.Write "TEAM ON CLOCK: " & aTeam(CurrPick) & " " Response.Write "OWNER: " & aOwner(CurrPick) & " " Response.Write "NEEDS: " if (aX < 2) then Response.Write "C: " & (2-aX) & "    " if (bX < 2) then Response.Write "1B: " & (2-bX) & "    " if (cX < 2) then Response.Write "2B: " & (2-cX) & "    " if (dX < 2) then Response.Write "3B: " & (2-dX) & "    " if (eX < 2) then Response.Write "SS: " & (2-eX) & "    " if (fX < 6) then Response.Write "OF: " & (6-fX) & "    " if (gX < 6) then Response.Write "P: " & (6-gX) & "    
" if DraftTimeStr <> "" then 'can't split nothing! Response.Write "DRAFTS: " draftTimeTotal = 0 aDraftTime = split(DraftTimeStr,"~") 'split curr draft times to array to compare to prev in db hit below aMLBTeam = split(MLBStr,"~") aPosition = split(PositionStr,"~") aPlayer = split(PlayerStr,"~") 'hit db to get draft times of PREVIOUS pick to determine draft times of owner up to plate! fieldStr = "tblDraft.DraftTime" arStr = "DraftTime" strArray = split(arStr,",") set rs = server.CreateObject("ADODB.Recordset") sql = "select " & fieldStr & " from tblDraft where tblDraft.DraftNumber in ("& LastDraftStr & ") order by tblDraft.DraftNumber desc" 'rw sql 'Response.End rs.Open sql,connstring if rs.eof = true and rs.bof = true then 'no records rw " There are NO PLAYERS LEFT TO PICK " & vbCrLf rs.Close:set rs = nothing else 'records colArray = rs.GetRows(-1,0,strArray)'specify fields rs.Close:set rs = nothing cols = UBound(colArray,1) rows = UBound(colArray,2) numRecs = rows + 1 LastDraft = 0 for x = 0 to rows if clr = "red" then clr = "blue" else clr = "red" 'Player,FantasyTeam,MLBTeam,Franchised,DraftNumber,Round,Position LastDraftTime = trim(colArray(0,x)) 'Response.Write a currDraftTime = cdate(aDraftTime(x)) if isdate(LastDraftTime) then LastDraftTime = cdate(LastDraftTime) else LastDraftTime = dateadd("n",-1,currDraftTime) 'Response.Write "Last DraftTime: " & LastDraftTime & "
" 'Response.Write "Curr DraftTime: " & currDraftTime& "
" 'Response.End draftSeconds = datediff("s",LastDraftTime,currDraftTime) draftTimeTotal = draftTimeTotal + draftSeconds draftTime = SecToMin(draftSeconds) 'Response.Write ">> " & (2-aX) & "    " if x < (UBound(aPlayer) + 1) then rw ">>" & aPlayer(x) & ", (" & aPosition(x) & ") " & aMLBTeam(x) & "[" & draftTime & "]  " 'Response.Write "Player: " & aPlayer(x) & "
" 'Response.Write "MLB Team: " & aMLBTeam(x) & "
" 'Response.Write "Position: " & aPosition(x) & "
" 'Response.Write "draftTime: " & draftTime 'Response.End end if next 'Response.Write "x: " & x 'rw UBound(aPlayer) 'Response.Write "draftTimeTotal: " & draftTimeTotal 'Response.End if draftTimeTotal > 0 then totalTime = SecToMin(draftTimeTotal) 'avgTime = draftTimeTotal/(UBound(aPlayer)+1) 'Response.Write UBound(aPlayer) 'Response.End if Ubound(aPlayer) = 0 then dividend = 1 else dividend = UBound(aPlayer) avgTime = draftTimeTotal/dividend avgTime = cint(avgTime) avgTime = SecToMin(avgTime) 'Response.Write "
Total Time: [" & totalTime & "] Average Time: [" & avgTime & "]" Response.Write "
Total: [" & totalTime & "]
AVG: [" & avgTime & "]
LAST 10 PICKS (all teams): <% fieldStr = "tblDraft.Player,tblDraft.FantasyTeam,tblDraft.MLBTeam,tblDraft.POS" arStr = "Player,FantasyTeam,MLBTeam,POS" strArray = split(arStr,",") set rs = server.CreateObject("ADODB.Recordset") sql = "select top 10 " & fieldStr & " from tblDraft where not tblDraft.DraftNumber=0 order by tblDraft.DraftID desc" rs.Open sql,connstring if rs.eof = true and rs.bof = true then 'no records rw "NO PLAYERS YET CHOSEN " & vbCrLf rs.Close:set rs = nothing else 'records colArray = rs.GetRows(-1,0,strArray)'specify fields rs.Close:set rs = nothing cols = UBound(colArray,1) rows = UBound(colArray,2) numRecs = rows + 1 for x = 0 to rows Player = trim(colArray(0,x)) FantasyTeam = trim(colArray(1,x)) MLBTeam = trim(colArray(2,x)) Position = trim(colArray(3,x)) Position = right(Position,len(Position)-1) rw ">>" & Player & " [" & FantasyTeam & "] " next end if %>
<% for x = LBound(aTeam) to UBound(aTeam) Response.Write "" Response.Write "" & ucase(aTeam(x)) & "  |  " next %>
<% storeLetter = "" 'init fieldStr = "tblDraft.Player,tblDraft.FantasyTeam,tblDraft.MLBTeam,tblDraft.POS" arrayStr = "Player,FantasyTeam,MLBTeam,POS" strArray = split(arrayStr,",") set rs = server.CreateObject("ADODB.Recordset") sql = "select " & fieldStr & " from tblDraft where not (tblDraft.Player='UNKNOWN') order by tblDraft.Player" rs.Open sql,connstring if rs.eof = true and rs.bof = true then 'no records rw " There are No PLAYERS " & vbCrLf rs.Close:set rs = nothing else 'records colArray = rs.GetRows(-1,0,strArray)'specify fields rs.Close:set rs = nothing cols = UBound(colArray,1) rows = UBound(colArray,2) numRecs = rows + 1 for x = 0 to rows Player = trim(colArray(0,x)) FantasyTeam = trim(colArray(1,x)) MLBTeam = trim(colArray(2,x)) Position = trim(colArray(3,x)) Position = right(Position,len(Position)-1) tst = posTest(Player)'put in alphas, column change rw "" & Player & " (" & Position & " - " & MLBTeam & ") [" & FantasyTeam & "]
" next end if %>
ROSTERS   |   HOME   |   Back to Top   
Copyright © 1999-<%=year(Date)%>, NEWMANIC Inc.   All rights reserved.
<% function rw (str) Response.Write str end function function posTest(str) 'check letter of field, if first of alpha, write a header if str <> "" then char = left(str,1) char = UCase(char) if char = storeLetter then 'same, nothing happens posTest = str else select case char case "M" 'halfway thru alpha. MUST have at least one letter "M" entry to work!! rw "" & vbCrLf 'rw "" rw "" rw "

" & char & "

" case else 'any other letter rw "

" & char & "

" end select storeLetter = char end if else posTest = str end if end function %>