Count Lines in Pages

Contents of Page: UpdateResults.asp Number of Lines: 218 Last Modified: 3/28/2023 7:06:51 AM
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 - Results / Standings Updates</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="UpdateResults.asp?Region=<%= Regs(1,2) %>"><b><big><%= Regs(1,1) %></big></b></a>
0118: 			&nbsp;&nbsp;(<a href="UpdateResults.asp?ShowAll=Y&Region=<%= Regs(1,2) %>">All</a>)&nbsp;&nbsp;
0119: 			|&nbsp;&nbsp;<a href="UpdateResults.asp?Region=<%= Regs(2,2) %>"><b><big><%= Regs(2,1) %></big></b></a>
0120: 			&nbsp;&nbsp;(<a href="UpdateResults.asp?ShowAll=Y&Region=<%= Regs(2,2) %>">All</a>)&nbsp;&nbsp;
0121: 			|&nbsp;&nbsp;<a href="UpdateResults.asp?Region=<%= Regs(3,2) %>"><b><big><%= Regs(3,1) %></big></b></a>
0122: 			&nbsp;&nbsp;(<a href="UpdateResults.asp?ShowAll=Y&Region=<%= Regs(3,2) %>">All</a>)&nbsp;&nbsp;
0123: 			|&nbsp;&nbsp;<a href="UpdateResults.asp?Region=<%= Regs(4,2) %>"><b><big><%= Regs(4,1) %></big></b></a>
0124: 			&nbsp;&nbsp;(<a href="UpdateResults.asp?ShowAll=Y&Region=<%= Regs(4,2) %>">All</a>)&nbsp;&nbsp;
0125: 			|&nbsp;&nbsp;<a href="UpdateResults.asp">All Still In</a>&nbsp;&nbsp;
0126: 
0127: 			|&nbsp;&nbsp;<a href="UpdateResults.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="569">
0134: 						<tr>
0135: 						<td></td><td></td>
0136: 			<%		For i = LBound(fieldList) To UBound(fieldList)	
0137: 			
0138: If fieldList(i) = "Name" Then %>
0139: 						<td class="normbold" align="center" width="100" bgcolor="##ffff66"><%= Regs(ColReg,1) %></td>
0140: <% Else	%>
0141: 							<td class="smalldark" align="right" width="<%= Width %>" bgcolor="#dddddd" height="15"><%= fieldList(i) %></td>
0142: <% End If %>
0143: 			<%		Next	%>
0144: 
0145: 
0146: 							<td class="smalldark" align="center" width="75" bgcolor="#dddddd">-Action</td>
0147: 						</tr>
0148: 
0149: 			<%	Do Until rs.EOF	
0150: 			
0151: 		SeedNo = Right(rs(dataString(1)).Value,2) + 0
0152: 			
0153: 			%>
0154: 				<tr height="28">
0155: <td class="norm"><%= rs("ID").Value %></td>
0156: 					<form action="UpdateResultsPost.asp?yr=<% =season %>&team=<%= rs(dataString(1)).Value %>&ShowAll=<%= ShowAll %>&Region=<%= Region %>" method="post">
0157: 						<input type="hidden" name="table" value="<%= tablename %>">
0158: 						<input type="hidden" name="<%= dataString(1) %>" value="<%= rs(dataString(1)).Value %>">
0159: 						<input type="hidden" name="action" value="">
0160: 						<td class="smalldark" align="right" width="25"><b><%= SeedNo %></b></td>
0161: 			<%		
0162: 			
0163: 			
0164: 			For i = LBound(fieldList) To UBound(fieldList)	
0165: Width = "30"			
0166: If fieldList(i) = "Name" Then
0167: 
0168: TeamName = rs(fieldList(i)).Value
0169: 
0170: Width = "100"
0171: End If			
0172: 			%>
0173: 							<td class="smallgreen" align="right">
0174: 								<input type="text" name="<%= fieldList(i) %>" value="<%= rs(fieldList(i)).Value %>" class="smallgreen" style="width:<%= Width %>px"></td>
0175: 			<%		Next	%>
0176: 							<td class="smalldark" align="right">
0177: 								<input type="button" value="<%= TeamName %>" onClick="javascript:editEntry(this.form,'Change')" class="norm" style="width:90px">
0178: 	</td>				
0179: </tr>
0180: 					</form>
0181: 			<%		rs.MoveNext
0182: 					Loop
0183: 					rs.Close
0184: 					Set rs = Nothing	
0185: 					
0186: X = MatchUpCount("D5", "D11", "D6", "D03", 2015)	
0187: 
0188: 					
0189: X = MatchUpCount("D5", "D11", "D6", "D13", 2015)	
0190: 					
0191: 					%>
0192: 					</table>
0193: 		<table border="0" cellpadding="0" cellspacing="0" width="570">
0194: 				<tr>
0195: 						<td></td><td></td>
0196: 			<td class="normbold" align="center" width="100" bgcolor="##ffff66"><%= Regs(ColReg,1) %></td>
0197: 			<td class="norm" align="center">F64<br>Score<td>
0198: 			<td class="norm" align="center">F32<br>Pts<td>
0199: 			<td class="norm" align="center">F32<br>Score<td>
0200: 			<td class="norm" align="center">F16<br>Pts<td>
0201: 			<td class="norm" align="center">F16<br>Score<td>
0202: 			<td class="norm" align="center">F8<br>Pts<td>
0203: 			<td class="norm" align="center">F8<br>Score<td>
0204: 			<td class="norm" align="center">F4<br>Pts<td>
0205: 			<td class="norm" align="center">F4<br>Score<td>
0206: 			<td class="norm" align="center">F2<br>Pts<td>
0207: 			<td class="norm" align="center">F2<br>Score<td>
0208: 			<td class="norm" align="center">F1<br>Pts<td>
0209: 
0210: 			</tr>
0211: 				
0212: 					</table>
0213: 				</td>
0214: 			</tr>
0215: 		</table>
0216: 
0217: </body>
0218: </html>