<%@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" %> <% response.buffer = true server.scripttimeout = 10 mlConn.Execute("UPDATE ML_Subscribers SET SubscribedDate = " & cfgDate & " WHERE SubscribedDate IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET subRemoved = 0 WHERE subRemoved IS NULL") dim numSub, timeNow, listID, SN, SO if (IsNumeric(ViewNumSub)) then NR = ViewNumSub else NR = 25 if (request.cookies("defSubscriberStatus") <> "") then subStatus = CInt(request.cookies("defSubscriberStatus")) else subStatus = 1 if (request("subStatus") <> "" and IsNumeric(request("subStatus"))) then subStatus = CInt(request("subStatus")) if (request("PG") <> "" and IsNumeric(request("PG"))) then PG = CInt(request("PG")) else PG = 1 if (request.cookies("defSubscriberSortName") <> "" AND request.cookies("defSubscriberSortName") <> "None") then SN = request.cookies("defSubscriberSortName") else SN = "SubscriberID" if (request("SN") <> "") then SN = request("SN") if (request.cookies("defSubscriberSortOrder") <> "") then SO = request.cookies("defSubscriberSortOrder") else SO = "ASC" if (request("SO") <> "") then SO = request("SO") if (session("svListID") <> "" AND IsNumeric(session("svListID"))) then ListID = CInt(session("svListID")) else ListID = 0 if (request("ListID") <> "" AND IsNumeric(request("ListID"))) then ListID = CInt(request("ListID")) if ListID = 0 then listWhereClause = listWhere(allowedLists, "ML_Subscribers.") else if not allowedList(listID, allowedLists) then response.redirect "message.asp?msg=49" listWhereClause = " ML_Subscribers.ListID = " & ListID end if if ListID = 0 then strSQL = "SELECT SubscriberID, subRemoved, SubscribedDate, Format, Listname, Email, Name, numClicks, numReads, numBounces, numReplies FROM ML_Subscribers INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Subscribers.ListID WHERE Email <> '' " strSQL2 = "SELECT COUNT(*) AS cnt1 FROM ML_Subscribers INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Subscribers.ListID WHERE Email <> '' " if (subStatus = 2) then strSQL = strSQL & " AND subRemoved = 0 " strSQL2 = strSQL2 & " AND subRemoved = 0 " end if if (subStatus = 3) then strSQL = strSQL & " AND subRemoved = 1 " strSQL2 = strSQL2 & " AND subRemoved = 1 " end if if listWhereClause <> "" then strSQL = strSQL & " AND " & listWhereClause strSQL2 = strSQL2 & " AND " & listWhereClause end if strSQL = strSQL & " ORDER BY " & SN & " " & SO else strSQL = "SELECT * FROM ML_Subscribers INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Subscribers.ListID WHERE ML_Subscribers.ListID = " & ListID strSQL2 = "SELECT COUNT(*) AS cnt1 FROM ML_Subscribers INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Subscribers.ListID WHERE ML_Subscribers.ListID = " & ListID if (subStatus = 2) then strSQL = strSQL & " AND subRemoved = 0 " strSQL2 = strSQL2 & " AND subRemoved = 0 " end if if (subStatus = 3) then strSQL = strSQL & " AND subRemoved = 1 " strSQL2 = strSQL2 & " AND subRemoved = 1 " end if strSQL = strSQL & " ORDER BY " & SN & " " & SO end if set getRecords = mlConn.Execute(strSQL) set cntRecords = mlConn.Execute(strSQL2) if getRecords.EOF then totalRecords = 0 totalPages = 1 else totalRecords = cntRecords("cnt1") : set cntRecords = nothing totalPages = Int(totalRecords / NR) if totalRecords mod NR > 0 then totalPages = totalPages + 1 if PG > 2 then moveRecs = NR * (PG - 1) else moveRecs = 0 if (PG > 1) AND (moveRecs <= totalRecords) then moveRecs = (NR * (PG - 1)) else moveRecs = 0 end if getRecords.Move moveRecs end if numSub = 0 : timeNow = Now : set recCount = nothing %> <%=ListName%> - Spd E-Letter Administration

View Subscribers

Search Subscribers | Add Subscriber | Import Subscribers

<% if request("msg") = "1" then %>

The Subscriber's information has been updated.

<% end if %>
Name:  Email: 

A subscriber that has been unsubscribed will show as bolded and italicized in this list. Use the 'Subscriber Status' dropdown to filter these results and show the records you want to see.

<%If getRecords.EOF Then%> <% else while (NOT getRecords.EOF AND numSub < NR) numSub = numSub + 1 subDate = getDateFromNum(getRecords("SubscribedDate")) subDays = DateDiff("d", subDate, TimeNow) format = whichFormat(getRecords("Format")) subRemoved = getRecords("subRemoved") numClicks = getRecords("numClicks") numReads = getRecords("numReads") numBounces = getRecords("numBounces") numReplies = getRecords("numReplies") Email = getRecords("Email") overTitle = "Quick Stats for " & Email overText = "Total Cicks: " & numClicks & "
Total Reads: " & numReads & "
Total Bounces: " & numBounces & "
Total Replies: " & numReplies %> <% response.flush() getRecords.MoveNext() wend end if %> <% if NumSub >= 1 then %> <% end if %>

Change List

Subscriber Status
<% if (PG > totalPages) then PG = 1 if totalPages > 15 then showExtra = true if PG > 15 then pagesMin = PG - 7 pagesMax = PG + 7 else pagesMin = 1 pagesMax = 15 end if else shoExtra = false pagesMin = 1 pagesMax = totalPages end if %> <% if NOT getRecords.EOF then %> Viewing Page <%=PG%> of <%=TotalPages%>
<% end if if showExtra AND PG <> 1 then %> [First]  <% end if if PG > 1 Then %> [Prev]  <% end if for i = pagesMin to pagesMax %> <%=i%>  <% next if PG < totalPages then %>  [Next] <% if showExtra then %>   [Last]
Jump Directly to Page: <% end if end if %>
Showing <%=NR%> results per page of <%=totalRecords%> Subscribers
#
 Email Address Sort by this Field AscendingSort by this Field Descending  HELP! Name Sort by this Field AscendingSort by this Field Descending  HELP! Format Sort by this Field AscendingSort by this Field Descending  HELP! Subscribed Sort by this Field AscendingSort by this Field Descending  HELP! List Name Sort by this Field AscendingSort by this Field Descending 
 Action

There are no subscribers to this list at this time.
">
<%=NumSub%>
 <% if subRemoved = 1 then %><%=Email%><% else %>" TITLE="Email This Subscriber"><%=getRecords("Email")%><% end if %>  <% if subRemoved = 1 then %>"><%=getRecords("Name")%><% else %>"><%=getRecords("Name")%><% end if %>  <% if subRemoved = 1 then %><%=Format%><% else %><%=Format%><% end if %>  <% if subRemoved = 1 then %><%=SubDays%> days (<% if (IsDate(subDate)) then response.write FormatDateTime(subDate, VBShortDate) else response.write subDate %>)<% else %><%=SubDays%> days (<% if (IsDate(subDate)) then response.write FormatDateTime(subDate, VBShortDate) else response.write subDate %>)<% end if %>  <% if subRemoved = 1 then %><%=getRecords("ListName")%><% else %><%=getRecords("ListName")%><% end if %>    

<% set getRecords = nothing %>