Count Lines in Pages

Contents of Page: picks.asp Number of Lines: 250 Last Modified: 4/20/2025 9:31:20 AM
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: 
0009: 	MyEMail = Request.Cookies("user")
0010: 
0011:    If startmakepicks <> "YES" Then
0012:       Response.Redirect("picks1demo.asp")
0013:    Else
0014: '	user = Request.Cookies("user")
0015: 	If MyEmail = ""  Then Response.Redirect("login_m.asp?from=picks.asp")
0016: 	
0017: '	If todayDate => cutoffdate and todaytime => cutofftime Then
0018: '	noMorePicks = True
0019: '	End If
0020: 	
0021: 	If MyEmail = "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 = '" & MyEmail & "' " & _
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 = '" & MyEmail & "' " & _
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 = '" & MyEmail & "' " & _
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?MyEmail=" & MyEmail)
0067: 	End If
0068: 
0069: 		Set rspc = Server.CreateObject("ADODB.Recordset")
0070: 
0071: 	sqlString = "SELECT COUNT(Season) as RecordCount FROM mmPicks " & _
0072: 							"WHERE EmailAddress = '" & MyEmail & "' " & _
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: 	<title>March Madness - Picks Screen</title>
0088: 	<link href="mm.css" rel="stylesheet" type="text/css">
0089: 	<link href="https://mychinodes.org/desb.css" rel="stylesheet" type="text/css">
0090: 	<script language="JavaScript" type="text/javascript">
0091: 		function deleteNode(id)	{
0092: 			if (!confirm("You are about to re-set your pick selections.  You will have to step thru all the 4 brackets and finalists.  Continue?"))	{
0093: 				return;
0094: 			}
0095: 			window.location = "editPicks.asp?pick="+id+"&page=region";
0096: 		}
0097: 		function deletefinals(id)	{
0098: 			if (!confirm("You are about to re-set your pick selections.  You will have to re-select the finalists and champion.  Continue?"))	{
0099: 				return;
0100: 			}
0101: 			window.location = "editPicks.asp?pick="+id+"&page=final";
0102: 		}
0103: 
0104: 	</script>
0105: 
0106: </head>
0107: 
0108: <body bgcolor="#ffffff">
0109: 
0110: 	<table border="0" cellpadding="0" cellspacing="0" width="700">
0111: 		<tr>
0112: 			<td class="bigblue" colspan="4" align="center" bgcolor="#FFCC66"> Make / Review Picks<br>
0113: 			
0114:               &nbsp;</td>
0115: 		</tr>
0116: 		<tr>
0117: 			<td class="norm" colspan="4"  bgcolor="#FFCC66">
0118: 				<ol>
0119: 					<li>To <b>display picks</b> already made, click on Entry Name.</li>
0120: 					<li>To <b>change picks</b> on any given entry, click <b>Picks</b> in the Change column.&nbsp; <span class="normred"><b><br>
0121:                       WARNING:</b></span> You must complete all screens.</li>
0122: 					<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>
0123:                       WARNING:</b></span> You must complete this screen.</li>
0124: 					<li>Click on <img src="images/post.gif" border="0" align="absmiddle"> to change your Entry Name.</li>
0125: 				</ol>
0126: 			</td>
0127: 		</tr>
0128: 
0129: <% numleft =  TotalEntries - totPicks %>		
0130: 		
0131: <%	If TotalEntries > 1 Then	%>
0132: <%		If TotalEntries > totPicks Then
0133: 				numLeft = TotalEntries - totPicks	%>
0134:                   <%		End If	%>
0135: 
0136: 			<tr valign="top">
0137: 				<td class="normbold" bgcolor="#FFCC66"># Of Entries:&nbsp;&nbsp;<%= TotalEntries %></td>
0138: 				<td class="normbold"  bgcolor="#FFCC66">
0139: 				&nbsp;<span class="normRed">(<%= numLeft %> picks left)</span>
0140:                   &nbsp;</td>
0141: 				<td class="normbold"  bgcolor="#FFCC66">
0142: 				<p align="right">
0143: 				<%	If TotalEntries > 1 Then	
0144: 				    ssPicks = TotalEntries - 1 %>
0145: 				    <font color="#FF0000">REMINDER:</font><font color="#808080"> 
0146: 				You have </font><font color="#FF0000"><%= ssPicks %></font>&nbsp;<i><font color="#808080">Sweet 16 Contest</i> 
0147: 				Entries</font></td>
0148: 				<% End If %>    
0149: 				<td class="norm" width="0">
0150: 				</td>
0151: 			</tr>
0152: 
0153: 
0154: <% End If	%>
0155: 
0156: 		<tr><td colspan="4" class="space" >&nbsp;</td></tr>
0157: 		<tr>
0158: 			<td colspan="4" >
0159: <%	If Not rsPicks.EOF Then	%>
0160: </table>
0161: 	<table border="0" cellpadding="0" cellspacing="0" width="700">
0162: 						<tr bgcolor="#FFFAF0">
0163: 							<td class="normbold" width="30%" align="left" height="20">Entry Name</td>
0164: 							<td class="normbold" width="15%" align="left">Champion</td>
0165: 							<td class="normbold" width="15%" align="left">2nd Place</td>
0166: 							<td class="normbold" width="20%" align="left">Semifinalists</td>
0167: 							<td class="normbold" width="20%" align="center">Change</td>
0168: 						</tr>
0169: 						<tr><td colspan="5" height="1" bgcolor="#000000"><spacer type="block"></td></tr>
0170: <%	End If
0171: 		back = "#f8f8f8"
0172: 		Do Until rsPicks.EOF
0173: 		PicksID = rsPicks("ID").Value
0174: 			P1 = rsPicks("F1").Value
0175: 			If P1 <> rsPicks("S1").Value Then
0176: 				P2 = rsPicks("S1").Value
0177: 			Else
0178: 				P2 = rsPicks("S2").Value
0179: 			End If
0180: 			RU = ""
0181: 			If rsPicks("A15").Value <> P1 And rsPicks("A15").Value <> P2 Then RU = AddToList(RU, rsPicks("A15").Value)
0182: 			If rsPicks("B15").Value <> P1 And rsPicks("B15").Value <> P2 Then RU = AddToList(RU, rsPicks("B15").Value)
0183: 			If rsPicks("C15").Value <> P1 And rsPicks("C15").Value <> P2 Then RU = AddToList(RU, rsPicks("C15").Value)
0184: 			If rsPicks("D15").Value <> P1 And rsPicks("D15").Value <> P2 Then RU = AddToList(RU, rsPicks("D15").Value)
0185: 			If back = "#f8f8f8" Then
0186: 				back = "#ffffff"
0187: 			Else
0188: 				back = "#f8f8f8"
0189: 			End If
0190: 			Dim RUarr
0191: 			RUarr = Split(RU, ",")
0192: %>
0193: 						<tr bgcolor="<%= back %>">
0194: 							<td class="norm">
0195: 								<a href="displaypicks3.asp?pick=<%= rsPicks("ID").Value %>" class="normUndl"><%= rsPicks("EntryName").Value %></a>
0196: 								&nbsp;
0197: 								<a href="nameChange.asp?pick=<%= rsPicks("ID").Value %>" class="normUndl">
0198: 									<img src="images/post.gif" alt="Change entry name" border="0" align="absmiddle">
0199: 								</a>
0200: 							</td>
0201: 							<td class="norm" align="left"><%= displayTeam(P1) %></td>
0202: 							<td class="norm" align="left"><%= displayTeam(P2) %></td>
0203: 							<td class="norm" align="left">
0204: 								<%= displayTeam(RUarr(0)) %>,&nbsp;<%= displayTeam(RUarr(1)) %>
0205: 							</td>
0206: 							<td align="center">
0207: <%		If noMorePicks Then	%>
0208: 									&nbsp;
0209: <%		Else	%>
0210: 									<a href="javascript:deleteNode('<%= rsPicks("ID").Value %>')" class="normUndl">Picks</a>
0211: 									&nbsp;&nbsp;
0212: 								<a href="javascript:deletefinals('<%= rsPicks("ID").Value %>')" class="normUndl">Finalists</a> 
0213: <%		End If	%>
0214: 							</td>
0215: 						</tr>
0216: <%		rsPicks.MoveNext
0217: 		Loop
0218: 		rsPicks.Close
0219: 		Set rsPicks = Nothing	%>
0220: 
0221: 			</td>
0222: 		</tr>
0223: <%	If TotalEntries > totPicks And Not noMorePicks Then	%>
0224: 	<tr><td colspan="4" class="space" >&nbsp;</td></tr>
0225: 		<tr align="center">
0226: 			<td colspan="10" >
0227: 				<br><input type="button" value="Make Picks For A New Entry" class="button-40" onClick="window.location='picks1.asp?region=1'">
0228: 				 </td>
0229: 		</tr>
0230: 
0231: <%	End If	%>
0232: <%
0233: 
0234: 
0235: 
0236: %>
0237: 
0238: <tr><td>&nbsp;</td></tr>
0239: <tr><td>&nbsp;</td></tr>
0240: <tr height="50" valign="center"><td colspan="10" align="center"> 
0241:  <button class="button-101" onclick="window.open('MakeAllPicks.asp','main');"><big>Return to Make All Picks</button>				
0242: </td></tr>
0243: 
0244: 
0245: 
0246: 	</table>
0247: 
0248: 
0249: </body>
0250: </html>