<% on error resume next dim mySQL, conntemp, rstemp 'select all newsletters mySQL="SELECT idnewsletter, name, datesent FROM newsletter WHERE npublic=-1 order by datesent desc" call getfromdatabase(mySQL, rstemp, "htmlarchive1") pidnewsletter=request.querystring("idnewsletter") if pidnewsletter="" then mySQL2="SELECT * FROM newsletter WHERE idnewsletter=(SELECT Max(idnewsletter) from newsletter where npublic=-1)" else mySQL2="SELECT * FROM newsletter WHERE idnewsletter="&pidnewsletter end if call getfromdatabase(mySQL2, rstemp2, "htmlarchive2") if not rstemp2.eof then pidnewsletter = rstemp2("idnewsletter") pidHtmlnewsletter = pidnewsletter pname = rstemp2("name") pbody = rstemp2("body") phtml = rstemp2("html") pdatesent = rstemp2("datesent") end if %>



Please feel free to sign up for our free
Ultra Infiltrant Newsletters.



Our newsletter archive
<% if rstemp.eof then response.write "No newsletters available" else do While NOT rstemp.EOF%> "><%=rstemp("name")%> (<%=rstemp("datesent")%>)
<% rstemp.MoveNext loop end if%> <% if pdemomode="-1" then %>






Notes in demo
Here is a public archive that you can use in your site so visitors can see your newsletters.
Both html and text newsletters are shown here and only the ones that are defined as public. <%end if%>

 

<%=pname%> (<%=pdatesent%>)

<% pbody = replace(pbody,"companyname",pcompany) pbody = replace(pbody,"companyemail",pcompanyemail) if phtml=-1 then pbody = replace(pbody, """","'") pbody = replace(pbody, "Vbcrlf","") pbody = replace(pbody, Chr(8),"") pbody = replace(pbody, Chr(9),"") pbody = replace(pbody, Chr(10),"") pbody = replace(pbody, Chr(13),"") pbody = showhtmldata(pbody) else pbody = "
" & pbody & "
" pbody = companytextdata(pbody) pbody = showtextdata(pbody) end if %> <%=pbody%>