Count Lines in Pages

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