Count Lines in Pages

Contents of Page: SendEmailBLTop10.asp Number of Lines: 156 Last Modified: 8/22/2018 1:33:15 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <!-- #include FILE="include/funcs.asp" -->
0005: <%
0006: 	user = Request.Cookies("user")
0007: 	yr = Request.QueryString("yr")
0008:    SendIt = Request.QueryString("Send")
0009:    SendToEmail = Request.QueryString("Email")
0010:    OnlyIncomplete = Request.QueryString("MIA")
0011:    If SendIt <> "YES" Then
0012:      Sendit = "NO"
0013:    End If
0014: 	If yr = "" Then yr = season
0015: 
0016: 
0017: 	Set rs = Server.CreateObject("ADODB.Recordset")
0018: 	sqlString = "SELECT * FROM mmBLTop10" & _
0019: 			" WHERE Season = " & yr & " " & _
0020: 			" ORDER BY ID" 
0021: '   Response.Write(sqlString)			
0022: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0023: 	totreg = 0
0024:    totentries = 0
0025:    totmade = 0
0026: %>
0027: <html>
0028: 
0029: <head>
0030: <title>March Madness - Send Email to Top 10</title>
0031: <link href="mm.css" rel="stylesheet" type="text/css">
0032: </head>
0033: 
0034: <body bgcolor="#ffffff">
0035: <%	bgcolor = "#e8e8e8"
0036: 		Do Until rs.EOF
0037: 		RegNumber = rs("RegNumber").value
0038:        TotalAmt = rs("Top5Amt").Value
0039: 
0040: 			Set rsEntries = Server.CreateObject("ADODB.Recordset")
0041: 			sqlString = "SELECT * FROM mmEntries " & _
0042: 							"WHERE RegNumber = '" & RegNumber & "' " & _
0043: 							"AND Season = " & season & " " 
0044:           IF OnlyIncomplete = "Y" Then
0045:              sqlString = sqlString & "AND Zip = '99999'"
0046:              Response.Write(sqlString & "<br>")
0047:           End If
0048: 			rsEntries.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0049:           If rsEntries.EOF Then
0050: ' Nothing happens
0051:           Else
0052:  			Password = rsEntries("Password").Value
0053: 			EmailAddr = rsEntries("EmailAddress").Value
0054: 	       City = rsEntries("City").Value
0055:  			Address = rsEntries("Address").Value 			
0056:  			State = rsEntries("State").Value
0057:           Zip = rsEntries("Zip").Value
0058:  			FirstName = rsEntries("FirstName").Value
0059:  			Name = rsEntries("Name").Value
0060:  			FullName = FirstName & " " & Name
0061: 
0062: 			val = rsEntries("NumEntries").Value
0063: 			paid = rsEntries("PaidEntries").Value
0064: 			val2 = rsEntries("Num2ndEntries").Value
0065: 			paid2 = rsEntries("Paid2ndEntries").Value
0066: 
0067: 			If val = paid And val2 = paid2 Then
0068: 			ItIsPaid = True
0069: 			Else
0070: 			ItIsPaid = False
0071: 			End If
0072: 
0073:   			rsEntries.Close
0074: 			set rsEntries = Nothing
0075: 		
0076: 			If bgcolor = "#e8e8e8" Then
0077: 				bgcolor = "#ffffff"
0078: 			Else
0079: 				bgcolor = "#e8e8e8"
0080: 			End If
0081: 
0082: 			totreg = totreg + 1
0083: 
0084: 
0085: 	    EmailSubject = "March Madness Contest - Congratulations!"
0086: 	    
0087: 	    Message = "<BR><BR>You have finished in the top 5 in the Biggest Losers contest!<br><br>"
0088: '	    Message = Message & "Your winnings are: $" & TotalAmt & "<br><br>"
0089:         Message = Message & "Please make sure that your name and address below is correct so that we can mail you your winnings."
0090:         Message = Message & "<br><br>Prizes of $50 or more will receive a VISA gift card.  All others will receive a Chevron gas card."
0091:         Message = Message & "<br><br>If the information below NOT correct, you MUST logon to http://www.folga.org/helpkody "
0092:         Message = Message & "and update your information by clicking on the <b>Edit My Profile</b> link.<br>"
0093:       Message = Message & "<br><b>Email Address:</b> " & EmailAddr & "  <b>Password:</b> " & Password
0094:       Message = Message & "<br>         <b>Name:</b> " & FullName
0095:       Message = Message & "<br>      <b>Address:</b> " & Address
0096:       Message = Message & "<br> <b>City St, Zip:</b> " & City & ", " & State & " " & Zip
0097: 
0098: 	    Message = Message & "<br><br>Thank You again for participating and choosing to make a difference."
0099: 	    
0100: 	    Format = "HTML"
0101: 
0102: 
0103:    If SendToEmail <> "" Then
0104:       EMailTo = SendToEmail
0105:       Else
0106:       EMailTo = EmailAddr
0107:       End If
0108: 
0109: 	  Response.Write("<br>========================================")
0110: 	  If ItIsPaid = False Then
0111:         Response.Write(" Not Paid ")
0112:       End If
0113: 	  Response.Write("========================================<br>")
0114: 
0115: 
0116:       EMailBody = "Hi there " & FirstName & ", " &  Message
0117: 
0118:       Response.Write("Email: " & EmailTo & " - " & FullName & "<br>")
0119:       Response.Write("<br>" & EMailBody & "<br><br>")
0120: 
0121: '   objMail.From = "jt@lusogolf.org" 
0122: 
0123: 
0124:      If SendIt = "YES" Then
0125: 
0126:   If ItIsPaid = True Then
0127:         sendEmail EMailTo, "", "", EmailSubject, EmailBody, Format, ""
0128:   End If
0129:   
0130: 
0131:      End If
0132:   
0133: 
0134: 	
0135: 	%>
0136: <%	   End If
0137:       rs.MoveNext
0138: 		Loop
0139: 		If bgcolor = "#e8e8e8" Then
0140: 				bgcolor = "#ffffff"
0141: 			Else
0142: 				bgcolor = "#e8e8e8"
0143: 			End If
0144: 
0145: 		rs.Close
0146: 		Set rs = Nothing	
0147: 
0148:      If SendIt = "YES" Then		
0149: 		%>
0150: 
0151: =======>  Emails Sent! <===========
0152: <% Else %>
0153: <a href="SendEmailBLTop10.asp?Send=YES"><b>Send emails to these people</b>.</a><br><br>
0154: <% End If %>
0155: </body>
0156: </html>