<%@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" %> <% mlConn.Execute("UPDATE ML_Subscribers SET SubscribedDate = 0 WHERE SubscribedDate IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET numReads = 0 WHERE numReads IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET numBounces = 0 WHERE numBounces IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET numReplies = 0 WHERE numReplies IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET numClicks = 0 WHERE numClicks IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET subRemoved = 0 WHERE subRemoved IS NULL") mlConn.Execute("UPDATE ML_Subscribers SET subMessageID = 0 WHERE subMessageID IS NULL") extraFields = 0 SubscriberID = request("ID") if (request("SubscriberID") <> "") then SubscriberID = request("SubscriberID") if (SubscriberID = "") then response.redirect "message.asp?msg=20" set getRecord = mlConn.Execute("SELECT * FROM ML_Subscribers WHERE SubscriberID = " & SubscriberID) if (getRecord.EOF) then response.redirect "message.asp?msg=20" if not allowedList(getRecord("ListID"), allowedLists) then response.redirect "message.asp?msg=49" subscribedDateNum = getRecord("subscribedDate") subscribedDate = getDateFromNum(subscribedDateNum) listID = getRecord("ListID") subRemoved = getRecord("subRemoved") if (subRemoved = "") then subremoved = 0 subRemovedOriginal = subRemoved subRemovedDateNum = getRecord("subRemovedDate") if len(subRemovedDateNum) = 0 then subRemovedDate = "1/1/1980" elseif len(subRemovedDateNum) = 1 then subRemovedDate = "1/1/1980" else subRemovedDate = getDateFromNum(subRemovedDateNum) end if emailAddress = getRecord("Email") subscriberName = getRecord("Name") format = getRecord("Format") numBounces = getRecord("numBounces") numReplies = getRecord("numReplies") numClicks = getRecord("numClicks") numReads = getRecord("numReads") subMessageID = getRecord("subMessageID") if (subMessageID = "") then subMessageID = 0 if subRemovedOriginal = 0 then subRemovedDate = "" end if if request("action") = "go" then emailAddress = trim(request("EmailAddress")) subscriberName = trim(request("SubscriberName")) format = trim(request("Format")) numBounces = request("numBounces") numReplies = request("numReplies") numClicks = request("numClicks") numReads = request("numReads") listID = request("listID") subscribedDate = request("subscribedDate") subRemovedDate = request("subRemovedDate") subRemoved = request("subRemoved") subMessageID = request("subMessageID") if (NOT IsNumeric(numReads)) then numReads = 0 if (NOT IsNumeric(numClicks)) then numClicks = 0 if (NOT IsNumeric(numBounces)) then numBounces = 0 if (NOT IsNumeric(numReplies)) then numReplies = 0 if (NOT IsNumeric(subMessageID)) then subMessageID = 0 if emailAddress = "" or format = "" or numReplies = "" or numReads = "" or numBounces = "" or numClicks = "" or listID = "" or subscribedDate = "" then msg = 1 else if NOT verifyEmail(emailAddress) then msg = 2 else if numReads < 0 then msg = 3 else if numClicks < 0 then msg = 4 else if numBounces < 0 then msg = 5 else if numRepliess < 0 then msg = 6 else if NOT IsDate(subscribedDate) then msg = 7 else if subRemovedDate <> "" AND NOT IsDate(subRemovedDate) then msg = 8 else set dupCheck = mlConn.Execute("SELECT * FROM ML_Subscribers WHERE Email = '" & replace(emailAddress, "'", "''") & "' AND listID = " & listID & " AND SubscriberID <> " & subscriberID) if NOT dupCheck.EOF then set dupCheck = nothing msg = 9 else set dupCheck = nothing ' go for the update staement... subscribedDateNum = getNumFromDate(subscribeddate) if subRemovedDate = "" then subRemovedDateNum = 0 else subRemovedDateNum = getNumFromDate(subRemovedDate) end if strSQL = "UPDATE ML_Subscribers SET " strSQL = strSQL & "Email = '" & replace(emailAddress, "'", "''") & "', " strSQL = strSQL & "Name = '" &replace(subscriberName, "'", "''") & "', " strSQL = strSQL & "Format = '" & Format & "', " strSQL = strSQL & "ListID = " & listID & ", " strSQL = strSQL & "numClicks = " & numClicks & ", " strSQL = strSQL & "numReads = " & numReads & ", " strSQL = strSQL & "numBounces = " & numBounces & ", " strSQL = strSQL & "numReplies = " & numReplies & ", " strSQL = strSQL & "subscribedDate = " & subscribedDateNum & ", " strSQL = strSQL & "subRemoved = " & subRemoved & ", " strSQL = strSQL & "subRemovedDate = " & subRemovedDateNum & ", " strSQL = strSQL & "subMessageID = " & subMessageID & " " strSQL = strSQL & "WHERE SubscriberID = " & subscriberID mlConn.Execute(strSQL) response.redirect "subscriber_view.asp?msg=1" end if end if end if end if end if end if end if end if end if end if %> <%=ListName%> - Spd E-Letter Administration

Edit Subscriber

<% if msg = 1 then %>

Missing Information. Please complete all fields.

<% elseif msg = 2 then %>

Error: Invalid Email Address

<% elseif msg = 3 then %>

Error: Invalid 'Read Count'.

<% elseif msg = 4 then %>

Error: Invalid 'Click Count'.

<% elseif msg = 5 then %>

Error: Invalid 'Bounce Count'.

<% elseif msg = 6 then %>

Error: Invalid 'Reply Count'.

<% elseif msg = 7 then %>

Error: Invalid 'Subscribed Date'.

<% elseif msg = 8 then %>

Error: Invalid 'Unsubscribe Date'.

<% elseif msg = 9 then %>

Error: This email address is already subscribed to this list. Please choose another list or enter a different email address.

<% end if %>
<% for each item in getRecord.fields itemName = lcase(item.Name) if itemName <> "subscriberid" AND itemName <> "name" AND itemName <> "subscribeddate" AND itemName <> "email" AND itemName <> "format" AND itemName <> "listid" AND itemName <> "numclicks" AND itemName <> "numreads" AND itemName <> "numbounces" AND itemName <> "numreplies" AND itemName <> "subremoved" AND itemName <> "subremoveddate" AND itemName <> "submessageid" then extraFields = extraFields + 1 %> <% end if next if extraFields = 0 then %> <% end if %>
Name:
Email Address:
Format:
> Text > HTML
Subscribed to List:
Subscribed Date:
Total URL Clicks:
Total Newsletter Reads:
Total Newsletter Bounces:
Total Email Replies:
Status:
Unsubscribe Date:
(leave blank if they have not unsubscribed)
Unsubscribe Newsletter ID:

Additional Stored Data
This data is read only. For more info, click here.
<%=item.Name%>:
<%=item%> 
You are not storing any additional data.

<% set getRecord = nothing %>