Count Lines in Pages

Contents of Page: whoisindetail.asp Number of Lines: 245 Last Modified: 8/22/2018 1:33:27 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <%
0005: 	user = Request.Cookies("user")
0006: 	yr = Request.QueryString("yr")
0007: 	If yr = "" Then yr = season
0008:    	sortStr = Request.QueryString("sort")
0009:   	Deadbeat = Request.QueryString("DB")   	
0010: 	If sortStr = "" Then sortStr = "Name"
0011: 	Select Case sortStr
0012: 		Case "FirstName,City,State,EmailAddress"
0013: 			sortStr = sortStr 
0014: 		Case "NumEntries"
0015: 			sortStr = sortStr & " DESC "	
0016: 		Case "Num2ndEntries"
0017: 			sortStr = sortStr & " DESC "
0018: 		Case "ID"
0019: 			sortStr = sortStr & " DESC "					
0020: 	End Select
0021: 
0022: 	IF Deadbeat = "Y" Then
0023: 	AddSel = "AND ( NumEntries > PaidEntries OR Num2ndEntries > Paid2ndEntries )" 
0024: 	DBOption = "&DB=Y"
0025: 	Else
0026: 	AddSel = ""
0027: 	DBOption = ""
0028: 	End If
0029: 
0030: 	Set rs = Server.CreateObject("ADODB.Recordset")
0031: 	sqlString = "SELECT * FROM mmEntries " & _
0032: 			"WHERE Season = " & yr & " " & _
0033: 			AddSel & _
0034: 			"ORDER BY " & sortStr
0035: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0036: 	totreg = 0
0037:    totentries = 0
0038:    totssentries = 0   
0039:    totpaid = 0
0040:    tot2ndpaid = 0   
0041:    totmade = 0
0042:    tot2ndmade = 0
0043: %>
0044: <html>
0045: 
0046: <head>
0047: <title>March Madness - Standings</title>
0048: <link href="mm.css" rel="stylesheet" type="text/css">
0049: <script language="JavaScript" type="text/javascript">
0050: 		function deleteNode(id)	{
0051: 			if (!confirm("Are you sure you want to delete this entry?"))	{
0052: 				return;
0053: 			}
0054: 			window.location = "mmEntryDelete.asp?id="+id;
0055: 		}
0056: 	</script>
0057: </head>
0058: 
0059: <body bgcolor="#ffffff">
0060: <% If user = "jt@folga.org" Then %>
0061: 
0062: <table cellspacing="1" border="0" cellpadding="0" width="95%" align="center" height="53">
0063: <% Else %>
0064:   <tr>
0065:     <td><table cellspacing="1" border="0" cellpadding="0" width="55%" align="center"
0066:     height="53">
0067: <% End If %>
0068:       <tr>
0069:         <td width="100%" height="6" colspan="8"><p align="center"><font face="Arial" size="2"><img
0070:         src="images/clear.gif" width="1" height="4">Click on column heading to change
0071:         sort&nbsp;&nbsp;&nbsp;
0072: 		<% If user = "jt@folga.org" Then %>
0073: 		<a href="whoisdeadbeat.asp">Dead Beats</a> |
0074: 		<a href="whoisin.asp">Everyone</a>  |  
0075: 		<a href="whodidpaypal.asp">Who Used PayPal</a>
0076: 		<% End If %><img
0077:         src="images/clear.gif" width="1" height="4"></font></td>
0078:       </tr>
0079:       <tr>
0080:         <td width="30"></td>
0081:         <td width="90"><img src="images/clear.gif" width="1" height="2"></td>
0082:         <td width="110"><img src="images/clear.gif" width="1" height="2"></td>
0083:         <td width="130"><img src="images/clear.gif" width="1" height="2"></td>
0084:         <td width="40"><img src="images/clear.gif" width="1" height="2"></td>
0085:         <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0086: <% If user = "jt@folga.org" Then %>
0087:         <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0088:         <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0089:         <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0090:         <td width="180"><img src="images/clear.gif" width="1" height="2"></td>
0091:         <td width="50"><img src="images/clear.gif" width="1" height="2"></td>
0092:         <td width="50"><img src="images/clear.gif" width="1" height="2"></td>
0093: <% End If %>
0094:       </tr>
0095:       <tr bgcolor="#577fbe">
0096:         <td class="small" align="center" height="19"></td>
0097:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=Name<%= DBOption %>"
0098:         class="smallUndl">Last Name</a></td>
0099:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=FirstName<%= DBOption %>"
0100:         class="smallUndl">First Name</a></td>
0101:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=City<%= DBOption %>"
0102:         class="smallUndl">City</a></td>
0103:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=State<%= DBOption %>"
0104:         class="smallUndl">St</a></td>
0105:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=NumEntries<%= DBOption %>"
0106:         class="smallUndl">Entries</a></td>
0107: <% If user = "jt@folga.org" Then %>
0108:         <td class="small" align="center" height="19">Made</td>
0109:         <td class="small" align="center" height="19">Paid</td>
0110: <% End If %>        
0111: <% If reg2ndopen = "YES" or user = "jt@folga.org" Then %>
0112:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=Num2ndEntries<%= DBOption %>"
0113:         class="smallUndl">S16</a></td>
0114: <% End If %>
0115: <% If user = "jt@folga.org" Then %>
0116:         <td class="small" align="center" height="19">S16M</td>
0117:         <td class="small" align="center" height="19">SSPd</td>
0118:         <td class="small" align="left" height="19"><a href="whoisin.asp?sort=EmailAddress<%= DBOption %>"
0119:         class="smallUndl">Email Address</a></td>
0120:         <td class="small" align="center" height="19"><a href="whoisin.asp?sort=ID<%= DBOption %>"
0121:         class="smallUndl">ID</a></td>
0122: <% End If %>
0123: <%	bgcolor = "#e8e8e8"
0124: 		Do Until rs.EOF
0125: 		emailaddr = rs("EmailAddress").value
0126: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0127: 	sqlString = "SELECT * FROM mmPicks " & _
0128: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0129: 							"AND Season = " & season & " " & _
0130: 							"AND Complete = 'Yes'"
0131: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0132: 	
0133: 	
0134: 
0135: 	totPicksMade = rsPicks.RecordCount
0136:     rsPicks.Close
0137: 	set rsPicks = Nothing
0138: 	
0139: 			Set rsSSPicks = Server.CreateObject("ADODB.Recordset")
0140: 	sqlString = "SELECT * FROM mm2ndPicks " & _
0141: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0142: 							"AND Season = " & season & " " & _
0143: 							"AND Complete = 'Yes'"
0144: 	rsSSPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0145: 	
0146: 	
0147: 
0148: 	totSSPicksMade = rsSSPicks.RecordCount
0149:     rsSSPicks.Close
0150: 	set rsSSPicks = Nothing	
0151: 		
0152: 			If bgcolor = "#D8D8D8" Then
0153: 				bgcolor = "#ffffff"
0154: 			Else
0155: 				bgcolor = "#D8D8D8"
0156: 			End If
0157: 			val = rs("NumEntries").Value
0158: 			val2nd = rs("Num2ndEntries").Value			
0159: 			paid = rs("PaidEntries").Value
0160: 			If paid <> "" Then totpaid = totpaid + CInt(paid)
0161: 			paid2nd = rs("Paid2ndEntries").Value
0162: 			If paid2nd <> "" Then tot2ndpaid = tot2ndpaid + CInt(paid2nd)
0163: 			If val > 0 Then
0164: 			totreg = totreg + 1
0165: 			End If
0166: 			totmade = totmade + totPicksMade
0167: 			tot2ndmade = tot2ndmade + totSSPicksMade
0168: 	%>
0169:       </tr>
0170:       <tr bgcolor="<%= bgcolor %>">
0171: <% If user = "jt@folga.org" Then %>
0172:         <td class="smalldark" align="center" height="13"><a href="editmmEntries.asp?id=<%= rs("ID").Value %>&DB=<%= Deadbeat %>"><%= totreg %></a>
0173: <% Else %>
0174:      <td class="smalldark" align="center" height="13"><%= totreg %>
0175: <% End If %>
0176: </td>
0177:         <td class="smalldark" align="left" height="13"><%= rs("Name").Value %>
0178: </td>
0179:         <td class="smalldark" align="left" height="13"><%= rs("FirstName").Value %>
0180: </td>
0181:         <td class="smalldark" align="left" height="13"><%= rs("City").Value %>
0182: </td>
0183:         <td class="smalldark" align="left" height="13"><%= rs("State").Value %>
0184: </td>
0185:         <td class="smalldark" align="center" height="13"><%= val %>
0186: </td>
0187: <% If user = "jt@folga.org" Then %>
0188:         <td class="smalldark" align="center" height="13"><%= totPicksMade %>
0189: </td>
0190:        
0191:         <td class="smalldark" align="center" height="13"><%= paid %>
0192: </td>
0193:       
0194: <% End If %>
0195: <% If reg2ndopen = "YES" or user = "jt@folga.org" Then  %>
0196:         <td class="smalldark" align="center" height="13"><%= val2nd %>
0197: </td>
0198: <% End If %>
0199: <% If user = "jt@folga.org" Then %>
0200: 
0201:         <td class="smalldark" align="center" height="13"><%= totSSPicksMade %>
0202: </td>
0203:         <td class="smalldark" align="center" height="13"><%= paid2nd %>
0204: </td>
0205:         <td class="smalldark" align="left" height="13"><a href="mailto:<%= emailaddr %>"><%= emailaddr %></a></td>
0206:         <td class="smalldark" align="left" height="13">
0207: <a href="editmmEntries.asp?id=<%= rs("ID").Value %>&DB=<%= DeadBeat %>" class="smallblueUndl"><%= rs("ID").Value %></a></td>
0208:         <td class="smalldark" align="left" height="13"><%= rs("GroupName").Value %>
0209: </td>
0210:         <td class="smalldark" align="center"><a
0211:         href="javascript:deleteNode('<%= rs("ID").Value %>')" class="smallblueUndl">Del</a></td>
0212: <% End If %>
0213:       </tr>
0214: <%	   totentries = totentries + val
0215:        totssentries = totssentries + val2nd
0216:       rs.MoveNext
0217: 		Loop
0218: 		If bgcolor = "#e8e8e8" Then
0219: 				bgcolor = "#ffffff"
0220: 			Else
0221: 				bgcolor = "#e8e8e8"
0222: 			End If
0223: 
0224: 		rs.Close
0225: 		Set rs = Nothing	%>
0226: 		<tr> </tr>
0227: 		<tr><td></td><td></td><td></td><td></td><td></td><td class="smalldark" align="left" height="13"><p align="center"><%= totentries %></td>
0228:   <% If user = "jt@folga.org" Then %>
0229:         <td class="smalldark" align="center" height="13"><% = totmade %></td>
0230:         <td class="smalldark" align="center" height="13"><% = totpaid %></td>
0231: <% End If %>
0232: 		 <% If reg2ndopen = "YES" or user = "jt@folga.org" Then %>
0233:         <td class="smalldark" align="center" height="13"><%= totssentries %></td>
0234:    <% End If %>        
0235: <% If user = "jt@folga.org" Then %>
0236:         <td class="smalldark" align="center" height="13"><% = tot2ndmade %></td>
0237:         <td class="smalldark" align="center" height="13"><% = tot2ndpaid %></td>
0238: <% End If %>
0239: 		 </table>
0240: 
0241:     </td>
0242:   </tr>
0243: </table>
0244: </body>
0245: </html>