<%@LANGUAGE="VBSCRIPT"%> <% '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Spd E-Letter v4 ' © 2001, 2002 PensaWorks, inc. ' For help with this program, please visit http://www.pensaworks.com '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim Access : Access = "User" Dim Nav3 : Nav3 = "2" %> <% set rsLists = mlConn.Execute("SELECT * FROM ML_Lists ORDER BY ListName ASC") if (rsLists.EOF) then response.redirect "message.asp?msg=34" totalRecords = 0 if (request("SL") <> "" AND IsNumeric(request("SL"))) then SL = request("SL") else SL = 1 if (request("Email") <> "") then Email = trim(request("Email")) else Email = "" Email = Replace(Email,"*","%") if (request("Name") <> "") then SName = trim(request("Name")) else SName = "" SName = Replace(SName,"*","%") if (request("format") <> "") then Format = request("Format") else format = "" if (Format = "0") then Format = "%" if (request("NumResults") <> "" AND IsNumeric(request("numresults"))) then numResults = CInt(request("NumResults")) else numResults = 25 if (request("subStatus") <> "" AND IsNumeric(request("subStatus"))) then subStatus = CInt(request("subStatus")) else subStatus = 1 if (request("sortName") <> "" AND IsNumeric(request("sortName"))) then SN = CStr(request("sortName")) else SN = "0" if (request("sortOrder") <> "") then SO = request("sortOrder") else SO = "ASC" if SN = "5" then sortName = "ML_Lists.Listname" else if SN = "4" then sortName = "ML_Subscribers.SubscribedDate" else if SN = "3" then sortName = "ML_Subscribers.Format" else if SN = "2" then sortName = "ML_Subscribers.Email" else if SN = "1" then sortName = "ML_Subscribers.Name" else sortName = "SubscriberID" if (request("sqlReads") <> "" and IsNumeric(request("sqlReads"))) then sqlReads = CStr(request("sqlReads")) else sqlReads = "2" if (request("sqlClicks") <> "" and IsNumeric(request("sqlClicks"))) then sqlClicks = CStr(request("sqlClicks")) else sqlClicks = "2" if (request("sqlBounces") <> "" and IsNumeric(request("sqlBounces"))) then sqlBounces = CStr(request("sqlBounces")) else sqlBounces = "2" if (request("sqlReplies") <> "" and IsNumeric(request("sqlReplies"))) then sqlReplies = CStr(request("sqlReplies")) else sqlReplies = "2" if (IsNumeric(request("numReads"))) then numReads = Abs(CInt(request("numReads"))) else numReads = 0 if (IsNumeric(request("numClicks"))) then numClicks = Abs(CInt(request("numClicks"))) else numClicks = 0 if (IsNumeric(request("numBounces"))) then numBounces = Abs(CInt(request("numBounces"))) else numBounces = 0 if (IsNumeric(request("numReplies"))) then numReplies = Abs(CInt(request("numReplies"))) else numReplies = 0 if sqlReads = "4" then sqlReadsOperator = "<>" else if sqlReads = "3" then sqlReadsOperator = "<=" else if sqlReads = "1" then sqlReadsOperator = "=" else sqlReadsOperator = ">=" if sqlClicks = "4" then sqlClicksOperator = "<>" else if sqlClicks = "3" then sqlClicksOperator = "<=" else if sqlClicks = "1" then sqlClicksOperator = "=" else sqlClicksOperator = ">=" if sqlBounces = "4" then sqlBouncesOperator = "<>" else if sqlBounces = "3" then sqlBouncesOperator = "<=" else if sqlBounces = "1" then sqlBouncesOperator = "=" else sqlBouncesOperator = ">=" if sqlReplies = "4" then sqlRepliesOperator = "<>" else if sqlReplies = "3" then sqlRepliesOperator = "<=" else if sqlReplies = "1" then sqlRepliesOperator = "=" else sqlRepliesOperator = ">=" NumSub = 0 TimeNow = Now numLists = 0 whereClause = "" if SL = 2 then useStr = 2 for each item in request("ListID") if IsNumeric(item) then if allowedList(listID, allowedLists) then numLists = numLists + 1 listArray = listArray & item & "," if whereClause = "" then whereClause = whereClause & "ML_Subscribers.ListID = " & item else whereClause = whereClause & " OR ML_Subscribers.ListID = " & item end if end if end if next else whereClause = listWhere(allowedLists, "ML_Subscribers.") end if listArray = split(listArray, ",") if (numLists = 0) then useStr = 1 : SL = 1 : whereClause = listWhere(allowedLists, "ML_Subscribers.") strSQL = "" if (Email <> "") then strSQL = strSQL & " AND ML_Subscribers.Email LIKE '" & Email & "' " if (SName <> "") then strSQL = strSQL & " AND ML_Subscribers.Name LIKE '" & SName & "' " strSQL = strSQL & " AND ML_Subscribers.Format LIKE '" & Format & "' " strSQL = strSQL & " AND numReads " & sqlReadsOperator & " " & numReads & " " strSQL = strSQL & " AND numClicks " & sqlClicksOperator & " " & numClicks & " " strSQL = strSQL & " AND numBounces " & sqlBouncesOperator & " " & numBounces & " " strSQL = strSQL & " AND numReplies " & sqlRepliesOperator & " " & numReplies & " " if (subStatus = 2) then strSQL = strSQL & " AND subRemoved <> 1 " if (subStatus = 3) then strSQL = strSQL & " AND subRemoved = 1 " if (whereClause <> "") then strSQL = strSQL & " AND " & whereClause & " " strSQL1 = "SELECT * FROM ML_Subscribers INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Subscribers.ListID WHERE ML_Subscribers.Email <> '' " & strSQL & " ORDER BY " & sortName & " " & SO strSQL2 = "SELECT COUNT(*) AS cnt1 FROM ML_Subscribers WHERE ML_Subscribers.Email <> '' " & strSQL set rsSearch = mlConn.Execute(strSQL1) set cntRecords = mlConn.Execute(strSQL2) totalRecords = cntRecords("cnt1") : set cntRecords = nothing %> <%=ListName%> - Spd E-Letter Administration

