Count Lines in Pages

Contents of Page: ScoresUpdate.asp Number of Lines: 231 Last Modified: 3/23/2025 1:51:56 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: 	user = Request.Cookies("user")
0010: 	If user <> "jt@folga.org" And user <> "skesic@bridgesolutions.com" And user <> "dwmconsulting@yahoo.com" Then
0011: 		Response.Redirect("login.asp?from=" & Server.URLEncode("admin/admin.htm"))
0012: 	End If
0013: 	ShowAll = Request.QueryString("ShowAll")
0014: 	Region = Request.QueryString("Region")
0015: 	If Region = "" Then
0016: 	SelCrit = " AND Region <> '' "
0017: 	Else
0018: 	SelCrit = " AND Region = '" & Region & "' "
0019: 		If Region = "A" Then
0020: 		ColReg = 1
0021: 		ElseIf Region = "B" Then
0022: 		ColReg = 2
0023: 		ElseIf Region = "C" Then
0024: 		ColReg = 3
0025: 		Else	
0026: 		ColReg = 4
0027: 		End If
0028: 	End If
0029: 	If ShowAll = "Y" Then
0030: 	SelCrit = SelCrit & " "
0031: 	Else
0032: 	SelCrit = SelCrit &  " AND F1pts <> 99 "
0033: 	End If
0034: 	Dim dataString
0035: 	Dim fieldList
0036: 	tablename = "mmResults"
0037: '	season = "2003"
0038: 	tableFound = False
0039: 	If EmailToEdit = "GetFromForm" Then
0040: 	End If
0041: 	If tablename = "" Then Response.Redirect("admin.htm")	
0042: 	Set fs = CreateObject("Scripting.FileSystemObject")
0043: 	Set f = fs.OpenTextFile(Server.MapPath("\") & "\mm\tables.txt", 1, 0)
0044: 	Do While f.AtEndOfStream <> True
0045: 		retString = f.ReadLine
0046: 		dataString = Split(retString, ";")
0047: 		If dataString(0) <> "" Then
0048: 			If dataString(0) = tablename Then
0049: 				fieldList = Split(dataString(2), ",")
0050: 				indexname = dataString(1)
0051: 				tableFound = True
0052: 				Exit Do
0053: 			End If
0054: 		End If
0055: 	Loop
0056: 	f.Close
0057: 	If Not tableFound Then Response.Redirect("admin.htm")
0058: 
0059: ' Get Region Names
0060: 
0061: Dim Regs(4,2)
0062: 	Set rs = Server.CreateObject("ADODB.Recordset")
0063: 	sqlString = "SELECT * FROM mmRegionals WHERE Season = " & season & _
0064: 	             " ORDER BY Region"
0065: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0066: 
0067: 		Do Until rs.EOF
0068: 
0069: 		Regs(rs("Region").Value,1) = rs("RegionName").Value
0070: 		If rs("Region").Value = 1 Then
0071: 		Regs(1,2) = "A"
0072: 		ElseIf rs("Region").Value = 2 Then
0073: 		Regs(2,2) = "B"
0074: 		ElseIf rs("Region").Value = 3 Then
0075: 		Regs(3,2) = "C"
0076: 		ElseIf rs("Region").Value = 4 Then
0077: 		Regs(4,2) = "D"
0078: 		End If
0079: 		rs.MoveNext
0080: 		Loop
0081: 		rs.Close
0082: 		Set rs = Nothing
0083: 		 
0084: 
0085: 	Set rs = Server.CreateObject("ADODB.Recordset")
0086: 	sqlString = "SELECT * FROM " & tablename & " WHERE Season = " & season & _
0087: 	             SelCrit & _
0088: 	             "ORDER BY Region, Display_Order"
0089: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0090:  CurrentTime = Now()		
0091: %>
0092: 
0093: <html>
0094: <head>
0095: <meta name="viewport" content="width=device-width">
0096: <title>March Madness - Update Game Scores</title>
0097: 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
0098: 	<link href="mm.css" rel="stylesheet" type="text/css">
0099: 	<script language="JavaScript" type="text/javascript">
0100: 		function editEntry(form,act)	{
0101: 			if (act == "Delete")	{
0102: 				if (!confirm("Are you sure you want to delete this record?"))	{
0103: 					return;
0104: 				}
0105: 			}
0106: 			form.action.value = act;
0107: 			form.submit();
0108: 		}
0109: 	</script>
0110: </head>
0111: 
0112: <body bgcolor="#ffffff">
0113: 
0114: 		<table border="0" cellpadding="0" cellspacing="0" width="570">
0115: 
0116: 			<tr><td class="norm">&nbsp;<a href="displaymenugen.asp?parent=40&title=March%20Madness%20-%20Scores / Standings Update"><b>Return to Menu</b></a><br><br>
0117: 			|&nbsp;&nbsp;<a href="ScoresUpdate.asp?Region=<%= Regs(1,2) %>"><b><big><%= Regs(1,1) %></big></b></a>
0118: 			&nbsp;&nbsp;(<a href="ScoresUpdate.asp?ShowAll=Y&Region=<%= Regs(1,2) %>">All</a>)&nbsp;&nbsp;
0119: 			|&nbsp;&nbsp;<a href="ScoresUpdate.asp?Region=<%= Regs(2,2) %>"><b><big><%= Regs(2,1) %></big></b></a>
0120: 			&nbsp;&nbsp;(<a href="ScoresUpdate.asp?ShowAll=Y&Region=<%= Regs(2,2) %>">All</a>)&nbsp;&nbsp;
0121: 			|&nbsp;&nbsp;<a href="ScoresUpdate.asp?Region=<%= Regs(3,2) %>"><b><big><%= Regs(3,1) %></big></b></a>
0122: 			&nbsp;&nbsp;(<a href="ScoresUpdate.asp?ShowAll=Y&Region=<%= Regs(3,2) %>">All</a>)&nbsp;&nbsp;
0123: 			|&nbsp;&nbsp;<a href="ScoresUpdate.asp?Region=<%= Regs(4,2) %>"><b><big><%= Regs(4,1) %></big></b></a>
0124: 			&nbsp;&nbsp;(<a href="ScoresUpdate.asp?ShowAll=Y&Region=<%= Regs(4,2) %>">All</a>)&nbsp;&nbsp;
0125: 			|&nbsp;&nbsp;<a href="ScoresUpdate.asp">All Still In</a>&nbsp;&nbsp;
0126: 
0127: 			|&nbsp;&nbsp;<a href="ScoresUpdate.asp?ShowAll=Y">All</a>
0128: 				  <br><br>Standings Updated @  <font color="red"><%= STANDINGSUPDATED %></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0129:                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last Score Updated @ <font color="red"><%= SCORESUPDATED %></font><br><br></font>
0130: 			</td></tr>
0131: 			<tr height="35">
0132: 				<td>
0133: 					<table border="0" cellpadding="1" cellspacing="4" width="100%">
0134: 					<tr>
0135: 						<tr>
0136: 						<td></td><td></td>
0137: 						<td class="normbold" align="center" width="100" bgcolor="##ffff66"><%= Regs(ColReg,1) %></td>
0138: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F64<br>Score</td>
0139: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F32<br>Points</td>						
0140: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F32<br>Score</td>
0141: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F16<br>Points</td>						
0142: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F16<br>Score</td>
0143: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F8<br>Points</td>						
0144: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F8<br>Score</td>
0145: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F4<br>Points</td>						4
0146: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F4<br>Score</td>
0147: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F2<br>Points</td>						
0148: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F2<br>Score</td>
0149: 						<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15">F1<br>Points</td>						
0150: 					</tr>
0151: 					</table>
0152: 					
0153: 										<table border="0" cellpadding="1" cellspacing="4" width="100%">
0154: 						<tr>
0155: 						<tr>
0156: 						<td></td><td></td>
0157: 			<%		For i = LBound(fieldList) To UBound(fieldList)	
0158: 			
0159: If fieldList(i) = "Name" Then %>
0160: 						<td class="normbold" align="center" width="100" bgcolor="##ffff66"><%= Regs(ColReg,1) %></td>
0161: <% Else	%>
0162: 							<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15"><%= fieldList(i) %></td>
0163: <% End If %>
0164: 			<%		Next	%>
0165: 							<td class="smalldark" align="center" width="75" bgcolor="#dddddd">Action</td>
0166: 						</tr>
0167: 				
0168: 			<%	Do Until rs.EOF	
0169: 			
0170: 		SeedNo = Right(rs(dataString(1)).Value,2) + 0
0171: 			
0172: 			%>
0173: 				<tr height="28">
0174: <td class="norm"><%= rs("ID").Value %></td>
0175: 					<form action="calconeteampoints.asp?yr=<% =season %>&team=<%= rs(dataString(1)).Value %>&ShowAll=<%= ShowAll %>&Region=<%= Region %>" method="post">
0176: 						<input type="hidden" name="<%= dataString(1) %>" value="<%= rs(dataString(1)).Value %>">
0177: 						<input type="hidden" name="action" value="">
0178: 						<td class="smalldark" align="right" width="25"><b><%= SeedNo %></b></td>
0179: 	>	
0180: 			<%		
0181: 			
0182: 			
0183: 			For i = LBound(fieldList) To UBound(fieldList)	
0184: Width = "30"			
0185: If fieldList(i) = "Name" Then
0186: 
0187: TeamName = rs(fieldList(i)).Value
0188: 
0189: Width = "100"
0190: End If			
0191: 			%>
0192: 							<td class="smallgreen" align="right">
0193: 								<input type="text" name="<%= fieldList(i) %>" value="<%= rs(fieldList(i)).Value %>" class="smallgreen" style="width:<%= Width %>px"></td>
0194: 			<%		Next	%>
0195: 							<td class="smalldark" align="right">
0196: 								<input type="button" value="<%= TeamName %>" onClick="javascript:editEntry(this.form,'Change')" class="norm" style="width:90px">
0197: 	</td>				
0198: </tr>
0199: 					</form>
0200: 					
0201: 					<tr>					
0202: 						<td class="norm" align="right"><%= rs("ID").Value %></td>
0203: 						<td class="norm" align="right">#<%= SeedNo %></td>
0204: 						<td class="smallgreen" width="25"><b><big><%= TeamName %></b></td>
0205: 					<td><input type="text" width="2" name="F64Score" value="<%= F64Score %>">
0206: 					</td>
0207: 					<td class="norm"><select size="4"
0208:       name="F32Pts">
0209: 
0210:         <option >0</option>
0211: 		<option >1</option>
0212: 		<option >99</option>
0213:       </select></td>
0214: 			<%		rs.MoveNext
0215: 					Loop
0216: 					rs.Close
0217: 					Set rs = Nothing	
0218: 					
0219: X = MatchUpCount("D5", "D11", "D6", "D03", 2015)	
0220: 
0221: 					
0222: X = MatchUpCount("D5", "D11", "D6", "D13", 2015)	
0223: 					
0224: 					%>
0225: 					</table>
0226: 				</td>
0227: 			</tr>
0228: 		</table>
0229: 
0230: </body>
0231: </html>