Count Lines in Pages

Contents of Page: whoisdeadbeat.asp Number of Lines: 217 Last Modified: 3/18/2021 2:30:32 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: 	yr = Request.QueryString("yr")
0008: 	If yr = "" Then yr = season
0009:    	sortStr = Request.QueryString("sort")
0010: 	If sortStr = "" Then sortStr = "ID"
0011: 	Select Case sortStr
0012: 		Case "FirstName,City,State,EmailAddress"
0013: 			sortStr = sortStr 
0014: 		Case "NumEntries"
0015: 			sortStr = sortStr & " DESC "	
0016: 		Case "ID"
0017: 			sortStr = sortStr & " DESC "			
0018: 	End Select
0019: 
0020: 
0021: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0022: 	sqlString = "SELECT COUNT(Season) as RecordCount FROM mmEntries " & _
0023: 			"WHERE Season = " & yr & " " & _
0024: 			"AND ( NumEntries > PaidEntries " & _
0025:             " OR  Num2ndEntries > Paid2ndEntries )" 
0026: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0027: 	
0028: 	
0029: 
0030: 	TotalMIA = CInt(rsPicks("RecordCount").Value)
0031:     rsPicks.Close
0032: 	set rsPicks = Nothing
0033: 
0034: 
0035: 	Set rs = Server.CreateObject("ADODB.Recordset")
0036: 	sqlString = "SELECT * FROM mmEntries " & _
0037: 			"WHERE Season = " & yr & " " & _
0038: 			"AND ( NumEntries > PaidEntries " & _
0039:             " OR  Num2ndEntries > Paid2ndEntries )" & _
0040: 			"ORDER BY " & sortStr
0041:  rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0042: '		TotalMIA = rs.RecordCount
0043: 	totreg = 0
0044:    totentries = 0
0045:    totpaid = 0
0046:    totmade = 0
0047: %>
0048: <html>
0049: 
0050: <head>
0051: <title>MM - Payments</title>
0052: <link href="mm.css" rel="stylesheet" type="text/css">
0053: </head>
0054: 	<script language="JavaScript" type="text/javascript">
0055: 		function MarkPaid(id,name,type)	{
0056: 			if (!confirm("Did "+name+" PAY with "+type+"?"))	{
0057: 				return;
0058: 			}
0059: 			window.location = "MarkAsPaid.asp?ID="+id+"&PaidType="+type;
0060: 		}		
0061: 	</script>
0062: <script language="JavaScript" type="text/javascript">
0063: 		function deleteNode(id,name)	{
0064: 			if (!confirm("Are you sure you want to delete entry for "+name+"?"))	{
0065: 				return;
0066: 			}
0067: 			window.location = "mmEntryDelete.asp?id="+id;
0068: 		}
0069: 	</script>
0070: <body bgcolor="#ffffff">
0071: 
0072: <table cellspacing="1" border="0" cellpadding="0" width="800" height="53">
0073:   <tr>
0074:     <td  height="20" colspan="12" class="norm">Total MIA (<%= TotalMIA %>)
0075: 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="whoisdeadbeat_m.asp?sort=ID">Mobile</a>
0076: 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="whodidpaypal.asp">Paid via PayPal</a>
0077: 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="whodidcheckcash.asp">Paid via Check / Cash</a>
0078: 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="whoisin.asp">Everyone</a>
0079: 	<img src="images/clear.gif"
0080:     width="1" height="4"></font></td>
0081:   </tr>
0082:   <tr>
0083:     <td width="5%"></td>
0084: 	    <td width="2%"></td>
0085:     <td width="12%"><img src="images/clear.gif" width="1" height="2"></td>
0086:     <td width="13%"><img src="images/clear.gif" width="1" height="2"></td>
0087:     <td width="15%"><img src="images/clear.gif" width="1" height="2"></td>
0088:     <td width="3%"><img src="images/clear.gif" width="1" height="2"></td>
0089:     <td width="6%"><img src="images/clear.gif" width="1" height="2"></td>
0090:     <td width="5%"><img src="images/clear.gif" width="1" height="2"></td>
0091:     <td width="6%"><img src="images/clear.gif" width="1" height="2"></td>
0092:     <td width="5%"><img src="images/clear.gif" width="1" height="2"></td>
0093:     <td width="5%"><img src="images/clear.gif" width="1" height="2"></td>
0094:     <td width="20%"><img src="images/clear.gif" width="1" height="2"></td>
0095:     <td width="5%"><img src="images/clear.gif" width="1" height="2"></td>
0096:   </tr>
0097:   <tr bgcolor="#577fbe">
0098:     <td width="5%" class="normbold" align="center" height="19"></td>
0099:     <td width="5%" class="normbold" align="center" height="19"></td>
0100:     <td width="10%" class="normbold" align="center" height="19"><a href="whoisdeadbeat.asp?sort=Name" class="smallUndl">Last Name</a></td>
0101:     <td width="10%"class="normbold" align="center" height="19"><a href="whoisdeadbeat.asp?sort=FirstName" class="smallUndl">First Name</a></td>
0102:     <td width="10%" class="normbold" align="center" height="19"><a href="whoisdeadbeat.asp?sort=City" class="smallUndl">City</a></td>
0103:     <td width="5%" class="normbold" align="center" height="19"><a href="whoisdeadbeat.asp?sort=State" class="smallUndl">St</a></td>
0104:     <td width="10%" class="normbold" align="center" height="19"><a href="whoisdeadbeat.asp?sort=NumEntries" class="smallUndl"># / PD / Md </a></td>
0105:     <td width="10%" class="smalldark" align="center" height="19"></td>
0106:     <td width="10%" class="smalldark" align="center" height="19">S16 / PD / Md </td>
0107:      <td width="5%" class="smallUndl" align="center" height="19"># of<br>Years</td>
0108:      <td width="5%" class="smallUndl" align="center" height="19">Show<br>Stds</td>
0109:     <td width="10%" class="normbold" align="left" height="19"><a href="whoisdeadbeat.asp?sort=EmailAddress" class="smallUndl">Email Address</a></td>
0110:     <td width="5%" class="normbold" align="center" height="19"><a href="whoisdeadbeat.asp?sort=ID"
0111:     class="smallUndl">ID</a></td>
0112: <%	bgcolor = "#e8e8e8"
0113: 		Do Until rs.EOF
0114: 		emailaddr = rs("EmailAddress").value
0115:  ssf = rs("ShowStandings").Value
0116:  If ssf = True Then
0117:  ssf = "Y"
0118:  Else
0119:  ssf = ""
0120:  End If
0121: ID =  rs("ID").Value
0122: LastName = rs("Name").Value
0123: 		
0124: 			If bgcolor = "#BDBDBD" Then
0125: 				bgcolor = "#ffffff"
0126: 			Else
0127: 				bgcolor = "#BDBDBD"
0128: 			End If
0129: 			val = rs("NumEntries").Value
0130: 			paid = rs("PaidEntries").Value
0131: 			val2 = rs("Num2ndEntries").Value
0132: 			paid2 = rs("Paid2ndEntries").Value
0133: 			ShowStand = rs("ShowStandings").Value
0134: 			If ShowStand = True Then
0135: 			ShowIt = "Y"
0136: 			Else
0137: 			ShowIt = ""
0138: 			End If
0139: 			If paid <> "" Then totpaid = totpaid + CInt(paid)
0140: 			totreg = totreg + ( val - paid )
0141: 			totmade = totmade + totPicksMade
0142: 			FullName = rs("FirstName").Value & " " & rs("Name").Value
0143: 			FirstName = rs("FirstName").Value
0144: 			Name = rs("Name").Value
0145: 
0146: 
0147: 
0148: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0149: 	sqlString = "SELECT COUNT(Season) as RecordCount FROM mmPicks " & _
0150: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0151: 							"AND Season = " & season & " " & _
0152: 							"AND Complete = 'Yes'"
0153: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0154: 	
0155: 	
0156: 
0157: 	totPicksMade = CInt(rsPicks("RecordCount").Value)
0158:     rsPicks.Close
0159: 	set rsPicks = Nothing
0160: 	
0161: 			Set rsSSPicks = Server.CreateObject("ADODB.Recordset")
0162: 	sqlString = "SELECT COUNT(Season) as RecordCount FROM mm2ndPicks " & _
0163: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0164: 							"AND Season = " & season & " " & _
0165: 							"AND Complete = 'Yes'"
0166: 	rsSSPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0167: 	
0168: 	
0169: 
0170: 	totSSPicksMade =  CInt(rsSSPicks("RecordCount").Value)
0171:     rsSSPicks.Close
0172: 
0173: 
0174: 			Set rsPYPicks = Server.CreateObject("ADODB.Recordset")
0175: 	sqlString = "SELECT COUNT(ID) as RegCount FROM mmEntries " & _
0176: 							"WHERE FirstName = '" & FirstName & "' " & _
0177:                              "AND Name = '" & Name & "' " & _
0178: 							"AND Season < " & season & " " 
0179: 	rsPYPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0180: 	
0181: 	
0182: 
0183: 	PYCount = rsPYPicks("RegCount").Value
0184:     rsPYPicks.Close
0185: 
0186: 
0187: 	%>
0188:   </tr>
0189:   <tr bgcolor="<%= bgcolor %>">
0190:     <td class="norm" align="center" height="13">	<a href="editmmEntries.asp?from=deadbeat&amp;id=<%= rs("ID").Value %>" class="smallblueUndl"><%= totreg %></a>
0191: </td>
0192:    <td class="norm" align="center" height="19"><%= ssf %></td>
0193:     <td class="norm" align="left" height="19"><a href="SearchResults.asp?LastName=<%= LastName %>&FirstName=<%= FirstName %>"><%= LastName%></a></td>
0194:     <td class="norm" align="left" height="19"><%= rs("FirstName").Value %></td>
0195:     <td class="norm" align="left" height="19"><%= rs("City").Value %></td>
0196:     <td class="norm" align="left" height="19"><%= rs("State").Value %></td>
0197:     <td class="norm" align="center" height="19"><%= val %> / <%= Paid %> / <%= totPicksMade %></td>
0198: 	<td class="norm" align="center"  ><a href="MMReceivePayment.asp?ID=<%= ID %>">Paid</a></td>
0199:     <td class="norm" align="center" height="19"><%= val2 %> / <%= Paid2 %> / <%= totSSPicksMade %></td>
0200:     <td class="normbold" align="center" height="19"><%= PYCount %></td>
0201:     <td class="normbold" align="center" height="19"><%= ShowIt %></td>
0202:     <td class="norm" align="left" height="19"><%= emailaddr %></td>
0203: 	<td><a href="editmmEntries.asp?from=deadbeat&amp;id=<%= rs("ID").Value %>" class="smallblueUndl"><%= rs("ID").Value %></a></td>
0204:        <td class="smalldark" align="center"><a
0205:         href="javascript:deleteNode('<%= rs("ID").Value %>','<%= FullName %>')" class="smallblueUndl">Del</a></td>
0206:   </tr>
0207: <%	   totentries = totentries + val
0208: 
0209:       rs.MoveNext
0210: 		Loop
0211: 		rs.Close
0212: 		Set rs = Nothing	%>
0213: <tr><td class="norm" align="left" height="19" colspan="10">Total Unpaid Entries: <%= TotReg %></td></tr>
0214: 
0215: </table>
0216: </body>
0217: </html>