
12. April 2009






![a_baum[1] a_baum[1]](../assets/images/a_baum_1_.gif)
LIR eV

Neues Gästebuch, da im alten kein Spamfilter war
"
If Not( name = "" ) Then
full = full & "Name: "
End If
If Not( email = "" ) Then
full = full & ""
End If
full = full & name
If Not( email = "" ) Then
full = full & ""
End If
full = full & "
"
If Not( homepage = "" ) Then
full = full & "Homepage: " & homepage & "
"
End If
If Not( city = "" ) Then
full = full & "Stadt: " & city & "
"
End If
If Not( state = "" ) Then
full = full & "Bundesland: " & state & "
"
End If
If Not( country = "" ) Then
full = full & "Land: " & country & "
"
End If
If showtime = true Then
full = full & "Gesendet: " & signed & "
"
End If
full = full & "
" & comment & "
" & vbCr generateComment = full End Function 'adds a comment to the entries file Sub addComment Dim objFS, entries, textstream entries = loadEntries On error resume next Dim newComment newComment = generateComment Set textstream = gbOpenFile( Server.MapPath(gbpath & "entries.dat" ), ForWriting ) If textstream Is Nothing Then raiseFatalError errorWriteDatFile Else textstream.Write newComment textstream.Write entries textstream.Close End If 'Notify the webmaster If notifywebmaster = true Then Dim objCfg, objMail Dim strBody strBody = "Hallo, es wurde ein neuer Eintrag in Ihrem Gästebuch vorgenommen." & vbCrLf & vbCrLf strBody = strBody & "Name: " & CStr(Request.Form("name")) & vbCrLf & "Kommentar: " & CStr(Request.Form("comment")) Set objMail = Server.CreateObject("CDO.Message") Set objCfg = Server.CreateObject("CDO.Configuration") 'Out going SMTP server if smtpip <> "" then objCfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpip end if objCfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objCfg.Fields.Update Set objMail.configuration = objCfg objMail.From = "guestbook" objMail.To = notifyemail objMail.Subject = "Neuer Gästebucheintrag" objMail.HtmlBody = strBody Err.Clear objMail.send Set objMail = Nothing Set objCfg = Nothing End If End Sub 'entry point Dim op op = Request.queryString( "op" ) If (op = "add") Then addComment 'reload this page Response.Redirect Request.ServerVariables( "URL" ) End If Dim entries entries = loadEntries %>