Count Lines in Pages

Contents of Page: mmsendpromoemailpost.asp Number of Lines: 123 Last Modified: 8/22/2018 1:32:57 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <!-- #include FILE="include/funcs.asp" -->
0005: <%
0006: 
0007: 	Subject = Trim(Request.Form("Subject"))
0008: 	FromYearNo = Trim(Request.Form("FromYearNo"))
0009: 	TestEmail = Trim(Request.Form("TestEmail"))	
0010: 	FromEmailAddress = Trim(Request.Form("FromEmailAddress"))	
0011: 	Message = Trim(Request.Form("Message"))
0012: 	StartLetter = LCase(Request.Form("StartLetter"))
0013: 	EndLetter = LCase(Request.Form("EndLetter"))
0014:     TestRun = Trim(Request.Form("TestRun"))	
0015:   PrintCommas = Trim(Request.Form("PrintCommas"))
0016:   PrintVertical = Trim(Request.Form("PrintVertical"))
0017:      MIACurrYear = Trim(Request.Form("MIACurrYear"))
0018: 	
0019:     EMailSubject = Subject
0020:     
0021:     Dim CurrPart(500,2)
0022:     Kount = 0
0023:     count = 0
0024: 
0025:     Format = "TEXT"
0026: 	    Set rsm = Server.CreateObject("ADODB.Recordset")
0027:   
0028: 	    sqlString = "SELECT DISTINCT EmailAddress  FROM mmEntries " & _
0029: 				            "WHERE Season >= " & FromYearNo & " " & _
0030:                           "AND InvalidEmail = False " & _
0031: 							"ORDER BY EmailAddress"
0032: 
0033:    
0034:    
0035:    Response.Write("SqlString = " & sqlString & "<br>")	
0036:  							
0037:    rsm.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0038:    
0039:         Do Until rsm.EOF
0040: 
0041: 
0042:       	EmailAddress = rsm("EmailAddress").Value
0043: 		
0044: 		OKToAdd = "N"
0045: 		If MIACurrYear = "Y" Then
0046: 
0047: 
0048: 			Set rsmx = Server.CreateObject("ADODB.Recordset")
0049:   
0050: 			sqlString = "SELECT EmailAddress  FROM mmEntries " & _
0051: 				            "WHERE Season = " & season & " " & _
0052:                           "AND EmailAddress = '" & EmailAddress & "' "
0053: 
0054:   
0055: 			rsmx.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0056: 			If Rsmx.EOF Then
0057: 				OKToAdd = "Y"
0058: 			End If
0059:    
0060: 			rsmx.Close
0061: 			Set rsmx = Nothing
0062: 		Else
0063: 			OKToAdd = "Y"
0064: 		End If
0065: 
0066:    If OKToAdd = "Y" Then
0067: '    	FirstName = rsm("FirstName").Value
0068: '    	LastName = rsm("LastName").Value
0069:    	 	CurrPart(Kount,0) = EmailAddress
0070:     	CurrPart(Kount,1) = FirstName
0071:     	CurrPart(Kount,2) = LastName
0072:     	Kount = Kount + 1
0073:     End If
0074:      rsm.MoveNext
0075: 	 Loop
0076: 
0077: 		rsm.Close
0078: 		Set rsm = Nothing
0079: 
0080: %>
0081: 
0082: <table width="900"  border="2" cellspacing="2" cellpadding="7">
0083: <tr><td class="norm">
0084: <%
0085: 		
0086: 		LoopCount = 0
0087: 		
0088: 			Do Until LoopCount = Kount
0089: 	EmailAddress = CurrPart(LoopCount,0)
0090:     FirstName = CurrPart(LoopCount,1)
0091:     LastName = CurrPart(LoopCount,2)    
0092:     LoopCount = LoopCount + 1
0093: 
0094: 
0095: 
0096: 
0097:      Response.Write(EmailAddress & ", ")
0098: 
0099:      
0100:      Loop
0101: 
0102: 
0103: 
0104:   
0105: %>
0106: </td>
0107:   </tr>
0108: <tr><td><input size="100" value="<%= EmailSubject %>"></input></td></tr>
0109: <tr><td class="norm">
0110: <textarea rows="15" name="message" cols="100"><%= EmailBody %></textarea></td></tr>
0111: <tr><td>Email Count:<%= Kount %></td></td>
0112: </table>
0113: <%
0114: '     Response.Write("<br>Email Sent to " & count & " participants.<br><br>")
0115: '
0116: '         Response.Write("Subject: " & EmailSubject & "<br>")	
0117: '         Response.Write("Body   : " & EmailBody & "<br>")	
0118: '%>
0119: 
0120: <p><input type="button" value="Go Back" class="norm" onClick="history.back()"
0121: style="float: center"> </p>
0122: </body>
0123: </html>