Count Lines in Pages

Contents of Page: whoismyrefs.asp Number of Lines: 157 Last Modified: 8/22/2018 1:33:27 PM
0001: <% @Language = "VBScript" %>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: 
0006: <%
0007: 		user = Request.Cookies("user")
0008: 	yr = Request.QueryString("yr")
0009: 	If yr = "" Then yr = season
0010:    	sortStr = Request.QueryString("sort")
0011: 	If sortStr = "" Then sortStr = "Name"
0012: 	Select Case sortStr
0013: 		Case "FirstName,City,State,EmailAddress"
0014: 			sortStr = sortStr 
0015: 		Case "NumEntries"
0016: 			sortStr = sortStr & " DESC "			
0017: 	End Select
0018: 
0019: 
0020: 	Set rs = Server.CreateObject("ADODB.Recordset")
0021: 	sqlString = "SELECT * FROM mmEntries " & _
0022: 			"WHERE Season = " & yr & " "& _
0023: 			"AND RefBy = '" & user & "' " &_
0024: 			"ORDER BY " & sortStr
0025: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0026: 	totreg = 0
0027:    totentries = 0
0028:    totpaid = 0
0029:    totmade = 0
0030: %>
0031: 
0032: <html>
0033: 
0034: <head>
0035: 	<title>March Madness - My referrals</title>
0036: 	<link href="mm.css" rel="stylesheet" type="text/css">
0037: 
0038: </head>
0039: 
0040: <body bgcolor="#ffffff">
0041: 
0042: <table cellspacing="1" border="0" cellpadding="0" width="600" align="center" height="53">
0043:   <tr>
0044: 		<td width="600" height="6" colspan="8">
0045:           <p align="center"><font face="Arial">You will get an 
0046: 			additional <font color="#FF0000"><i><b>free</b></i></font> entry after 10 or 
0047: 			more people you invite sign up and enter your email address in the &quot;<i><b>Invited By</b></i>&quot; field.</font><font face="Arial" size="2"><br>
0048: 			<img src="images/clear.gif" width="1" height="4">(Click
0049:           on column heading to change sort)&nbsp;<img src="images/clear.gif" width="1" height="4"></font></p>
0050:         </td>
0051:   </tr>
0052:     <td width="30"></td>
0053:   <td width="110"><img src="images/clear.gif" width="1" height="2"></td>
0054: 		<td width="90"><img src="images/clear.gif" width="1" height="2"></td>
0055: 		<td width="150"><img src="images/clear.gif" width="1" height="2"></td>		
0056: 		<td width="40"><img src="images/clear.gif" width="1" height="2"></td>
0057: 		<td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0058: 		<% If user = "joe@lusogolf.org" Then %>		
0059: 		<td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0060: 		<td width="180"><img src="images/clear.gif" width="1" height="2"></td>
0061:                 <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0062: 		<td width="50"><img src="images/clear.gif" width="1" height="2"></td>
0063: <% End If %>
0064: 
0065: 	<tr bgcolor="#577fbe">
0066: 	    <td class="small" align="center" height="19">  </td>
0067: 		<td class="small" align="center" height="19"><a href="whoismyref.asp?sort=Name" class="smallUndl">Last Name</a></td>
0068: 		<td class="small" align="center" height="19"><a href="whoismyref.asp?sort=FirstName" class="smallUndl">First Name</a></td>
0069: 		<td class="small" align="center" height="19"><a href="whoismyref.asp?sort=City" class="smallUndl">City</a></td>
0070: 		<td class="small" align="center" height="19"><a href="whoismyref.asp?sort=State" class="smallUndl">St</a></td>
0071: 		<td class="small" align="center" height="19"><a href="whoismyref.asp?sort=NumEntries" class="smallUndl">Entries</a></td>
0072: <% If user = "joe@lusogolf.org" Then %>	
0073: 		<td class="small" align="center" height="19">Made</a></td>
0074: <td class="small" align="left" height="19"><a href="whoismyref.asp?sort=EmailAddress" class="smallUndl">Email Address</a></td>
0075: <% End If %>		
0076: 		
0077: <%	bgcolor = "#e8e8e8"
0078: 		Do Until rs.EOF
0079: 		emailaddr = rs("EmailAddress").value
0080: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0081: 	sqlString = "SELECT * FROM mmPicks " & _
0082: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0083: 							"AND Season = " & season & " " & _
0084: 							"AND Complete = 'Yes'"
0085: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0086: 	
0087: 	
0088: 
0089: 	totPicksMade = rsPicks.RecordCount
0090:     rsPicks.Close
0091: 	set rsPicks = Nothing
0092: 		
0093: 			If bgcolor = "#e8e8e8" Then
0094: 				bgcolor = "#ffffff"
0095: 			Else
0096: 				bgcolor = "#e8e8e8"
0097: 			End If
0098: 			val = rs("NumEntries").Value
0099: 			paid = rs("PaidEntries").Value
0100: 			If paid <> "" Then totpaid = totpaid + CInt(paid)
0101: 			totreg = totreg + 1
0102: 			totmade = totmade + totPicksMade
0103: 	%>
0104: 
0105: 	<tr bgcolor="<%= bgcolor %>">
0106: 	    <td class="smalldark" align="center" height="13"><%= totreg %> </td>
0107: 		<td class="smalldark" align="left" height="13"><%= rs("Name").Value %> </td>
0108: 		<td  class="smalldark" align="left" height="13"><%= rs("FirstName").Value %> </td>
0109: 		<td  class="smalldark" align="left" height="13"><%= rs("City").Value %></td>
0110: 		<td  class="smalldark" align="left" height="13"><%= rs("State").Value %></td>
0111: 		<td  class="smalldark" align="center" height="13"><%= val %></td>
0112: 		<% If user = "joe@lusogolf.org" Then %>
0113: 			<td  class="smalldark" align="center" height="13"><%= totPicksMade %></td>
0114: 				<td  class="smalldark" align="left" height="13"><a href="mailto:<%= emailaddr %>"><%= emailaddr %></a></td>
0115: 		<td  class="smalldark" align="center" height="13"><%= paid %></td>
0116: 		<td  class="smalldark" align="left" height="13"><a href="editmmEntries.asp?id=<%= rs("ID").Value %>" class="smallblueUndl"><%= rs("ID").Value %></a></td>
0117: 	<td  class="smalldark" align="left" height="13"><%= rs("GroupName").Value %></td>	
0118: 	<% End If %>		
0119: 	</tr>
0120: <%	   totentries = totentries + val
0121: 
0122:       rs.MoveNext
0123: 		Loop
0124: 		If bgcolor = "#e8e8e8" Then
0125: 				bgcolor = "#ffffff"
0126: 			Else
0127: 				bgcolor = "#e8e8e8"
0128: 			End If
0129: 
0130: 		rs.Close
0131: 		Set rs = Nothing	%>
0132: 	<tr bgcolor="<%= bgcolor %>">
0133: 		<td class="smalldark" align="left" colspan="2" height="13"> Total
0134:           Registered: <%= totreg %> </td>
0135: 		<td class="smalldark" align="left" colspan="3" height="13">
0136:           <p align="right">Total Entries:</td>
0137: 		<td class="smalldark" align="center" height="13"><% = totentries %></td>
0138: 				<% If user = "joe@lusogolf.org" Then %>
0139: 						<td class="smalldark" align="center" height="13"><% = totmade %></td>
0140: 	<td class="smalldark" align="left" height="13">
0141:           <p align="right">Paid Entries:</td>
0142: 
0143: 									<td class="smalldark" align="center" colspan="2" height="13"><% = totpaid %></td>
0144: 			<% End If %>
0145: 	</tr>
0146: </table>
0147: </body>
0148: </html>
0149: 
0150: 
0151: 
0152: 
0153: 
0154: 
0155: 
0156: 
0157: