Count Lines in Pages

Contents of Page: bracketscoreupdate.asp Number of Lines: 239 Last Modified: 2/5/2026 3:31:28 PM
0001: <% @Language = "VBScript" %>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: 
0006: <%
0007: 	team1 = Request.Form("team1")
0008: 	team2 = Request.Form("team2")
0009: 	teamName1 = Request.Form("teamName1")
0010: 	teamName2 = Request.Form("teamName2")	
0011: 
0012: 	score1 = Cint(Request.Form("score1"))
0013: 	score2 = Cint(Request.Form("score2"))
0014: 	ogscore1 = Cint(Request.Form("ogscore1"))
0015: 	ogscore2 = Cint(Request.Form("ogscore2"))	
0016: 	
0017: 
0018: 
0019: If score1 = 0 and score2 = 0 Then
0020: Reset = True
0021: Else
0022: Reset = False
0023: End If
0024: 	
0025: 	KRound = Request.Form("Round")
0026: 	
0027: 	If KRound < 5 Then
0028: 	GRegion = Left(team1,1)
0029: 	Else
0030: 	GRegion = "F4"
0031: 	End If
0032: 	
0033: 
0034: 	
0035: 	Response.Write("<BR>Region=" & GRegion & "<br>Round=" & KRound & "<br>")
0036: 	
0037: 	If Score1 > Score2 Then
0038: 	Winner = team1
0039: 	Loser = team2
0040: 	WinnerScore = score1
0041: 	LoserScore = score2
0042: 	Else
0043: 	Winner = team2
0044: 	Loser = team1
0045: 	WinnerScore = score2
0046: 	LoserScore = score1
0047: 	End if
0048: 
0049: 
0050: 	Dim Rounds(6)
0051: 	Dim Scores(6)
0052: 	Dim Points(6)
0053: 	Rounds(1) = "F32Pts"
0054: 	Rounds(2) = "F16Pts"
0055:   	Rounds(3) = "F8Pts"
0056: 	Rounds(4) = "F4Pts"
0057: 	Rounds(5) = "F2Pts"
0058: 	Rounds(6) = "F1Pts"
0059: 	Scores(1) = "F64Score"
0060: 	Scores(2) = "F32Score"
0061: 	Scores(3) = "F16Score"
0062: 	Scores(4) = "F8Score"
0063: 	Scores(5) = "F4Score"
0064: 	Scores(6) = "F2Score"
0065: 	Points(1) = 1
0066: 	Points(2) = 2
0067: 	Points(3) = 4
0068: 	Points(4) = 8
0069: 	Points(5) = 16
0070: 	Points(6) = 32
0071: 	
0072: 	If Reset = True Then
0073: 	Points(Kround) = 0
0074: 	LoserPts = 0
0075: 	Else
0076: 	LoserPts = 99
0077: 	End If
0078: 	
0079: 	
0080: 		If score1 <> ogscore1 or score2 <> ogscore2 Then ' no update
0081: 	
0082: 	Set rs = Server.CreateObject("ADODB.Recordset")
0083: 	sqlString = "SELECT * FROM mmResults " & _
0084: 			"WHERE Season = " & season & " " & _
0085: 			"AND ID = '" & winner & "' " 
0086: 			Response.Write(sqlString)
0087: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText	
0088: 	
0089: 	ID = rs("ID").Value
0090: 	
0091: 	Response.Write("<br>Team1=" & Team1 & Scores(KRound) & "=" & score1)
0092: 	
0093: 		Response.Write("<br>Team2=" & Team2 & Scores(KRound) & "=" & score2)
0094: 	
0095: 	Response.Write("<BR>Winner=" & Winner)
0096: 	
0097: 	
0098: 	Response.Write("<br>" & Rounds(KRound) & "=" & Points(KRound))
0099: 	
0100: 	rs(Scores(KRound)).Value = Cint(WinnerScore)
0101: 	rs(Rounds(KRound)).Value = Points(KRound)
0102: 	
0103: 	If KRound < 6 then 
0104: 	RestOf = KRound + 1
0105: 	
0106: 	For Intr = RestOf to 6
0107: 		rs(Rounds(Intr)).Value = 0
0108: 		rs(Scores(Intr)).Value = 0
0109: 		Response.Write("<br>" & Rounds(Intr) & "=0")
0110: 		
0111: 'Intr = Intr + 1	
0112: 	Next
0113: 	
0114: 	End If
0115: 			rs.Update
0116: 			
0117: 	
0118: 			
0119: 			
0120: Set rs = Server.CreateObject("ADODB.Recordset")
0121: 	sqlString = "SELECT * FROM mmResults " & _
0122: 			"WHERE Season = " & season & " " & _
0123: 			"AND ID = '" & loser & "' " 
0124: 			Response.Write(sqlString)
0125: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText	
0126: 	
0127: 		ID = rs("ID").Value
0128: 	
0129: '	Response.Write("<br>Team1=" & Team1 & Scores(KRound) & "=" & score1)
0130: 	
0131: '		Response.Write("<br>Team2=" & Team2 & Scores(KRound) & "=" & score2)
0132: 	
0133: '	Response.Write("<BR>Winner=" & Winner)
0134: 	
0135: 	
0136: 	Response.Write("<br>" & Rounds(KRound) & "=" & Points(KRound))
0137: 	
0138: 	rs(Scores(KRound)).Value = Cint(LoserScore)
0139: 	rs(Rounds(KRound)).Value = LoserPts
0140: 	
0141: 	If KRound < 6 then 
0142: 	RestOf = KRound + 1
0143: 	
0144: 	For Intr = RestOf to 6
0145: 		rs(Rounds(Intr)).Value = LoserPts
0146: 		rs(Scores(Intr)).Value = 0		
0147: 		Response.Write("<br>" & Rounds(Intr) & "=0")
0148: 		
0149: 'Intr = Intr + 1	
0150: 	Next
0151: 	
0152: 	End If
0153: 			rs.Update	
0154: 
0155: 		
0156: 	
0157: 		
0158: 	Response.Write("<BR>Loser=" & Loser)
0159: 	
0160: 	Response.Write("<br>" & Rounds(KRound) & "=" & LoserPts)
0161: 	
0162: 	If KRound < 6 then 
0163: 	RestOf = KRound + 1
0164: 	
0165: 	For Intr = RestOf to 6
0166: 	
0167: 		Response.Write("<br>" & Rounds(Intr) & "=" & LoserPts)
0168: 	'    Intr = Intr + 1	
0169: 	Next
0170: 	
0171: 	End If
0172: 	
0173: 	
0174: 
0175: 
0176: 	' TeamName = Request.Form("Name")
0177: 
0178: 		' Do Until rs.EOF
0179: 		' LastValue = 0
0180: 		' For IntR = 0 to 5
0181: 		' temp = Trim(Request.Form(Rounds(IntR)))
0182: 		' If LastValue = "99" Then
0183: 		' temp = "99"
0184: 		' End If
0185: 		' rs(Rounds(IntR)).Value = temp
0186: 		' LastValue = Temp
0187: 		' RoundScore = Trim(Request.Form(Scores(IntR)))
0188: 		' If RoundScore = "" Then
0189: 		   ' RoundScore = 0
0190: 		' End If
0191: 		' rs(Scores(IntR)).Value = RoundScore
0192: 		' Next
0193: 		' RoundScore = Trim(Request.Form(Scores(6)))
0194: 		' If RoundScore = "" Then
0195: 		   ' RoundScore = 0
0196: 		' End If
0197: 		' rs(Scores(6)).Value = RoundScore
0198: ' '		rs.Update
0199: 
0200:     	' rs.MoveNext
0201: 		' Loop
0202: 				' rs.Close
0203: 		' Set rs = Nothing
0204: 
0205: 
0206: 		' Set rs = Server.CreateObject("ADODB.Recordset")
0207: 		' sqlString = "SELECT * FROM mmConfig WHERE Element = 'SCORESUPDATED'" 
0208: 		' rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0209: 
0210: 		' rs("Value").Value = Now() & "</font>  (" & TeamName & ")"
0211: ' '		rs.update	BracketsResultsUpdate.asp
0212: 		' rs.Close
0213: 		' Set rs = Nothing
0214: 		' Response.Redirect("viewResultsTable.asp?ShowAll=" & ShowAll & "&Region=" & Region)	
0215: 	
0216: 	End If ' No update
0217: 	
0218: 			rs.Close
0219: 		Set rs = Nothing
0220: 	
0221: 	
0222: 		Set rs = Server.CreateObject("ADODB.Recordset")
0223: 		sqlString = "SELECT * FROM mmConfig WHERE Element = 'SCORESUPDATED'" 
0224: 		rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0225: 		
0226: 		NowTime = DateAdd("h",-2,Now())
0227: 
0228:         response.write("<br>" & "(" & TeamName1 & "-" & TeamName2 & ") @ " & NowTime )
0229:      
0230: 		rs("Value").Value = "(" & TeamName1 & "-" & TeamName2 & ") @ " & NowTime 
0231: 		rs.update
0232: 		rs.Close
0233: 		Set rs = Nothing
0234: 	
0235: 		Response.Redirect("BracketsResultsUpdate.asp?Region=" & GRegion)
0236: 		
0237: 		%>
0238: 		<a href="BracketsResultsUpdate.asp?Region=<%= GRegion %>">Continue to BracketsResultsUpdate page</a>
0239: