Count Lines in Pages

Contents of Page: whoisin.asp Number of Lines: 307 Last Modified: 3/27/2025 11:11:25 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <!-- #include FILE="include/ReturnPageSet.inc" -->
0005: <%
0006: 	user = Request.Cookies("user")
0007: 
0008: If user <> "jt@folga.org" Then
0009: Response.Redirect("whoisinsummary.asp")
0010: End If
0011: 	yr = Request.QueryString("yr")
0012: 	If yr = "" Then yr = season
0013:    	sortStr = Request.QueryString("sort")
0014:   	Deadbeat = Request.QueryString("DB")   	
0015: 	If sortStr = "" Then sortStr = "Name"
0016: 	Select Case sortStr
0017: 		Case "FirstName,City,State,EmailAddress"
0018: 			sortStr = sortStr 
0019: 		Case "NumEntries"
0020: 			sortStr = sortStr & " DESC "	
0021: 		Case "Num2ndEntries"
0022: 			sortStr = sortStr & " DESC "
0023: 		Case "ID"
0024: 			sortStr = sortStr & " DESC "					
0025: 	End Select
0026: 
0027: 	IF Deadbeat = "Y" Then
0028: 	AddSel = "AND ( NumEntries > PaidEntries OR Num2ndEntries > Paid2ndEntries )" 
0029: 	DBOption = "&DB=Y"
0030: 	Else
0031: 	AddSel = ""
0032: 	DBOption = ""
0033: 	End If
0034: 
0035: 	Set rs = Server.CreateObject("ADODB.Recordset")
0036: 	sqlString = "SELECT * FROM mmEntries " & _
0037: 			"WHERE Season = " & yr & " " & _
0038: 			AddSel & _
0039: 			"ORDER BY " & sortStr
0040: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0041: 	totreg = 0
0042:    totentries = 0
0043:    totssentries = 0   
0044:    totpaid = 0
0045:    tot2ndpaid = 0   
0046:    totmade = 0
0047:    tot2ndmade = 0
0048: 	TotalMobileEntries = 0
0049: 
0050: %>
0051: <html>
0052: 
0053: <head>
0054: <title>March Madness Contest - Who is registered?</title>
0055: <link href="mm.css" rel="stylesheet" type="text/css">
0056: <script language="JavaScript" type="text/javascript">
0057: 		function deleteNode(id,name)	{
0058: 			if (!confirm("Are you sure you want to delete entry for "+name+"?"))	{
0059: 				return;
0060: 			}
0061: 			window.location = "mmEntryDelete.asp?id="+id;
0062: 		}
0063: 	</script>
0064: </head>
0065: 
0066: <body bgcolor="#ffffff">
0067: 
0068: <table cellspacing="1" border="0" cellpadding="1" width="850"  height="53">
0069: 
0070:       <tr>
0071:         <td width="100%" height="20" colspan="14" class="norm">
0072: 
0073: 		<a href="whoisdeadbeat.asp">Dead Beats</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
0074: 		<a href="whoisin.asp">Everyone</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; 
0075: 		<a href="whodidcheckcash.asp">Payments Break Down</a></td>
0076:       </tr>
0077:      
0078:       <tr bgcolor="#577fbe">
0079:         <td class="small" align="center" height="19" width="3%"></td>
0080:         <td class="small" align="center" height="19"  width="10%"><a href="whoisin.asp?sort=Name<%= DBOption %>"
0081:         class="smallUndl">Name</a></td>
0082:         <td class="small" align="center" height="19" width="10%"><a href="whoisin.asp?sort=City<%= DBOption %>"
0083:         class="smallUndl">City</a>&nbsp;&nbsp;<a href="whoisin.asp?sort=State<%= DBOption %>"
0084:         class="smallUndl">St</a></td>
0085: 
0086:         <td class="small" align="center" height="19" width="3%"><a href="whoisin.asp?sort=NumEntries<%= DBOption %>"
0087:         class="smallUndl">Entries</a></td>
0088: 
0089:         <td class="small" align="center" height="19" width="3%">Made</td>
0090: 		        <td class="small" align="center" height="19" width="3%">Paid</td>
0091: 		        <td class="small" align="center" height="19" width="3%">B/Lsr</td>
0092: 
0093: 
0094:         <td class="small" align="center" height="19" width="3%"><a href="whoisin.asp?sort=Num2ndEntries<%= DBOption %>"
0095:         class="smallUndl">S16</a></td>
0096: 
0097:         <td class="small" align="center" height="19" width="3%">S16M</td>
0098:         <td class="small" align="center" height="19" width="3%">SSPd</td>
0099:         <td class="small" align="left" height="19" width="15%"><a href="whoisin.asp?sort=EmailAddress<%= DBOption %>"
0100:         class="smallUndl">Email Address</a></td>
0101:         <td class="small" align="center" height="19" width="3%"><a href="whoisin.asp?sort=StartPage">Start Page</a></td>
0102:         <td class="small" align="center" height="19" width="3%"><a href="whoisin.asp?sort=ID<%= DBOption %>"
0103: 
0104:         <td class="small" align="center" height="19" width="3%">Del</td>
0105: 
0106: <%	bgcolor = "##ccff00"
0107: 		Do Until rs.EOF
0108: 		emailaddr = rs("EmailAddress").value
0109: 
0110: 
0111: '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0112: 
0113: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0114: 	sqlString = "SELECT COUNT(ID) as RegCount FROM mmPicks " & _
0115: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0116: 							"AND Season = " & season & " " & _
0117: 							"AND Complete = 'Yes'"
0118: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0119: 
0120: 	totPicksMade = rsPicks("RegCount").Value
0121: 
0122: 	    rsPicks.Close
0123: 	set rsPicks = Nothing
0124: 
0125: '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0126: 
0127: 	
0128: 			Set rsSSPicks = Server.CreateObject("ADODB.Recordset")
0129: 	sqlString = "SELECT COUNT(ID) as RegCount FROM mm2ndPicks " & _
0130: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0131: 							"AND Season = " & season & " " & _
0132: 							"AND Complete = 'Yes'"
0133: 	rsSSPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0134: 	
0135: 	totSSPicksMade = rsSSPicks("RegCount").Value
0136: 
0137: 	    rsSSPicks.Close
0138: 	set rsSSPicks = Nothing
0139: '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0140: 
0141: 		
0142: 			If bgcolor = "#D8D8D8" Then
0143: 				bgcolor = "#ffffff"
0144: 			Else
0145: 				bgcolor = "#D8D8D8"
0146: 			End If
0147: 			val = rs("NumEntries").Value
0148: 			RegNumber = rs("RegNumber").Value
0149: 			UsedMobile = rs("UsedMobile").Value
0150: 			val2nd = rs("Num2ndEntries").Value			
0151: 			paid = rs("PaidEntries").Value + 0
0152: 			xx = IsNull(paid)
0153: 			If xx = True Then paid = 0
0154: '			If paid <> "" Then totpaid = totpaid + CInt(paid)
0155: totpaid = totpaid + paid
0156: 			paid2nd = rs("Paid2ndEntries").Value + 0
0157: '			If paid2nd <> "" Then tot2ndpaid = tot2ndpaid + CInt(paid2nd)
0158: tot2ndpaid = tot2ndpaid + paid2nd
0159: 			If val > 0 Then
0160: 			totreg = totreg + 1
0161: 			End If
0162: 			totmade = totmade + CInt(totPicksMade)
0163: 			tot2ndmade = tot2ndmade + CInt(totSSPicksMade)
0164:             
0165: 			' Cpaid = CInt(paid)
0166:             Cpaid = Paid
0167: 			If CPaid > CInt(totPicksMade) Then
0168: 			PD_Color = "#ff8282"
0169: 			Else
0170: 			PD_Color = "white"
0171: 			End If
0172: 			If Paid = Val And Paid2nd = val2nd Then
0173: 			row_color =  bgcolor
0174: 			Else
0175: 			row_color = "#ff8282"
0176: 			End If
0177: 			FullName = rs("FirstName").Value & " " & rs("Name").Value
0178: 
0179: If UsedMobile = "Y" Then
0180: cell_color = "#669900"
0181: TotalMobileEntries = TotalMobileEntries + 1
0182: Else
0183: cell_color = row_color
0184: End IF
0185: 
0186: 
0187: '===========================================================
0188: 
0189:   		Set rsg = Server.CreateObject("ADODB.Recordset")
0190: 		sqlString = "SELECT * FROM mmBiggestLoser " & _
0191: 			"WHERE RegNumber = '" & RegNumber & "' " & _
0192: 			"AND Season = " & yr
0193: 
0194: '	rsg.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0195: 		rsg.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText	  
0196: 		If rsg.EOF Then
0197: 		BLP = ""
0198: 		Else
0199: 		BLP ="Y"
0200: 		BLPTotal = BLPTotal + 1
0201: 		End If
0202: 		
0203: 		MyBuddies1 = rs("MyBuddies1").Value
0204: 		
0205: 		
0206: 
0207: If MyBuddies1 <> "" Then
0208: Buddy = " *"
0209: Else
0210: Buddy =""
0211: ENd If
0212: 	
0213: '===============================================================
0214: 	%>
0215: 	
0216:       </tr>
0217:       <tr bgcolor="<%= row_color %>">
0218: <% If user = "jt@folga.org" Then %>
0219:         <td class="norm" align="center" height="13" bgcolor="<%= cell_color %>"><a href="editmmEntries.asp?id=<%= rs("ID").Value %>&DB=<%= Deadbeat %>"><%= totreg %></a>
0220: <% Else %>
0221:      <td class="smalldark" align="center" height="13" >
0222: 	<%= totreg %>
0223: <% End If %>
0224: 
0225: </td>
0226:         <td class="smalldark" align="left" height="13"><%= FullName %>
0227: </td>
0228:         <td class="smalldark" align="left" height="13"><%= rs("City").Value %>, <%= rs("State").Value %>
0229: </td>
0230: 
0231:         <td class="smalldark" align="center" height="13">
0232: 		
0233: 		 <a href="MakeAllPicks.asp?Email=<%= emailaddr %>"><big><b><%= val %></a>
0234: </td>
0235: <% If user = "jt@folga.org" Then %>
0236:         <td class="smalldark" align="center" height="13" bgcolor="<%= PD_Color %>"><%= totPicksMade %>
0237: </td>
0238:        
0239:         <td class="smalldark" align="center" height="13"><%= paid %>
0240: </td>
0241:         <td class="smalldark" align="center" height="13"><%= BLP %>
0242: </td>
0243:       
0244: <% End If %>
0245: <% If reg2ndopen = "YES" or user = "jt@folga.org" Then  %>
0246:         <td class="smalldark" align="center" height="13"><%= val2nd %>
0247: </td>
0248: <% End If %>
0249: <% If user = "jt@folga.org" Then %>
0250: 
0251:         <td class="smalldark" align="center" height="13"><%= totSSPicksMade %>
0252: </td>
0253:         <td class="smalldark" align="center" height="13"><%= paid2nd %>
0254: </td>
0255:         <td class="smalldark" align="left" height="13"><%= emailaddr %></a></td>
0256:          <td class="smalldark" align="left" height="13"><%= rs("StartPage").Value %><%= Buddy %></td>
0257:         <td class="smalldark" align="center"><a
0258:         href="javascript:deleteNode('<%= rs("ID").Value %>','<%= FullName %>')" class="smallblueUndl">Del</a></td>
0259: <% End If %>
0260:       </tr>
0261: <%	   totentries = totentries + val
0262:        totssentries = totssentries + val2nd
0263:       rs.MoveNext
0264: 		Loop
0265: 		If bgcolor = "#e8e8e8" Then
0266: 				bgcolor = "#ffffff"
0267: 			Else
0268: 				bgcolor = "#e8e8e8"
0269: 			End If
0270: 
0271: 		rs.Close
0272: 		Set rs = Nothing	%>
0273: 		<tr> </tr>
0274: 		<tr><td></td><td></td><td></td><td class="smalldark" align="left" height="13"><p align="center"><%= totentries %></td>
0275:   <% If user = "jt@folga.org" Then %>
0276:         <td class="smalldark" align="center" height="13"><% = totmade %></td>
0277: 		
0278:         <td class="smalldark" align="center" height="13"><% = totpaid %></td>
0279: 		        <td class="smalldark" align="center" height="13"><% = BLPTotal %></td>
0280: <% End If %>
0281: 		 <% If reg2ndopen = "YES" or user = "jt@folga.org" Then %>
0282:         <td class="smalldark" align="center" height="13"><%= totssentries %></td>
0283:    <% End If %>        
0284: <% If user = "jt@folga.org" Then %>
0285:         <td class="smalldark" align="center" height="13"><% = tot2ndmade %></td>
0286:         <td class="smalldark" align="center" height="13"><% = tot2ndpaid %></td>
0287: <% End If %>
0288: </tr>
0289: 
0290: <%
0291: 
0292: If TotalMobileEntries > 0 Then
0293: 
0294: %>
0295: 
0296: <tr><td class="norm" colspan="10">Total Mobile Entries: <b><%= TotalMobileEntries %></td></tr>
0297: 		
0298: 		
0299: <% End If %>
0300: 
0301: 		 </table>
0302: 
0303:     </td>
0304:   </tr>
0305: </table>
0306: </body>
0307: </html>