%@LANGUAGE="VBSCRIPT"%> <% ' Spd E-Letter v3 ' © 2001 PensaWorks, inc. ' For help with this program, please email JHarris@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" if (session("svListID") <> "") then MLList = CInt(session("svListID")) else MLList = 0 if (request("ListID") <> "") then MLList = CInt(request("ListID")) if not allowedList(MLList, allowedLists) then response.redirect "message.asp?msg=49" if request("ID") <> "" AND IsNumeric(request("ID")) then set rsSubscriber = mlConn.Execute("SELECT * FROM ML_Subscribers Where SubscriberID = " & request("ID")) if NOT rsSubscriber.EOF then MLName = rsSubscriber("Name") MLEmail = rsSubscriber("Email") MLFormat = rsSubscriber("Format") MLListID = rsSubscriber("ListID") if not allowedList(MLListID, allowedLists) then response.redirect "message.asp?msg=49" end if set rsSubscriber = nothing end if if lcase(request("action")) = "addsubscriber" then MLEmail = request("MLEmail") MLName = request("MLName") MLFormat = request("MLFormat") MLOverride = request("MLOverride") if (MLOverride = "Y") then blkOverride = True else blkOverride = False if Trim(MLList) = "" or NOT IsNumeric(MLList) Then msg = 1 else if NOT VerifyEmail(MLEmail) then msg = 2 else if LCase(left(MLFormat,1)) <> "t" and LCase(left(MLFormat,1)) <> "h" then msg = 3 else set lstCheck = mlConn.Execute("SELECT * FROM ML_Lists WHERE ListID = " & MLList) if lstCheck.EOF then msg = 4 else set dupCheck = mlConn.Execute("SELECT * FROM ML_Subscribers WHERE Email = '" & Replace(MLEmail, "'", "''") & "' AND subRemoved <> 1 AND ListID = " & MLList) if NOT dupCheck.EOF then msg = 5 else domain = split(MLEmail, "@") : MLDomain = domain(UBound(domain)) set blockedDomain = mlConn.Execute("SELECT * FROM ML_Blocked WHERE blkType = 0 and blkText = '" & replace(MLDomain, "'", "''") & "'") if NOT blockedDomain.EOF AND (NOT blkOverride) then msg = 8 else if (LCase(left(MLFormat,1)) = "h") then MLFormat = "HTML" else MLFormat = "Text" mlConn.Execute("INSERT INTO ML_Subscribers (Name, Email, Format, ListID, SubscribedDate, numClicks, numReads, numBounces, numReplies, subRemoved, subRemovedDate, subMessageID) VALUES ('" & Replace(MLName, "'", "''") & "','" & Replace(MLEmail, "'", "''") & "','" & MLFormat & "','" & MLList & "'," & cfgDate & ",0,0,0,0,0,0,0)") set getNewSubscriber = mlConn.Execute("SELECT * FROM ML_Subscribers WHERE ListID = " & MLList & " AND Email = '" & replace(MLEmail, "'", "''") & "'") if getNewSubscriber.EOF then msg = 6 else MLSubscriberID = getNewSubscriber("SubscriberID") : msg = 7 : MLList = "" : MLEmail = "" : MLName = "" : MLFormat = "Text" : MLOverride = "" end if end if end if end if end if end if end if end if %>
|
Add Subscriber Search Subscribers | View Subscribers | Import Subscribers
<%
if msg = 1 then
response.write " Invalid List ID"
elseif msg = 2 then
response.write "Invalid Email Address"
elseif msg = 3 then
response.write "Invalid Format"
elseif msg = 4 then
response.write "An invalid List, could not be found"
elseif msg = 5 then
response.write "Email already subscribed to that list"
elseif msg = 6 then
response.write "Subscriber added successfully, but no ID could be found"
elseif msg = 7 then
response.write "Subscriber added successfully."
elseif msg = 8 then
response.write "Blocked Domain"
end If
%>
|
||
|
|