%
opendb()
if id <> 0 then
zeigearchiv(id)
else
rem **** Übersichtsseite
set dy = con.execute("SELECT * from NEWSLETTER where not datsend is null and intInaktiv=0")
call interndesigntop()
while not dy.eof
%>
<%
dy.movenext
wend
closedb()
call interndesignbottom()
rem *** ÜBersichtsseite fertig
end if
rem *** Newsletter anzeige aus Archiv
sub zeigearchiv(pid)
set dy = con.execute("SELECT * from NEWSLETTER where intInaktiv=0 and intNewsletterID=" & pid)
'Kein Newsletter
if dy.eof then
response.write("Error - keine Daten gefunden !")
response.flush
response.end
end if
'schon versendet ?
if isnull(dy.fields("datSend")) then
response.write("Newsletter wurde noch nicht versendet !")
response.flush
response.end
end if
rem *** NEWSLETTER LAYOUT AUS DB HOLEN
dim HTMLstrLayoutTop, HTMLstrLayoutBottom, HTMLstrContentIndex, HTMLstrContentText, HTMLstrPersonal, HTMLstrSignOff, HTMLstrTitel
dim datsend, usersend, Empfangcount
HTMLstrTitel = dy.fields("strTitel")
HTMLstrLayoutTop = dy.fields("strLayoutTop")
HTMLstrContentIndex = dy.fields("strContentIndex")
HTMLstrContentText = dy.fields("strContentText")
HTMLstrPersonal = dy.fields("strPersonal")
HTMLstrSignOff = dy.fields("strSignOff")
HTMLstrLayoutBottom = dy.fields("strLayoutBottom")
Empfangcount = dy.fields("intEmpfangcount")
datsend = dy.fields("datsend")
usersend = dy.fields("struser")
set dy = Nothing ' Newsletter komplett in Variablen
'################################################ ANZEIGE AUS DB ZUSAMMENSTELLEN
DIM HTMLMAILBODY : HTMLMAILBODY = ""
'TOP
HTMLMAILBODY = HTMLMAILBODY & HTMLstrLayoutTop
' PERSONAL
HTMLMAILBODY = HTMLMAILBODY & preparetext(personalize(HTMLstrPersonal, "Anrede", "Nachname"))
'INDEX AND CONTENT
HTMLMAILBODY = HTMLMAILBODY & HTMLstrContentIndex
HTMLMAILBODY = HTMLMAILBODY & HTMLstrContentText
' SIGN OFF
HTMLMAILBODY = HTMLMAILBODY & preparetext(personalize(HTMLstrSignOff, globalAbmeldelink & "2345678abc",""))
'BOTTOM
HTMLMAILBODY = HTMLMAILBODY & HTMLstrLayoutBottom
HTMLMAILBODY = HTMLMAILBODY & ""
response.write(HTMLMAILBODY)
response.write("")
response.end
end sub
function preparetext(byval strtext)
strtext = replace(strtext, chr(13) & chr(10), " ")
preparetext = inserthyperlinks2(strtext)
end function
function personalize(byval strtext, byval feld1, feld2)
'sollten besser ein feld3 einführen
if isnull(feld1) then feld1=" "
if isnull(feld2) then feld2=" "
strtext = replace(strtext, "<#ANREDE#>", feld1)
strtext = replace(strtext, "<#NACHNAME#>", feld2)
strtext = replace(strtext, "<#SIGNOFF#>", feld1)
personalize = strtext
end function
sub internDesignTop()
%>
Archiv - Newsletter Schwärzler Hotels
Newsletter Archiv
<%
end sub
sub interndesignBottom()
%>
Bei Fragen wenden Sie sich bitte an:
Schwärzler Management, P.O.Box 730, Feldkircherstrasse 15, FL-9494 Schaan
Telefon +423 2332023, Fax +423 2332024, office@s-management.li