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


" Response.Write "Est. Completion: [" & approxFinish & "]
" end if end if 'can't split nothing! %>

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

" 'Response.Write "
<% 'show times of person's draft, etc! aShort = split(shortStr,",") 'short names of teams from draftINC.asp, inc above in whosupINC.asp fieldStr = "tblDraft.DraftNumber,tblDraft.POS,tblDraft.DraftTime,tblDraft.MLBTeam,tblDraft.Player,tblDraft.DraftSec" arStr = "DraftNumber,POS,DraftTime,MLBTeam,Player,DraftSec" strArray = split(arStr,",") set rs = server.CreateObject("ADODB.Recordset") sql = "select " & fieldStr & " from tblDraft where (tblDraft.FantasyTeam= '"& aTeam(CurrPick) & "') order by tblDraft.DraftNumber desc" 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 = "" currDraftNum = "" 'will fill this ONCE 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 DraftNumber = trim(colArray(0,x)) if isnumeric(DraftNumber) then DraftNumber = cint(DraftNumber) if currDraftNum = "" then currDraftNum = DraftNumber 'number of current drafts total, fill once! Position = trim(colArray(1,x)) Position = right(Position,len(Position)-1) if DraftNumber > 0 then 'only build strings if draft number not zero (draft picks, no franchise) if PositionStr = "" then 'build string of last drafted positions: PositionStr = Position else PositionStr = PositionStr & "~" & Position end if DraftTime = trim(colArray(2,x)) 'should no longer need! 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 DraftSec = trim(colArray(5,x)) if not isnull(DraftSec) then 'CHANGED TO ACCOMODATE SECONDS, NOT TIMES!! DraftTime = cstr(DraftSec) if DraftTimeStr = "" then 'build string of current draft times: DraftTimeStr = DraftTime else DraftTimeStr = DraftTimeStr & "~" & DraftTime end if 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 'no records Response.Write "TEAM ON CLOCK: " & ucase(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 " PREVIOUS DRAFTS:  " draftTimeTotal = 0 draftCounter = 0 'round number aDraftTime = split(DraftTimeStr,"~") 'split draft times in seconds to array aMLBTeam = split(MLBStr,"~") aPosition = split(PositionStr,"~") aPlayer = split(PlayerStr,"~") for x = LBound(aPlayer) to UBound(aPlayer) if clr = "red" then clr = "blue" else clr = "red" if aDraftTime(x) <> "" then 'cant add if empty if isnumeric(aDraftTime(x)) then 'must be num draftSeconds = cint(aDraftTime(x)) draftTimeTotal = draftTimeTotal + draftSeconds 'total draftTime = SecToMin(draftSeconds) end if end if 'Response.Write ">> " & (2-aX) & "    " if x < (UBound(aPlayer) + 1) then rw ">>" & aPlayer(x) & ", (" & aPosition(x) & ") " & aMLBTeam(x) & "[" & draftTime & "]  " end if DraftCounter = DraftCounter + 1 next 'if draftTimeTotal > 0 then if DraftCounter > 0 then totalTime = SecToMin(draftTimeTotal) avgTime = draftTimeTotal/DraftCounter avgTime = cint(avgTime) avgTime = SecToMin(avgTime) 'Response.Write "
Total Time: [" & totalTime & "] Average Time: [" & avgTime & "]" 'Response.Write "
" & aShort(CurrPick) & " Total: [" & totalTime & "]
" & aShort(CurrPick) & " AVG: [" & avgTime & "]
" & aShort(CurrPick) & " Total: [" & totalTime & "]
" & aShort(CurrPick) & " AVG: [" & avgTime & "]
" Response.Write "
" & aTeam(CurrPick) & " Total Draft Time: [" & totalTime & "]  " & aTeam(CurrPick) & " Average Draft Time: [" & avgTime & "] " StartDraft = Application("StartDraft") if StartDraft = "" then 'update from time inserted to last franchise player newsql = "select DraftTime from tblDraft where DraftID=" & LastFranchise 'Response.Write "newsql is: " & newsql & "
" 'Response.End set rs2 = server.CreateObject("ADODB.Recordset") rs2.Open newsql,connstring if rs2.eof = true and rs2.bof = true then 'no records rs2.Close:set rs2 = nothing else 'records while not rs2.eof StartDraft = trim(rs2("DraftTime")) rs2.MoveNext wend rs2.Close:set rs2 = nothing Application.Lock Application("StartDraft") = StartDraft 'start of draft into app var Application.Unlock end if end if StartDraft = cdate(StartDraft) myNow = CurrentDateTime() totalSec = datediff("s",StartDraft,myNow) totalAvg = totalSec/CurrDraftNum PicksRemain = TotalPicks - CurrDraftNum 'total number of picks left approxSecLeft = PicksRemain * totalAvg approxSecLeft = cint(approxSecLeft) 'trim fractions timeOfDraft = SecToMin(totalSec) AvgOfDraft = SecToMin(totalAvg) approxFinish = dateadd("s",approxSecLeft,myNow) timeRemaining = SecToMin(approxSecLeft) 'Response.Write "Draft TOT: [" & timeOfDraft & "]
" 'Response.Write "Draft AVG: [" & AvgOfDraft & "]
" Response.Write "
DRAFT TIMES: Start Time: [" & StartDraft & "] " Response.Write "TOTAL TIME: [" & timeOfDraft & "] " Response.Write "AVG TIME: [" & AvgOfDraft & "] " 'Response.Write "timeRemaining: " & timeRemaining & "
" 'Response.Write "Draft Comp?: [" & approxFinish & "]
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,tblDraft.DraftNumber" arrayStr = "Player,FantasyTeam,MLBTeam,POS,DraftNumber" 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)) DraftNumber = trim(colArray(4,x)) if isnumeric(DraftNumber) then DraftNumber = cint(DraftNumber) if DraftNumber > 0 then myColor = "red" else myColor = "blue" end if Position = right(Position,len(Position)-1) tst = posTest(Player)'put in alphas, column change rw "" & Player & " (" & Position & " - " & MLBTeam & ") [" & FantasyTeam & "]
" next end if %>
DRAFT DAY 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 %>