Count Lines in Pages

Contents of Page: BracketsResultsUpdate_m.asp Number of Lines: 1062 Last Modified: 3/22/2026 3:21:27 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: <!-- #include FILE="include/funcs.asp" -->
0006: <!-- #include FILE="include/ReturnPageSet.inc" -->
0007: <%
0008: '
0009: ' Remove Old Results
0010: '
0011: Region = Request.Querystring("Region")
0012: If Region = "" Then
0013: Region = "A"
0014: End If
0015: 
0016: Region = UCase(Region)
0017: 
0018: If Region = "A" or Region = "B" or  Region = "C" or Region = "D" then
0019: Side = "L"
0020: Else
0021: Side = "R"
0022: End If
0023: 
0024: Yr = Request.Querystring("Year")
0025: If Yr <> "" Then
0026: season = Yr
0027: End If
0028: 
0029: Width = Request.Querystring("Width")
0030: If Width = "" Then Width = 1100
0031: 
0032: RoundWidth = Cint(Width - 75)
0033: 
0034: '=============================================================
0035: 
0036: 	Set rs = Server.CreateObject("ADODB.Recordset")
0037: 		sqlString = "SELECT * FROM mmConfig WHERE Element = 'SCORESUPDATED'" 
0038: 		rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0039: 		
0040: 		LastScoreUpdated = rs("Value").Value
0041: 		rs.Close
0042: 		Set rs = Nothing
0043: 
0044: 
0045: '==============================================================
0046: 
0047: Dim Regions(5)
0048: 
0049: Set rs = Server.CreateObject("ADODB.Recordset")
0050: 	sqlString = "SELECT * FROM mmRegionals WHERE Season = " & Season & " ORDER BY Region"
0051: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0052: 	
0053: 	R = 1
0054: 	DO Until rs.EOF
0055: 	Regions(R) = rs("RegionName").Value
0056: 	R = R + 1
0057: 	rs.MoveNext
0058: 	Loop
0059: 	
0060: 	
0061: '--------------------------------------------------------------	
0062: If Region = "A" Then
0063: MyRegionName = Regions(1)
0064: ElseIf Region = "B" Then
0065: MyRegionName = Regions(2) 
0066: ElseIf Region = "C" Then
0067: MyRegionName = Regions(3) 
0068: Else
0069: MyRegionName = Regions(4) 				
0070: End If
0071: 
0072: 
0073: DaysDiff = Day(Now()) - XSelSunday
0074: 		
0075: %>		
0076: 
0077: <html>
0078: 
0079: <head>
0080: <meta name="viewport" content="width=device-width">
0081: <title>March Madness - Show Scores in Brackets Format</title>
0082: <link href="mm.css" rel="stylesheet" type="text/css">
0083: <link href="https://mychinodes.org/desb.css" rel="stylesheet" type="text/css">	
0084: 
0085: </head>
0086: </head>
0087: 
0088: <body bgcolor="#ffffff">
0089: 
0090: 
0091:   <tr>
0092: <td class="norm">
0093: 
0094: 
0095: <table id="top" align="center" cellspacing="2" border="1" cellpadding="0" width="<%= Width %>">
0096: 			<tr height="30">
0097: <td align="center" width="50%">
0098: <a href="displaymenugen.asp?parent=40&title=March%20Madness%20-%20Scores%20/%20Standings%20Update" class="button-40">Update Menu</a></td>
0099: 			
0100: 
0101: <TD align="center" width="50%"><a href="BracketsResultsUpdate_m.asp?Region=F4&Width=<%= Width %>" class="button-40">Final Four</a>		
0102: 			</td></tr>
0103: <tr height="35" Valign="center">
0104: <td class="norm" width="60%" align="center" colspan="4"><big>
0105: <a href="BracketsResultsUpdate_m.asp?Region=A&Width=<%= Width %>"class="button-40"><%= Regions(1) %></a>&nbsp;&nbsp;
0106: <a href="BracketsResultsUpdate_m.asp?Region=B&Width=<%= Width %>" class="button-40"><%= Regions(2) %></a>&nbsp;&nbsp;
0107: <a href="BracketsResultsUpdate_m.asp?Region=C&Width=<%= Width %>" class="button-40"><%= Regions(3) %></a>&nbsp;&nbsp;
0108: <a href="BracketsResultsUpdate_m.asp?Region=D&Width=<%= Width %>" class="button-40"><%= Regions(4) %></a>&nbsp;&nbsp;
0109: 
0110: </td></tr>
0111: <tr>
0112: <td  colspan="4" align="center" class="norm">
0113: <SMALL>Last Score Updated: <B><br><big> <%= LastScoreUpdated %>
0114: </td>
0115: 	
0116: </tr>
0117: </table>
0118: <% iF Region <> "F4" Then %>
0119: 
0120: <table align="center" cellspacing="2" border="1" cellpadding="0" width="<%= Width %>">
0121: 
0122: <tr>
0123: <td>
0124: <% 	
0125: 
0126: If Side = "L" Then		
0127: 
0128: FirstRound()
0129: 
0130: %>
0131: </td>
0132: </tr>
0133: <tr>
0134: <td valign="center">
0135: 
0136: 
0137: <table id="2nd-round" align="center" cellspacing="1" border="0" cellpadding="0" width="<%= Width %>" bgcolor="#D8D8D8">
0138: <tr height="40">
0139: <td align="center" class="norm" width="49%" >
0140: <big><big><b><font color="blue"><%= MyRegionName %></font></big> - 2nd Round
0141: </td>
0142: <td align="center" class="norm" width="17%" ><a href="#1st-round" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">1st</a></td>
0143: <td align="center" class="norm" width="17%" ><a href="#sweet-16" class="button-10" style="text-decoration:none; width:28;height:20;"><b><font color="white">S16</a></td>
0144: <td align="center" class="norm" width="17%" ><a href="#top" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">top</a></td>
0145: 
0146: </tr>
0147: </table>
0148: <table  align="center" cellspacing="1" border="0" cellpadding="0" width="<%= RoundWidth %>">
0149: <tr height="1">
0150: <td class="norm" width="5%"></td>
0151: <td class="norm" width="2%"></td>
0152: <td class="norm" width="48%"></td>
0153: <td class="norm" width="10%"></td>
0154: <td class="norm" width="35%"></td>
0155: </tr>
0156: 
0157: 
0158: <% 
0159: ' SecondRound()
0160: 
0161: Pass = "1-4-2"
0162: 
0163: DisplayRoundGame(pass)
0164: 
0165: Pass = "5-8-2"
0166: 
0167: DisplayRoundGame(pass)
0168: 
0169: Pass = "9-12-2"
0170: 
0171: DisplayRoundGame(pass)
0172: 
0173: Pass = "13-16-2"
0174: 
0175: DisplayRoundGame(pass)
0176: %>
0177: </table>
0178: </td>
0179: </tr>
0180: <tr>
0181: 
0182: <td valign="center">
0183: <table id="sweet-16" align="center" cellspacing="1" border="0" cellpadding="0" width="<%= Width %>" bgcolor="#D8D8D8">
0184: <tr height="40">
0185: <td align="center" class="norm" width="52%" >
0186: <big><big><b><font color="blue"><%= MyRegionName %></font></big> - Sweet 16
0187: </td>
0188: <td align="center" class="norm" width="16%" ><a href="#2nd-round" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">2nd</a></td>
0189: <td align="center" class="norm" width="16%" ><a href="#elite-8" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">E 8</a></td>
0190: <td align="center" class="norm" width="16%" ><a href="#top" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white"><small>Top</a></td>
0191: 
0192: </tr>
0193: </table>
0194: 
0195: <table align="center" cellspacing="0" border="0" cellpadding="0" width="<%= RoundWidth %>">
0196: 
0197: <tr height="1">
0198: <td class="norm" width="5%"></td>
0199: <td class="norm" width="2%"></td>
0200: <td class="norm" width="48%"></td>
0201: <td class="norm" width="10%"></td>
0202: <td class="norm" width="35%"></td>
0203: </tr>
0204: 
0205: <% 
0206: ' Sweet 16
0207: 
0208: Pass = "1-8-3"
0209: 
0210: DisplayRoundGame(pass)
0211: 
0212: Pass = "9-16-3"
0213: 
0214: DisplayRoundGame(pass)
0215: 
0216: 
0217: 
0218: %>
0219: </table>
0220: </td>
0221: </tr>
0222: <tr>
0223: <td valign="center">
0224: <table id="elite-8" align="center" cellspacing="1" border="0" cellpadding="0" width="<%= Width %>" bgcolor="#D8D8D8">
0225: <tr height="40">
0226: <td align="center" class="norm" width="49%" >
0227: <big><big><b><font color="blue"><%= MyRegionName %></font></big> - Elite 8
0228: </td>
0229: <td align="center" class="norm" width="17%" ><a href="#2nd-round" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">2nd</a></td>
0230: <td align="center" class="norm" width="17%" ><a href="#sweet-16" class="button-10" style="text-decoration:none; width:28;height:20;"><b><font color="white">S16</a></td>
0231: <td align="center" class="norm" width="17%" ><a href="#top" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">Top</a></td>
0232: 
0233: </tr>
0234: </table>
0235: <table align="center" cellspacing="0" border="0" cellpadding="0" width="<%= RoundWidth %>">
0236: <tr>
0237: 
0238: </tr>
0239: <tr height="1">
0240: <td class="norm" width="5%"></td>
0241: <td class="norm" width="2%"></td>
0242: <td class="norm" width="48%"></td>
0243: <td class="norm" width="10%"></td>
0244: <td class="norm" width="35%"></td>
0245: </tr>
0246: 
0247: <% 
0248: 'Sweet16()
0249: %>
0250: 
0251: 
0252: <% 
0253:  Elite8()
0254: %>
0255: 
0256: </td>
0257: </tr>
0258: <tr height="35" Valign="center">
0259: <td class="norm" width="60%" align="center" colspan="4"><big>
0260: <a href="BracketsResultsUpdate_m.asp?Region=A&Width=<%= Width %>" class="button-40"><%= Regions(1) %></a>&nbsp;&nbsp;&nbsp;
0261: <a href="BracketsResultsUpdate_m.asp?Region=B&Width=<%= Width %>" class="button-40"><%= Regions(2) %></a>&nbsp;&nbsp;&nbsp;
0262: <a href="BracketsResultsUpdate_m.asp?Region=C&Width=<%= Width %>" class="button-40"><%= Regions(3) %></a>&nbsp;&nbsp;&nbsp;
0263: <a href="BracketsResultsUpdate_m.asp?Region=D&Width=<%= Width %>" class="button-40"><%= Regions(4) %></a>&nbsp;&nbsp;&nbsp
0264: 
0265: 
0266: </td></tr>
0267: </table>
0268: <table align="center" cellspacing="2" border="1" cellpadding="0" width="<%= Width %>">
0269: 			<tr height="30">
0270: <td align="center" width="50%">
0271: <a href="displaymenugen.asp?parent=40&title=March%20Madness%20-%20Scores%20/%20Standings%20Update" class="button-40">Update Menu</a></td>
0272: 			
0273: 
0274: <TD align="center" width="50%"><a href="BracketsResultsUpdate_m.asp?Region=F4&Width=<%= Width %>" class="button-40">Final Four</a>		
0275: 			</td></tr>	
0276: </table>
0277: 
0278: 
0279: <% Else 
0280: 
0281: 
0282: Elite8()
0283: 
0284: %>
0285: </td>
0286: 
0287: <td valign="center">
0288: 
0289: 
0290: <table cellspacing="0" border="0" cellpadding="0" width="<%= RoundWidth %>">
0291: 
0292: <tr height="1">
0293: <td class="norm" width="5%"></td>
0294: <td class="norm" width="2%"></td>
0295: <td class="norm" width="48%"></td>
0296: <td class="norm" width="10%"></td>
0297: <td class="norm" width="35%"></td>
0298: </tr>
0299: 
0300: <% 
0301: ' Sweet16()
0302: 
0303: Pass = "1-8-3"
0304: 
0305: DisplayRoundGame(pass)
0306: 
0307: Pass = "9-16-3"
0308: 
0309: DisplayRoundGame(pass)
0310: 
0311: 
0312: 
0313: 
0314: %>
0315: </table>
0316: </td>
0317: <td valign="center">
0318: 
0319: 
0320: <table cellspacing="0" border="0" cellpadding="0" width="<%= RoundWidth %>">
0321: 
0322: <tr height="1">
0323: <td class="norm" width="5%"></td>
0324: <td class="norm" width="2%"></td>
0325: <td class="norm" width="48%"></td>
0326: <td class="norm" width="10%"></td>
0327: <td class="norm" width="35%"></td>
0328: </tr>
0329: 
0330: <% 
0331: Pass = "1-4-2"
0332: 
0333: DisplayRoundGame(pass)
0334: 
0335: Pass = "5-8-2"
0336: 
0337: DisplayRoundGame(pass)
0338: 
0339: Pass = "9-12-2"
0340: 
0341: DisplayRoundGame(pass)
0342: 
0343: Pass = "13-16-2"
0344: 
0345: DisplayRoundGame(pass)
0346: %>
0347: </table>
0348: </td>
0349: <td>
0350: 
0351: <% 
0352: FirstRound()
0353: %>
0354: 
0355: </td>
0356: </tr>	
0357: </table>
0358: 
0359: 
0360: 
0361: 
0362: <% End If
0363: 
0364: 
0365: 
0366: Function FirstRound()
0367: 
0368: %>
0369: 
0370: 
0371: <table id="1st-round" align="center" cellspacing="1" border="0" cellpadding="0" width="<%= Width %>" bgcolor="#D8D8D8">
0372: <tr height="40">
0373: <td align="center" class="norm" width="49%" >
0374: <big><big><b><font color="blue"><%= MyRegionName %></font></big> - 1st Round
0375: </td>
0376: <td align="center" class="norm" width="17%" ><a href="#2nd-round" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">2nd</a></td>
0377: <td align="center" class="norm" width="17%" ><a href="#sweet-16" class="button-10" style="text-decoration:none; width:28;height:20;"><b><font color="white">S16</a></td>
0378: <td align="center" class="norm" width="17%" ><a href="#elite-8" class="button-10" style="text-decoration:none; width:25;height:20;"><b><font color="white">E 8</a></td>
0379: 
0380: </tr>
0381: </table>
0382: <table  align="center" cellspacing="1" border="0" cellpadding="0" width="<%= RoundWidth %>" bordercolor="#FED87B">
0383: <tr>
0384: 
0385: 
0386: <td class="norm" width="5%"></td>
0387: <td class="norm" width="2%"></td>
0388: <td class="norm" width="48%"></td>
0389: <td class="norm" width="10%"></td>
0390: <td class="norm" width="35%"></td>
0391: 
0392: 
0393: </tr>
0394: <tr height="1"><td></td></tr>
0395: 
0396: <%  
0397: 
0398: 				Set rsr = Server.CreateObject("ADODB.Recordset")
0399: 
0400:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0401: 				             "AND Region = '" & Region & "' " & _
0402: 							 "ORDER BY Display_Order"
0403: 							 
0404: 							 
0405: 				
0406: 	'			Response.Write("<BR>" & sqlString)						
0407: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0408: 				
0409: Kount = 0				
0410: 
0411: Do Until rsr.EOF
0412: 
0413: Kount = Kount + 1
0414: 				ID = Rsr("ID").Value
0415: 
0416: 				TeamName = rsr("Name").Value
0417: 
0418: 				F64Score = rsr("F64Score").Value
0419: 				F32pts = rsr("F32pts").Value
0420: 
0421: 				
0422: '				Response.Write(TeamName & "-" & F64Score & "<br>")
0423: 
0424: Seed = Right(ID,2)+0
0425: 
0426: If F32pts <> 99 and F64Score <> 0 Then
0427: 	Boldit = "<b>"
0428: 	bgcolor = "#80ffbf"
0429: Else
0430: 	Boldit = ""
0431: 	bgcolor = ""
0432: End If
0433: 
0434: %>
0435: 		
0436: 	
0437: 				
0438: <tr height="30">
0439: 
0440: <td class="norm" align="right" height="20"><%= Seed %></td>
0441: <td></td>
0442: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><big><%= TeamName %></td>
0443: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><big><%= Boldit %><%= F64Score %></td>
0444: 
0445: 
0446: 				<%
0447: 				
0448: 		If Kount = 2 Then
0449: 			Kount = 0
0450: 			team2 = ID
0451: 			Args = "?team1=" & team1 &  "&team2=" & team2 & "&round=1"
0452: 			args = args & "&score1=" & score1 & "&score2=" & F64Score
0453: %>
0454: <td class="norm" align="center"><a href="BracketScorePostNew.asp<%= Args %>" class="button-40"><small>Post</a></td>
0455: 
0456: </tr>			
0457: 
0458: 
0459: 						<tr height="3"><td colspan="4" bgcolor="#ff4dff"><spacer type="block"></td></tr>
0460: <% Else
0461: 
0462: team1 = ID
0463: score1 = F64Score
0464: 
0465:  End If
0466: 				rsr.MoveNext
0467: 				Loop
0468: %>				
0469: </table>
0470: 
0471: <%
0472: End Function
0473: 
0474: %>
0475: 
0476: 
0477: 
0478: 
0479: 
0480: <% 
0481: 
0482: 
0483: 
0484: 
0485:  
0486:  
0487: Function DisplayRoundGame(pass) 
0488: 
0489: Args = ""
0490: 
0491: ' Response.Write("<br>Pass=" & Pass)
0492: 
0493: Args = Split(pass,"-")
0494: 
0495: StartNo = Args(0)
0496: EndNo = Args(1)
0497: RoundNo = Args(2)
0498: 
0499: TotalRange = ( EndNo - StartNo ) + 1
0500: 
0501: Games = ( TotalRange ) / 2
0502: 
0503: Team1StartNo = StartNo
0504: Team1EndNo = Team1StartNo + ( Games - 1 )
0505: Team2StartNo = EndNo - ( Games - 1 )
0506: Team2EndNo = EndNo
0507: 
0508: 
0509: 
0510: Select Case RoundNo
0511: 
0512: Case 2
0513: PtsField = "F32Pts"
0514: ResultPtsField = "F16Pts"
0515: PastScoreField = "F64Score"
0516: ScoreField = "F32Score"
0517: Case 3
0518: PtsField = "F16pts"
0519: ResultPtsField = "F8Pts"
0520: PastScoreField = "F32Score"
0521: ScoreField = "F16Score"
0522: Case 4
0523: PtsField = "F8pts"
0524: PastScoreField = "F16Score"
0525: ScoreField = "F8Score"
0526: End Select
0527: 
0528: 
0529: %>
0530: 
0531: <tr height="15">
0532: 
0533: 
0534: <%
0535: 
0536: 				Set rsr = Server.CreateObject("ADODB.Recordset")
0537: 
0538:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0539: 				             "AND Region = '" & Region & "' " & _
0540: 							 "AND " & PtsField & " <> 99 " & _
0541: 							 "AND " & PastScoreField & " <> 0 " & _
0542: 							 "AND Display_Order >= " & Team1StartNo & " " & _
0543: 							 "AND Display_Order <= " & Team1EndNo & " " & _
0544: 							 "ORDER BY Display_Order"
0545: 						 
0546: 							 
0547: 				
0548: 				'Response.Write("<BR>" & sqlString)						
0549: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0550: 
0551: Kount = 0				
0552: 
0553: If rsr.EOF Then
0554: 
0555: T1ID = ""
0556: T1Score = 0
0557: T1Pts = 0
0558: T1TeamName = ""
0559: T1Seed = ""
0560: 
0561: Else
0562: 
0563: Kount = Kount + 1
0564: 
0565: 				T1ID = Rsr("ID").Value
0566: 				T1Score = rsr(ScoreField).Value
0567: 				T1pts = rsr(ResultPtsField).Value				
0568: 				T1TeamName = rsr("Name").Value
0569: 
0570: Seed = Right(T1ID,2)+0
0571: 
0572: If T1pts <> 99  Then
0573: Boldit = "<b>"
0574: bgcolor = "#80ffbf"
0575: Else
0576: Boldit = ""
0577: bgcolor = ""
0578: End If
0579: 
0580: End If
0581: 
0582: 				
0583: 				%>
0584: 				
0585: <tr height="30">
0586: <td class="norm" align="right" height="20"><big><%= Seed %></td>
0587: <td></td>
0588: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><big><%= T1TeamName %></td>
0589: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><big><%= Boldit %><%= T1Score %></td>
0590: 
0591: 
0592: <%				Set rsr = Server.CreateObject("ADODB.Recordset")
0593: 
0594:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0595: 				             "AND Region = '" & Region & "' " & _
0596: 							 "AND " & PtsField & " <> 99 " & _
0597: 							 "AND " & PastScoreField & " <> 0 " & _
0598: 							 "AND Display_Order >= " & Team2StartNo & " " & _
0599: 							 "AND Display_Order <= " & Team2EndNo & " " & _
0600: 							 "ORDER BY Display_Order"
0601: 						 
0602: 							 
0603: 				
0604: 				'Response.Write("<BR>" & sqlString)						
0605: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0606: 
0607: Kount = 0				
0608: 
0609: 
0610: If rsr.EOF Then
0611: 
0612: T2ID = ""
0613: T2Score = 0
0614: T2Pts = 0
0615: T2TeamName = ""
0616: T2Seed = ""
0617: 
0618: Else
0619: 
0620: Kount = Kount + 1
0621: 
0622: 				T2ID = Rsr("ID").Value
0623: 				T2Score = rsr(ScoreField).Value
0624: 				T2pts = rsr(ResultPtsField).Value				
0625: 				T2TeamName = rsr("Name").Value
0626: 
0627: Seed = Right(T2ID,2)+0
0628: 
0629: If T2pts <> 99  Then
0630: Boldit = "<b>"
0631: bgcolor = "#80ffbf"
0632: Else
0633: Boldit = ""
0634: bgcolor = ""
0635: End If
0636: 
0637: End If
0638: 
0639: 				
0640: 				%>
0641: 				
0642: <tr height="30">
0643: <td class="norm" align="right" height="20"><big><%= Seed %></td>
0644: <td></td>
0645: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><big><%= T2TeamName %></td>
0646: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><big><%= Boldit %><%= T2Score %></td>
0647: 
0648: 	
0649: 
0650: <%
0651: 				
0652: 		If T1ID <> "" And T2ID <> "" Then
0653: 			Kount = 0
0654: 			team2 = ID
0655: 			Args = "?team1=" & T1ID &  "&team2=" & T2ID & "&round=" & RoundNo
0656: 			args = args & "&score1=" & T1Score & "&score2=" & T2Score
0657: %>
0658: <td class="norm" align="center"><a href="BracketScorePostNew.asp<%= Args %>" class="button-40"><small>Post</a></td>
0659: </tr>
0660: 						<tr height="3"><td colspan="4" bgcolor="#ff4dff"><spacer type="block"></td></tr>
0661: 
0662: <% 
0663: 
0664: Else
0665: 
0666: team1 = ID
0667: score1 = F32Score
0668: 
0669: End If
0670: 
0671: %>				
0672: 
0673: </TD>
0674: </TR>
0675: 
0676: <%
0677: End Function
0678: 
0679: Function Sweet16()
0680: 
0681: %>
0682: 
0683: <table  cellspacing="0" border="0" cellpadding="0" width="<%= RoundWidth %>">
0684: 
0685: 
0686: <tr>
0687: <td class="norm" width="5%"></td>
0688: <td class="norm" width="2%"></td>
0689: <td class="norm" width="48%"></td>
0690: <td class="norm" width="10%"></td>
0691: <td class="norm" width="35%"></td>
0692: </tr>
0693: 
0694: <%  
0695: 
0696: 				Set rsr = Server.CreateObject("ADODB.Recordset")
0697: 
0698:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0699: 				             "AND Region = '" & Region & "' " & _
0700: 							 "AND F16Pts <> 99 " & _
0701: 							 "AND F32Score <> 0 " & _
0702: 							 "ORDER BY Display_Order"
0703: 							 
0704: 							 
0705: 				
0706: 	'			Response.Write("<BR>" & sqlString)						
0707: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0708: 
0709: Kount = 0				
0710: 
0711: Do Until rsr.EOF
0712: 
0713: Kount = Kount + 1
0714: 
0715: 				ID = Rsr("ID").Value
0716: 				F16Score = rsr("F16Score").Value
0717: 				F8pts = rsr("F8pts").Value				
0718: 				TeamName = rsr("Name").Value
0719: 
0720: Seed = Right(ID,2)+0
0721: 
0722: If F8pts <> 99  Then
0723: Boldit = "<b>"
0724: bgcolor = "#80ffbf"
0725: Else
0726: Boldit = ""
0727: bgcolor = ""
0728: End If
0729: 
0730: 				
0731: 				%>
0732: 				
0733: <tr>
0734: <td class="norm" align="right" height="20"><small><%= Seed %></td>
0735: <td></td>
0736: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><%= TeamName %></td>
0737: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><%= Boldit %><%= F16Score %></td>
0738: 
0739: 
0740: 				<%
0741: 				
0742: 		If Kount = 2 Then
0743: 			Kount = 0
0744: 			team2 = ID
0745: 			Args = "?team1=" & team1 &  "&team2=" & team2 & "&round=3"
0746: 			args = args & "&score1=" & score1 & "&score2=" & F16Score
0747: %>
0748: <td class="norm" align="center"><a href="BracketScorePostNew.asp<%= Args %>" class="button-40"><small><small>Post</a></td>
0749: </tr>
0750: 						<tr height="3"><td colspan="4" bgcolor="#ff4dff"><spacer type="block"></td></tr>
0751: 
0752: <% 
0753: 
0754: Else
0755: 
0756: team1 = ID
0757: score1 = F16Score
0758: 
0759: End If
0760: 				rsr.MoveNext
0761: 				Loop
0762: %>				
0763: 
0764: </TD>
0765: </TR>
0766: </table>
0767: 
0768: <%
0769: 
0770: End Function
0771: 
0772: Function Elite8()
0773: %>
0774: 
0775: 
0776: <table id="elite-8" align="center" cellspacing="0" border="0" cellpadding="0" width="<%= RoundWidth %>">
0777: 
0778: <tr>
0779: <td class="norm" width="5%"></td>
0780: <td class="norm" width="2%"></td>
0781: <td class="norm" width="48%"></td>
0782: <td class="norm" width="10%"></td>
0783: <td class="norm" width="35%"></td>
0784: </tr>
0785: 
0786: <%  
0787: 
0788: 				Set rsr = Server.CreateObject("ADODB.Recordset")
0789: 
0790:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0791: 				             "AND Region = '" & Region & "' " & _
0792: 							 "AND F8Pts <> 99 " & _
0793: 							 "AND F16Score <> 0 " & _							 
0794: 							 "ORDER BY Display_Order"
0795: 							 
0796: 							 
0797: 				
0798: '			Response.Write("<BR>" & sqlString)						
0799: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0800: 
0801: Do Until rsr.EOF
0802: 
0803: Kount = Kount + 1
0804: 
0805: 				ID = Rsr("ID").Value
0806: 
0807: 				TeamName = rsr("Name").Value
0808: 				F4pts = rsr("F4pts").Value	
0809: 
0810: 				F8Score = rsr("F8Score").Value
0811: 
0812: 				
0813: 				'Response.Write(TeamName & "-" & F64Score & "<br>")
0814: 
0815: Seed = Right(ID,2)+0
0816: 
0817: Seed = Right(ID,2)+0
0818: 
0819: If F4pts <> 99 Then
0820: Boldit = "<b>"
0821: bgcolor = "#80ffbf"
0822: Else
0823: Boldit = ""
0824: bgcolor = ""
0825: End If
0826: 				
0827: 				%>
0828: 				
0829: <tr height="30">
0830: <td class="norm" align="right" height="20"><big><%= Seed %></td>
0831: <td></td>
0832: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><big><%= TeamName %></td>
0833: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><big><%= Boldit %><%= F8Score %></td>
0834: 
0835: 
0836: <% If Kount = 2  then
0837: 
0838: 			Kount = 0
0839: 			team2 = ID
0840: 			Args = "?team1=" & team1 &  "&team2=" & team2 & "&round=4"
0841: 			args = args & "&score1=" & score1 & "&score2=" & F8Score
0842: %>
0843: <td class="norm" align="center"><a href="BracketScorePostNew.asp<%= Args %>" class="button-40"><small>Post</a></td>
0844: </tr>	
0845: 						<tr height="3"><td colspan="4" bgcolor="#ff4dff"><spacer type="block"></td></tr>
0846: 
0847: 
0848: <%
0849: 
0850: Else
0851: 
0852: team1 = ID
0853: score1 = F8Score
0854: 
0855: End If
0856: 				rsr.MoveNext
0857: 				Loop
0858: %>				
0859: 
0860: 
0861: 
0862: </TD>
0863: </TR>
0864: 
0865: </table>
0866: 
0867: <%
0868: 
0869: End Function
0870: 
0871: %>
0872: 
0873: <% Else ' F4 %>
0874: <table cellspacing="2" border="0" cellpadding="0" width="<%= Width %>">
0875: <tr><td>
0876: <table cellspacing="0" border="1" cellpadding="0" width="250" align="center">
0877: <tr><td>
0878: <table cellspacing="0" border="0" cellpadding="0" width="250" >
0879: <tr height="50" Valign="center">
0880: <td class="norm" align="center" colspan="6"><big><b>Final Four</td>
0881: </tr>
0882: <tr>
0883: <td class="norm" width="5%"></td>
0884: <td class="norm" width="2%"></td>
0885: <td class="norm" width="48%"></td>
0886: <td class="norm" width="10%"></td>
0887: <td class="norm" width="35%"></td>
0888: </tr>
0889: <tr>
0890: 
0891: <%
0892: 
0893: 				Set rsr = Server.CreateObject("ADODB.Recordset")
0894: 
0895:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0896: 				"AND F8Score <> 0 " & _
0897: 				             "AND F4Pts <> 99 " & _
0898: 							 "ORDER BY ID"
0899: 							 
0900: 							 
0901: 				
0902: 				'Response.Write("<BR>" & sqlString)						
0903: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0904: 
0905: Kount = 0
0906: 
0907: Do Until rsr.EOF
0908: 
0909: Kount = Kount + 1
0910: 
0911: 				ID = Rsr("ID").Value
0912: 
0913: 				TeamName = rsr("Name").Value
0914: 
0915: 				F2Pts = rsr("F2Pts").Value
0916: 
0917: 				F4Score = rsr("F4Score").Value
0918: 				
0919: Seed = Right(ID,2)+0
0920: 
0921: If F2pts <> 99  Then
0922: Boldit = "<b>"
0923: bgcolor = "#80ffbf"
0924: Else
0925: Boldit = ""
0926: bgcolor = ""
0927: End If
0928: 
0929: %>
0930: 
0931: <tr height="30">
0932: <td class="norm" align="right" height="20"><%= Seed %></td>
0933: <td></td>
0934: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><big><%= TeamName %></td>
0935: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><big><%= Boldit %><%= F4Score %></td>
0936: 
0937: 
0938: 
0939: 
0940: <% If Kount = 2  then
0941: 
0942: 			Kount = 0
0943: 			team2 = ID
0944: 			Args = "?team1=" & team1 &  "&team2=" & team2 & "&round=5"
0945: 			args = args & "&score1=" & score1 & "&score2=" & F4Score
0946: %>
0947: <td class="norm" align="center"><a href="BracketScorePostNew.asp<%= Args %>" class="button-40"><small>Post</a></td>
0948: </tr>	
0949: <tr height="20"><td></td><tr>
0950: 
0951: 
0952: <%
0953: 
0954: Else
0955: 
0956: team1 = ID
0957: score1 = F4Score
0958: 
0959: End If
0960: 
0961: 
0962: 
0963: 	rsr.MoveNext
0964: 				Loop
0965: 				
0966: 				
0967: %>
0968: </td></tr>
0969: 
0970: <table cellspacing="2" border="0" cellpadding="0" width="250" >
0971: <tr height="50" Valign="center">
0972: <td class="norm" align="center" colspan="6"><big><b>Championship Game</td>
0973: </tr>
0974: <tr>
0975: <td class="norm" width="5%"></td>
0976: <td class="norm" width="2%"></td>
0977: <td class="norm" width="48%"></td>
0978: <td class="norm" width="10%"></td>
0979: <td class="norm" width="35%"></td>
0980: </tr>		
0981: 
0982: <%
0983: 
0984: 				Set rsr = Server.CreateObject("ADODB.Recordset")
0985: 
0986:     			sqlString = "SELECT * FROM mmresults WHERE Season = " & Season & " " & _
0987: 				"AND F4Score <> 0 " & _
0988: 				             "AND F2Pts <> 99 " & _
0989: 													 
0990: 							 "ORDER BY ID"
0991: 							 
0992: 							 
0993: 				
0994: 		'\'		'Response.Write("<BR>" & sqlString)						
0995: 				rsr.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0996: 				
0997: 				Kount = 0
0998: 
0999: Do Until rsr.EOF
1000: 
1001: Kount = Kount + 1
1002: 
1003: 				ID = Rsr("ID").Value
1004: 
1005: 				TeamName = rsr("Name").Value
1006: 				F1Pts = rsr("F1Pts").Value
1007: 
1008: 				F2Score = rsr("F2Score").Value
1009: 				
1010: Seed = Right(ID,2)+0
1011: 
1012: If F1pts <> 99  Then
1013: Boldit = "<b>"
1014: bgcolor = "#80ffbf"
1015: Else
1016: Boldit = ""
1017: bgcolor = ""
1018: End If
1019: 
1020: %>
1021: 
1022: <tr height="30">
1023: 
1024: 
1025: <td class="norm" align="right" height="20"><%= Seed %></td>
1026: <td></td>
1027: <td class="norm" bgcolor="<%= bgcolor %>"><%= Boldit %><big><%= TeamName %></td>
1028: <td class="norm" align="right" bgcolor="<%= bgcolor %>"><big><%= Boldit %><%= F2Score %></td>
1029: 
1030: <% If Kount = 2  then
1031: 
1032: 			Kount = 0
1033: 			team2 = ID
1034: 			Args = "?team1=" & team1 &  "&team2=" & team2 & "&round=6"
1035: 			args = args & "&score1=" & score1 & "&score2=" & F2Score
1036: %>
1037: <td class="norm" align="center"><a href="BracketScorePostNew.asp<%= Args %>"class="button-40"><small><small>Post</a></td>
1038: </tr>	
1039: <tr height="20"><td></td><tr>
1040: 
1041: 
1042: <%
1043: 
1044: Else
1045: 
1046: team1 = ID
1047: score1 = F2Score
1048: 
1049: End If
1050: 
1051: 
1052: 
1053: 	rsr.MoveNext
1054: 				Loop
1055: 	
1056: 
1057: %>	
1058: 
1059: <%  End If %>
1060: 
1061: </tr>
1062: