Count Lines in Pages

Contents of Page: picks_m.asp Number of Lines: 223 Last Modified: 4/20/2025 1:24:02 PM
0001: <% @Language = "VBScript" %>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: <!-- #include FILE="include/funcs.asp" -->
0006: 
0007: <%
0008:    If startmakepicks <> "YES" Then
0009:       Response.Redirect("picks1demo.asp")
0010:    Else
0011: 	user = Request.Cookies("user")
0012: 	If user = ""  Then Response.Redirect("login_m.asp?from=picks.asp")
0013: 	
0014: Session("UsedMobile") = "Y"
0015: 
0016: 
0017: '	If todayDate => cutoffdate and todaytime => cutofftime Then
0018: '	noMorePicks = True
0019: '	End If
0020: 	
0021: 	If user = "jt@folga.org" Then noMorePicks = False
0022:   
0023: 	' delete all temporary picks for this user
0024: 	Set cn = Server.CreateObject("ADODB.Connection")
0025: 	cn.Open conn
0026: 	sqlString = "DELETE FROM mmPicks " & _
0027: 							"WHERE EmailAddress = '" & user & "' " & _
0028: 							"AND Season = " & season & " " & _
0029: 							"AND Complete = 'No'"
0030: 	cn.Execute sqlString, lngRecs, adExecuteNoRecords
0031: 	cn.Close
0032: 	Set cn = Nothing
0033: 	
0034: 	' obtain the entry information
0035: 	Set rsEntry = Server.CreateObject("ADODB.Recordset")
0036: 	sqlString = "SELECT * FROM mmEntries " & _
0037: 							"WHERE EmailAddress = '" & user & "' " & _
0038: 							"AND Season = " & season
0039: 	rsEntry.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0040: 	numEntries = CInt(rsEntry("NumEntries").Value)
0041:     FreeEntries = CInt(rsEntry("FreeEntries").Value)
0042: 	RegNumber = rsEntry("RegNumber").Value	
0043: 	firstName = rsEntry("FirstName").Value
0044: 	name = rsEntry("Name").Value
0045: 	paid = rsEntry("PaidEntries").Value
0046: 	TotalEntries = numEntries + FreeEntries
0047: 	totpaid = 0
0048: 	If paid <> "" Then totpaid = totpaid + CInt(paid)
0049: 	
0050: 	rsEntry.Close
0051: 	Set rsEntry = Nothing
0052: 
0053: 	' get all picks
0054: 	Set rsPicks = Server.CreateObject("ADODB.Recordset")
0055: 	sqlString = "SELECT * FROM mmPicks " & _
0056: 							"WHERE EmailAddress = '" & user & "' " & _
0057: 							"AND Season = " & season & " " & _
0058: 							"AND Complete = 'Yes'"
0059: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0060: 	
0061: 	If rsPicks.EOF And TotalEntries <> 0 And Not noMorePicks Then
0062: 		rsPicks.Close
0063: 		Response.Redirect("picks1.asp?region=1")
0064: 	ElseIf totpaid > numEntries Then
0065: '		rsPicks.Close
0066: '		Response.Redirect("contactmm.asp?user=" & user)
0067: 	End If
0068: 
0069: 		Set rspc = Server.CreateObject("ADODB.Recordset")
0070: 
0071: 	sqlString = "SELECT COUNT(Season) as RecordCount FROM mmPicks " & _
0072: 							"WHERE EmailAddress = '" & user & "' " & _
0073: 							"AND Season = " & season & " " & _
0074: 							"AND Complete = 'Yes'"
0075: 	rspc.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0076: 
0077: 	totPicks = CInt(rspc("RecordCount").Value)
0078: 
0079: '	totPicks = rsPicks.RecordCount
0080:    End If
0081: %>
0082: 
0083: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
0084: 
0085: <html>
0086: <head>
0087: <meta name="viewport" content="width=device-width">
0088: 	<title>March Madness - Picks Screen</title>
0089: 	<link href="mm.css" rel="stylesheet" type="text/css">
0090: 		<link href="https://mychinodes.org/desb.css" rel="stylesheet" type="text/css">
0091: 	<script language="JavaScript" type="text/javascript">
0092: 		function deleteNode(id)	{
0093: 			if (!confirm("You are about to re-set your pick selections.  You will have to step thru all the 4 brackets and finalists.  Continue?"))	{
0094: 				return;
0095: 			}
0096: 			window.location = "editPicks.asp?pick="+id+"&page=region";
0097: 		}
0098: 		function deletefinals(id)	{
0099: 			if (!confirm("You are about to re-set your pick selections.  You will have to re-select the finalists and champion.  Continue?"))	{
0100: 				return;
0101: 			}
0102: 			window.location = "editPicks.asp?pick="+id+"&page=final";
0103: 		}
0104: 
0105: 	</script>
0106: 
0107: </head>
0108: 
0109: <body bgcolor="#ffffff">
0110: 
0111: 	<table border="0" cellpadding="0" cellspacing="0" align="center">
0112: 
0113: 		<tr>
0114: 			<td class="norm" colspan="4"  bgcolor="#FFCC66">
0115: 				<ol>
0116: 					<li>To <b>display picks</b> already made, click on Entry Name.</li>
0117: 					<li>To <b>change picks</b> on any given entry, click <b>Picks</b> in the Change column.&nbsp; <span class="normred"><b><br>
0118:                       WARNING:</b></span> You must re-enter all 4 brackets.</li>
0119: 					<li>To <b>change</b> just the <b>finalists</b> on any given entry, click <b>Finalists</b> in the Change column.&nbsp; <span class="normred"><b><br>
0120:                       WARNING:</b></span> You must complete this screen.</li>
0121: 					<li>Click on <img src="images/post.gif" border="0" align="absmiddle"> to change your Entry Name.</li>
0122: 				</ol>
0123: 			</td>
0124: 		</tr>
0125: 
0126: <% numleft =  TotalEntries - totPicks %>		
0127: 		
0128: <%	If TotalEntries > 1 Then	%>
0129: <%		If TotalEntries > totPicks Then
0130: 				numLeft = TotalEntries - totPicks	%>
0131:                   <%		End If	%>
0132: 
0133: 			<tr valign="top">
0134: 				<td class="normbold" width="170" bgcolor="#FFCC66" colspan="6">Total Entries:&nbsp;&nbsp;<%= TotalEntries %>
0135: 				&nbsp;<span class="normRed">(<%= numLeft %> left)</span>
0136:                   &nbsp;</td>
0137: 
0138: 			</tr>
0139: 
0140: 
0141: <% End If	%>
0142: 		<tr><td colspan="4" class="space" >&nbsp;</td></tr>
0143: 		<tr>
0144: 			<td colspan="4" >
0145: <%	If Not rsPicks.EOF Then	%>
0146: 					<table border="0" cellpadding="0" cellspacing="0" align="center">
0147: 						<tr bgcolor="#FFFAF0">
0148: 							<td class="normbold" width="150" align="left" height="20">Entry Name</td>
0149: 							<td class="normbold" width="100" align="left">Champion<br>Runner Up</td>
0150: 							<td class="normbold" width="100" align="center">Change</td>
0151: 						</tr>
0152: 						<tr><td colspan="5" height="1" bgcolor="#000000"><spacer type="block"></td></tr>
0153: <%	End If
0154: 		back = "#f8f8f8"
0155: 		Do Until rsPicks.EOF
0156: 			P1 = rsPicks("F1").Value
0157: 			If P1 <> rsPicks("S1").Value Then
0158: 				P2 = rsPicks("S1").Value
0159: 			Else
0160: 				P2 = rsPicks("S2").Value
0161: 			End If
0162: 			RU = ""
0163: 			If rsPicks("A15").Value <> P1 And rsPicks("A15").Value <> P2 Then RU = AddToList(RU, rsPicks("A15").Value)
0164: 			If rsPicks("B15").Value <> P1 And rsPicks("B15").Value <> P2 Then RU = AddToList(RU, rsPicks("B15").Value)
0165: 			If rsPicks("C15").Value <> P1 And rsPicks("C15").Value <> P2 Then RU = AddToList(RU, rsPicks("C15").Value)
0166: 			If rsPicks("D15").Value <> P1 And rsPicks("D15").Value <> P2 Then RU = AddToList(RU, rsPicks("D15").Value)
0167: 			If back = "#e5e5e5" Then
0168: 				back = "#ffffff"
0169: 			Else
0170: 				back = "#e5e5e5"
0171: 			End If
0172: 			Dim RUarr
0173: 			RUarr = Split(RU, ",")
0174: %>
0175: 						<tr bgcolor="<%= back %>">
0176: 							<td class="norm">
0177: 								<a href="displaypicks3.asp?pick=<%= rsPicks("ID").Value %>" class="normUndl"><%= rsPicks("EntryName").Value %></a>
0178: 								&nbsp;
0179: 								<a href="nameChange.asp?pick=<%= rsPicks("ID").Value %>" class="normUndl">
0180: 									<img src="images/post.gif" alt="Change entry name" border="0" align="absmiddle">
0181: 								</a>
0182: 							</td>
0183: 							<td class="norm" align="left"><%= displayTeam(P1) %><br><%= displayTeam(P2) %></td>
0184: 							<td align="left">
0185: <%		If noMorePicks Then	%>
0186: 									&nbsp;
0187: <%		Else	%>
0188: 									<a href="javascript:deleteNode('<%= rsPicks("ID").Value %>')" class="normUndl">Picks</a>
0189: 									&nbsp;&nbsp;
0190: 									<a href="javascript:deletefinals('<%= rsPicks("ID").Value %>')" class="normUndl">Finalists</a>
0191: <%		End If	%>
0192: 							</td>
0193: 						</tr>
0194: <%		rsPicks.MoveNext
0195: 		Loop
0196: 		rsPicks.Close
0197: 		Set rsPicks = Nothing	%>
0198: 				</table>
0199: 			</td>
0200: 		</tr>
0201: <%	If TotalEntries > totPicks And Not noMorePicks Then	%>
0202: 		<tr><td colspan="4" class="space" >&nbsp;</td></tr>
0203: 		<tr align="center">
0204: 			<td colspan="4" >
0205: 				<br><input type="button" value="Make Picks For A New Entry" class="button-40" onClick="window.location='picks1.asp?region=1'"></td>
0206: 		</tr>
0207: <%	End If	%>
0208: 
0209: 
0210: 
0211: <tr><td>&nbsp;</td></tr>
0212: <tr><td>&nbsp;</td></tr>
0213: <tr height="50" valign="center"><td colspan="10" align="center"> 
0214:  <button class="button-101" onclick="window.open('MakeAllPicks.asp','main');"><big>Return to Make All Picks</button>				
0215: </td></tr>
0216: 
0217: 
0218: 
0219: 	</table>
0220: 
0221: 
0222: </body>
0223: </html>