<%@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" %> <% if (lcase(request.cookies("defNewsletterMode")) = "advanced") then msgMode = "advanced" else msgMode = "regular" if (lcase(request("mode")) <> "") then msgMode = lcase(request("mode")) if (isnumeric(request("msgID")) and request("msgID") <> "") then msgID = CInt(request("msgID")) else msgID = 0 if (msgID = 0) then response.redirect "newsletter_step1.asp?msg=1" set getNewsletter = server.createobject("ADODB.Recordset") getNewsletter.activeconnection = mlConn getNewsletter.source = "SELECT ML_Broadcast.ListID AS msgListID, * FROM ML_Broadcast INNER JOIN ML_Lists ON ML_Broadcast.ListID = ML_Lists.ListID WHERE ML_Broadcast.MessageID = " & msgID getNewsletter.cursortype = 3 getNewsletter.open() if (getNewsletter.EOF) then response.redirect "message.asp?msg=20" msgSubject = getNewsletter("Subject") msgListname = getNewsletter("ListName") msgSource = getNewsletter("msgSource") msgFormat = getNewsletter("msgFormat") msgTemplate = getNewsletter("msgIncludeTemplateHTML") msgText = getNewsletter("HTMLMessage") msgSourceFile = getNewsletter("msgSourceFileHTML") msgSourceURL = getNewsletter("msgSourceURLHTML") msgSourceRun = getNewsletter("msgSourceHTMLTimes") msgSourceFileNew = "" if (msgSourceFile <> "") then msgSourceUse = 1 else msgSourceUse = 2 if lcase(request("action")) = "go" then msgTemplate = request("msgTemplate") msgText = trim(request("EditorValue")) msgSourceFileNew = trim(request("msgSourceFileNew")) msgSourceUse = request("msgSourceUse") msgSourceURL = trim(request("msgSourceURL")) msgSourceRun = request("msgSourceRun") msgFilePath = trim(request("msgFilePath")) select case msgSource case 1 if msgText = "" then msg = 1 else mlConn.Execute("UPDATE ML_Broadcast SET HTMLMessage = '" & replace(msgText, "'", "''") & "', msgIncludeTemplateHTML = " & msgTemplate & " WHERE MessageID = " & msgID) redir = funcRedirect() end if case 2 if cstr(msgSourceUse) = "1" then if NOT doesFileExist(msgSourceFile) then msg = 3 else doIt = updateRec(msgSourceFile) end if end if if cstr(msgSourceUse) = "2" then if NOT doesFileExist(msgSourceFileNew) then msg = 4 else doIt = updateRec(msgSourceFileNew) end if end if function updateRec(msgFile) mlConn.Execute("UPDATE ML_Broadcast SET msgSourceFileHTML = '" & replace(msgFile, "'", "''") & "', msgIncludeTemplateHTML = " & msgTemplate & " WHERE MessageID = " & msgID) redir = funcRedirect() end function case 3 if msgSourceURL = "" then msg = 1 else if NOT (lcase(left(msgSourceURL, 7)) = "http://" or lcase(left(msgSourceURL, 8)) = "https://" or lcase(left(msgSourceURL, 6)) = "ftp://") then msg = 5 else if (instr(1, msgSourceURL, "?") <> 0) then strURL = msgSourceURL & "&subID=0&Format=HTML&Test=true" else strURL = msgSourceURL & "?&subID=0&Format=HTML&Test=true" urlTest = getHTML(strURL, bitResponse) if NOT bitResponse then msg = 2 else mlConn.Execute("UPDATE ML_Broadcast SET msgSourceURLHTML = '" & replace(msgSourceURL, "'", "''") & "', msgIncludeTemplateHTML = " & msgTemplate & ", msgSourceHTMLTimes = " & msgSourceRun & " WHERE MessageID = " & msgID) redir = funcRedirect() end if end if end if end select end if function funcRedirect() if lcase(request("Submit")) = "save & refresh" then response.redirect "newsletter_step5.asp?msgID=" & msgID & "&mode=" & msgMode else response.redirect "newsletter_preview.asp?msgID=" & msgID end if end function if (msgFormat = 2) then redir = funcRedirect() if (msgTemplate <> 1 AND msgTemplate <> 2) then msgTemplate = 1 %> <%=ListName%> - Spd E-Letter Administration

Create Newsletter - Step 5

Click here for a list of standard customation/mail merge tags
New to URL Tracking? Click Here
New to Content Snippets? Click Here

With the Spd E-Letter, you can use a mail merge with your own stored data. Click here for a list of those tags as well as more information. Please be sure to save your work often so that your session does not expire and lose your changes.

<% if msg = 1 then %>

Missing Information. Please complete all fields.

<% elseif msg = 2 then %>

Invalid URL. No information could be retreived from the specified URL.

<% elseif msg = 3 then %>

Existing file is invalid. Please choose a new one.

<% elseif msg = 4 then %>

Please choose a valid new file.

<% elseif msg = 5 then %>

Invalid URL. Must begin with "http://", "https://" or "ftp://">

<% end if %> <% if msgMode = "advanced" AND msgSource = 1 then %>
Start Over / New File  Save Document  Cut   Copy  Paste 
Bullet List  Numbered List  Indent  Outdent  HR 
Link to external site
Help
Bold text  Italic text  Underline text  Align Left Align Center  Align Right 
Subject: <%=msgSubject%>
To List: <%=msgListname%>
Mode: Switch to Regular Mode (changes will be lost)
 
> Yes, include the header and footer for this list
> No, do not include the header and footer for this list

Please be sure to save your data often.

<% else %>
<% if msgSource = 2 then %> <% elseif msgSource = 3 then %> <% else %> <% end if %>
HTML Newsletter Data
Subject:
<%=msgSubject%>
Newsletter Source:
<% if msgSource = 2 then %> From File <% elseif msgSource = 3 then %> Executed Page <% else %> Entered Data <% end if %>
To List:
<%=msgListname%>
Select New File:
<% returnFile = "" getIt = listFiles("txt,html,htm", returnFile, baseDirectory) if returnFile <> "" then msgSourceFileNew = returnFile end if %>
Current File:
<% if msgSourceFile = "" then useCurrent = false msgSourceUse = 2 %> None <% else useCurrent = true %> <%=msgSourceFile%> <% end if %>
New File:
<% if msgSourceFileNew = "" then %> None <% else %> <%=msgSourceFileNew%> <% end if %>
Use:
<% if useCurrent then %> > Current File
<% end if %> > New File
URL:
Execute:
> Execute once at load time
> Execute for each subscriber
Mode:
Switch To Advanced Mode (Requires IE 5.0+) (changes will be lost)
Newsletter Body:
Template:
> Yes, include the header and footer for this list
> No, do not include the header and footer for this list

Please be sure to save your data often.

<% end if %>