<%@LANGUAGE="VBSCRIPT"%> <% '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Spd E-Letter v4 ' © 2001, 2002 PensaWorks, inc. ' For help with this program, please visit http://www.pensaworks.com '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim Access : Access = "Broadcast" Dim Nav3 : Nav3 = "5" %> <% response.buffer = true 'server.scripttimeout = 5 dim numSub, timeNow, listID, curPage, SN, SO if (IsNumeric(ViewNumSub)) then NR = ViewNumSub else NR = 25 if (request("PG") <> "" and IsNumeric(request("PG"))) then PG = request("PG") else PG = 1 if (request.cookies("defNewsletterSortName") <> "" AND lcase(request.cookies("defNewsletterSortName")) <> "none") then SN = request.cookies("defNewsletterSortName") else SN = "MessageID" if (request("SN") <> "") then SN = request("SN") if (request.cookies("defNewsletterSortOrder") <> "" AND lcase(request.cookies("defNewsletterSortOrder")) <> "none") then SO = request.cookies("defNewsletterSortOrder") else SO = "DESC" if (request("SO") <> "") then SO = request("SO") if (lcase(SO) = "none") then SO = "DESC" 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 (request.cookies("defNewsletterFilter") <> "") then msgStatus = cstr(request.cookies("defNewsletterFilter")) else msgStatus = "1" if (request("msgStatus") <> "") then msgStatus = cstr(request("msgStatus")) if msgStatus = "4" then msgStatusF = "Broadcasted" elseif msgStatus = "3" then msgStatusF = "Broadcasting" elseif msgStatus = "2" then msgStatusF = "Pending" else msgStatusF = "%" end if if ListID = 0 then listWhereClause = listWhere(allowedLists, "ML_Broadcast.") else if not allowedList(listID, allowedLists) then response.redirect "message.asp?msg=49" listWhereClause = "ML_Broadcast.ListID = " & ListID end if if ListID = 0 then strSQL = "SELECT * FROM ML_Broadcast INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Broadcast.ListID WHERE ML_Broadcast.MessageType = 'R' AND Status LIKE '" & msgStatusF & "'" if listWhereClause <> "" then strSQL = strSQL & " AND " & listWhereClause strSQL = strSQL & " ORDER BY " & SN & " " & SO strSQL2 = "SELECT COUNT(*) AS cnt1 FROM ML_Broadcast WHERE MessageType = 'R' AND Status LIKE '" & msgStatusF & "'" if listWhereClause <> "" then strSQL2 = strSQL2 & " AND " & listWhereClause else strSQL = "SELECT * FROM ML_Broadcast INNER JOIN ML_Lists ON ML_Lists.ListID = ML_Broadcast.ListID WHERE ML_Broadcast.MessageType = 'R' AND Status LIKE '" & msgStatusF & "' AND ML_Broadcast.ListID = " & ListID & " ORDER BY " & SN & " " & SO strSQL2 = "SELECT COUNT(*) AS cnt1 FROM ML_Broadcast WHERE MessageType = 'R' AND ListID = " & ListID & " AND Status LIKE '" & msgStatusF & "'" end if set getRecords = Server.CreateObject("ADODB.Recordset") getRecords.ActiveConnection = mlConn getRecords.Source = strSQL getRecords.CursorType = 1 getRecords.LockType = 3 getRecords.Open() set recCount = mlConn.Execute(strSQL2) if getRecords.EOF then totalRecords = 0 totalPages = 1 else totalRecords = recCount("cnt1") : set recCount = 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 %> <%=ListName%> - Spd E-Letter Administration

View Stored Newsletters

Create Newsletter | Create Automated Email | View Automated Emails

<% If NOT getRecords.EOF Then If ListID = "all" Then %> Viewing Stored Newsletters for All Lists <% Else %> Viewing Stored Newsletters for the <%=getRecords("ListName")%> List <% End If End If %>

<% if getRecords.EOF then %> <% else while ((numSub <= NR) AND (NOT getRecords.EOF)) numSub = numSub + 1 mesID = getRecords("MessageID") %> <% getRecords.movenext() wend end if %>

Change List

View Status
<% if NOT getRecords.EOF then %>Page <%=curPage%> of <%=TotalPages%>
<% end if if PG > 1 Then %>[Prev]  <% end if for i = 1 to totalPages %><%=i%>  <% next if PG < totalPages then %> [Next]<% end if %>
Showing <%=NR%> results per page of <%=totalRecords%> Newsletters
 #   ID Sort by this Field AscendingSort by this Field Descending   Subject Sort by this Field AscendingSort by this Field Descending   To List Sort by this Field AscendingSort by this Field Descending   Created Sort by this Field AscendingSort by this Field Descending   Status Sort by this Field AscendingSort by this Field Descending   Scheduled Sort by this Field AscendingSort by this Field Descending   Action

There are no stored newsletters associated with this list at this time.
<%=NumSub%>
<%=getRecords("MessageID")%>  <%=getRecords("Subject")%>  <%=getRecords("ListName")%>  <%=getDateFromNum(getRecords("msgCreatedDate"))%>  <%=getRecords("Status")%>  <% if getRecords("sch") = 1 then%><%=getDateFromNum(getRecords("msgSchDate"))%><% else %>No<% end if %>     

<% set getRecords = nothing %>