Search Subscribers

This search is very specific. Please use * as a wildcard character to increase matches of your search.

Search Filters
Name:
">
Email Address:
">
Subscriber Format:
Status:
Number of Clicks:
Number of Reads:
Number of Bounces:
Number of Replies:
Sort By:
Show X Results:
List(s):
> Search All Lists
> Search Selected Lists
      <% while (NOT rsLists.EOF) if allowedList(rsLists("listID"), allowedLists) then %> "<% for i = 0 to UBound(listArray) if (CStr(listArray(i)) = CStr(rsLists("ListID"))) then response.write " CHECKED" next %>> <%=rsLists("ListName")%>
<% end if rsLists.MoveNext wend %>
<% if rsSearch.EOF then %> <% else while ((numSub < numResults) AND (NOT rsSearch.EOF)) NumSub = NumSub + 1 subDate = getDateFromNum(rsSearch("SubscribedDate")) subDays = DateDiff("d", subDate, TimeNow) Format = whichFormat(rsSearch("Format")) subRemoved = rsSearch("subRemoved") %> <% rsSearch.MoveNext() wend end If %> <% if NumSub > 0 then %> <% end if %>
Found <%=totalRecords%> Records. Showing the top <%=numResults%> Results.
# HELP! Name HELP! Email Address HELP! Format HELP! Subscribed HELP! List Name  Action

No records found for your search parameters.
">  <%=NumSub%>    <% if subRemoved = 1 then %> <%=rsSearch("Name")%> <% else %> <%=rsSearch("Name")%> <% end if %>   <% if subRemoved = 1 then %> <%=rsSearch("Email")%> <% else %> <%=rsSearch("Email")%> <% end if %>   <% if subRemoved = 1 then %> <%=Format%> <% else %> <%=Format%> <% end if %>   <% if subRemoved = 1 then %> <%=subDays%> days | <%=subDate%> <% else %> <%=subDays%> days | <%=subDate%> <% end if %>   <% if subRemoved = 1 then %> <%=rsSearch("Listname")%> <% else %> <%=rsSearch("Listname")%> <% end if %>    

<% set rsLists = nothing set rsSearch = nothing %>