Count Lines in Pages

Contents of Page: mmwhoismyrefs.asp Number of Lines: 187 Last Modified: 8/22/2018 1:32:58 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <%
0005: 
0006: 	thisemailaddress = Request.QueryString("email")
0007: 		emailaddress = Request.Cookies("user")
0008: If thisemailaddress <> "" Then emailaddress = thisemailaddress
0009:         If emailaddress = "" then
0010: 	    emailaddress = "NotLoggedIn"
0011:         End If
0012: 
0013: 	yr = Request.QueryString("yr")
0014: 	If yr = "" Then yr = season
0015:    	sortStr = Request.QueryString("sort")
0016: 	If sortStr = "" Then sortStr = "Name"
0017: 	Select Case sortStr
0018: 		Case "FirstName,City,State,EmailAddress"
0019: 			sortStr = sortStr 
0020: 		Case "NumEntries"
0021: 			sortStr = sortStr & " DESC "			
0022: 	End Select
0023: 
0024: 
0025: 	Set rs = Server.CreateObject("ADODB.Recordset")
0026: 	sqlString = "SELECT * FROM mmEntries " & _
0027: 			"WHERE Season = " & yr & " "& _
0028: 			"AND RefBy = '" & emailaddress & "' " &_
0029: 			"ORDER BY " & sortStr
0030: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0031: 	totreg = 0
0032:    totentries = 0
0033:    totpaid = 0
0034:    totmade = 0
0035: %>
0036: <html>
0037: 
0038: <head>
0039: <title>March Madness - My referrals</title>
0040: <link href="mm.css" rel="stylesheet" type="text/css">
0041: <script language="JavaScript">
0042: 			function displayHelp2()
0043: 		{
0044: 			x = 650;
0045: 			y = 600;
0046: 			var xpos = 110;
0047: 			var ypos = 20; <% HelpPage = "whatisreferralen.htm" %>
0048: 			var updateasp = "<%= HelpPage %>";
0049: 			var w;
0050: 			w = window.open(updateasp,'update','width='+x+',height='+y+',top='+ypos+',left='+xpos);
0051: 		}	
0052: 	</script>
0053: </head>
0054: 
0055: <body bgcolor="#ffffff">
0056: 
0057: <table cellspacing="1" border="0" cellpadding="0" width="810" align="center" height="53">
0058:   <tr>
0059:     <td width="782" height="6" align="left"><p align="center"><font face="Arial">Win an
0060:     additional <font color="#FF0000"><i><b>free</b></i></font> entry to the Main Contest and
0061:     an additional <font color="#FF0000"><i><b>free</b></i></font> entry in the Sweet 16 simply
0062:     by referring new participants to this contest.</font></p>
0063:     <p align="left"><font face="Arial">You get the 1 <font color="#FF0000"><strong>free</strong></font>
0064:     entry into each contest for <strong>every 5 entries</strong> submitted by new participants
0065:     that you've referred.</font></p>
0066:     <font face="Arial" size="3"><p align="left"></font><font face="Arial" size="2">When
0067:     someone <strong>new</strong> registers, they will be asked to enter an &quot;<strong>Invited
0068:     By Email Address</strong>&quot;. &nbsp;&nbsp;</font><font face="Arial" size="1"> </font><font
0069:     face="Arial" size="2">(Entering your email address in this field, makes their entries
0070:     appear in the report below. <a href="javascript:displayHelp2()">More details on referrals</a>)</p>
0071:     <p align="center"><input type="button" value="Go Back" class="norm"
0072:     onClick="history.back()" style="float: center"></font> </td>
0073:   </tr>
0074: </table>
0075: 
0076: <table cellspacing="1" border="0" cellpadding="0" width="614" align="center" height="53">
0077:   <tr>
0078:     <td class="norm" colspan="6" width="490">Entries that have entered <b><%= emailaddress %></b> in the
0079:     &quot;Invited By&quot; field.</td>
0080:   </tr>
0081:   <tr>
0082:     <td width="116"></td>
0083:     <td width="96"></td>
0084:     <td width="157"></td>
0085:     <td width="43"></td>
0086:     <td width="42"></td>
0087:   </tr>
0088:   <tr bgcolor="#577fbe">
0089:     <td class="small" align="center" height="19" width="116"><a
0090:     href="mmwhoismyref.aspsp?sort=Name" class="smallUndl">Last Name</a></td>
0091:     <td class="small" align="center" height="19" width="96"><a
0092:     href="mmwhoismyref.aspsp?sort=FirstName" class="smallUndl">First Name</a></td>
0093:     <td class="small" align="center" height="19" width="157"><a
0094:     href="mmwhoismyref.aspsp?sort=City" class="smallUndl">City</a></td>
0095:     <td class="small" align="center" height="19" width="43"><a
0096:     href="mmwhoismyref.aspsp?sort=State" class="smallUndl">St</a></td>
0097:     <td class="small" align="center" height="19" width="42"><a
0098:     href="mmwhoismyref.aspsp?sort=NumEntries" class="smallUndl">Referral<br>
0099:     Entries</a></td>
0100: <% If user = "joe@lusogolf.org" Then %>
0101:     <td class="small" align="center" height="19" width="26">Made</td>
0102:     <td class="small" align="left" height="19" width="70"><a
0103:     href="mmwhoismyref.aspsp?sort=EmailAddress" class="smallUndl">Email Address</a></td>
0104: <% End If %>
0105: <%	bgcolor = "#e8e8e8"
0106: 		Do Until rs.EOF
0107: 		emailaddr = rs("EmailAddress").value
0108: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0109: 	sqlString = "SELECT * FROM mmPicks " & _
0110: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0111: 							"AND Season = " & season & " " & _
0112: 							"AND Complete = 'Yes'"
0113: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0114: 	
0115: 	
0116: 
0117: 	totPicksMade = rsPicks.RecordCount
0118:     rsPicks.Close
0119: 	set rsPicks = Nothing
0120: 		
0121: 			If bgcolor = "#e8e8e8" Then
0122: 				bgcolor = "#ffffff"
0123: 			Else
0124: 				bgcolor = "#e8e8e8"
0125: 			End If
0126: 			val = rs("NumEntries").Value
0127: 			paid = rs("PaidEntries").Value
0128: 			If paid <> "" Then totpaid = totpaid + CInt(paid)
0129: 			totreg = totreg + 1
0130: 			totmade = totmade + totPicksMade
0131: 	%>
0132:   </tr>
0133:   <tr bgcolor="<%= bgcolor %>">
0134:     <td class="smalldark" align="left" height="13" width="116"><%= rs("Name").Value %>
0135: </td>
0136:     <td class="smalldark" align="left" height="13" width="96"><%= rs("FirstName").Value %>
0137: </td>
0138:     <td class="smalldark" align="left" height="13" width="157"><%= rs("City").Value %>
0139: </td>
0140:     <td class="smalldark" align="left" height="13" width="43"><%= rs("State").Value %>
0141: </td>
0142:     <td class="smalldark" align="center" height="13" width="42"><%= val %>
0143: </td>
0144: <% If user = "joe@lusogolf.org" Then %>
0145:     <td class="smalldark" align="center" height="13" width="26"><%= totPicksMade %>
0146: </td>
0147:     <td class="smalldark" align="left" height="13" width="70"><a
0148:     href="mailto:<%= emailaddr %>"><%= emailaddr %></a></td>
0149:     <td class="smalldark" align="center" height="13" width="22"><%= paid %>
0150: </td>
0151:     <td class="smalldark" align="left" height="13" width="12"><a
0152:     href="editmmEntries.asp?id=<%= rs("ID").Value %>" class="smallblueUndl"><%= rs("ID").Value %></a></td>
0153:     <td class="smalldark" align="left" height="13" width="10"></td>
0154: <% End If %>
0155:   </tr>
0156: <%	   totentries = totentries + val
0157: 
0158:       rs.MoveNext
0159: 		Loop
0160: 		If bgcolor = "#e8e8e8" Then
0161: 				bgcolor = "#ffffff"
0162: 			Else
0163: 				bgcolor = "#e8e8e8"
0164: 			End If
0165: 
0166: 		rs.Close
0167: 		Set rs = Nothing	%>
0168:   <tr bgcolor="<%= bgcolor %>">
0169:     <td width="116"></td>
0170:     <td class="smalldark" align="left" colspan="3" height="13" width="300"><p align="right">Total:</td>
0171:     <td class="smalldark" align="center" height="13" width="42"><% = totentries %>
0172: </td>
0173: <% If user = "jt@folga.org" Then %>
0174:     <td class="smalldark" align="center" height="13" width="26"><% = totmade %>
0175: </td>
0176:     <td class="smalldark" align="left" height="13" width="70"><p align="right">Paid Entries:</td>
0177:     <td class="smalldark" align="center" colspan="3" height="13" width="34"><% = totpaid %>
0178: </td>
0179: <% End If %>
0180:   </tr>
0181: </table>
0182: 
0183: <p align="center"><strong><font face="Arial"><a
0184: href="mailto:?subject=Invitation to participate in a March Madness Contest&amp;body=Check out the site http://www.folga.org/mm">Click
0185: here to invite friends/colleagues.</a> </font></strong></p>
0186: </body>
0187: </html>