%
Response.Buffer = True
Dim accessDB, strCon
accessDB=server.mappath("gastenboek.mdb")
' accessDB="d:\www\database\gastenboek.mdb"
strCon="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strCon=strCon & accessDB & ";"
Dim objCon
Set objCon = Server.CreateObject ("ADODB.Connection")
objCon.Open strCon
Dim sSQL
sSQL = "SELECT * FROM instellingen where instelling_id = 1"
Dim objData
Set objData = Server.CreateObject ("ADODB.Recordset")
objData.Open sSQL, objCon, 3
Dim sLettertype, sTekstkleur, sLinkkleur, sHoverkleur, sAchtergrondkleur, sAfbeelding, sBalkkleur, blnSmileys, blnAnoniem, blnEmailYN, sEmailadres, sPlaatskleur, iAantalPP
sLettertype = objData("lettertype")
sTekstkleur = objData("tekstkleur")
sLinkkleur = objData("linkkleur")
sHoverkleur = objData("hoverkleur")
sAchtergrondkleur = objData("achtergrondkleur")
sAfbeelding = objData("afbeelding")
sBalkkleur = objData("balkkleur")
blnSmileys = objData("smileys")
blnAnoniem = objData("anoniem")
blnEmailYN = objData("email")
sEmailadres = objData("emailadres")
sPlaatskleur = objData("plaatskleur")
iAantalPP = cInt(objData("aantalPP"))
objData.close
set objData=nothing
objCon.close
set objCon = nothing
%>
<%
' Anti-spam function for diplaying e-mail
' Copyright 2003 (c) Ramon Siem A Joe
' E-mail: ramon@madness.nl
' Website: http://www.madness.nl
' Call the function with :
' response.write nospam("ramon@madness.nl","")
function nospam(strEmail, strText)
dim i, strEmailEncoded
for i = 1 to Len(strEmail)
strEmailEncoded = strEmailEncoded & "" & asc(Mid(strEmail, i, 1)) & ";"
next
if trim(strText) = "" then
strText = strEmailEncoded
end if
strMailPart = split(strEmailEncoded,"@",-1,1)
nospam = ""
end function
function IsEmail(strEmail)
Dim strTemp
strEmail = CStr(strEmail)
if Not InStr(strEmail, "@") > 0 Then
IsEmail = False
Exit function
End if
if Not InStr(strEmail, ".") > 0 Then
IsEmail = False
Exit function
End if
if Not Len(Left(strEmail, Instr(strEmail, "@") - 1)) => 3 Then
IsEmail = False
Exit function
End if
strTemp = Mid(strEmail, InStr(strEmail, "@") + 1, Len(strEmail))
if Not Len(Left(strTemp, InStr(strTemp, ".") - 1)) => 3 Then
IsEmail = False
Exit function
End if
if Not Len(Right(strTemp, Len(strTemp) - Instr(strTemp, "."))) => 2 Then
IsEmail = False
Exit function
End if
IsEmail = True
End function
function LinkURLs(ByRef asContent)
Dim loRegExp
if asContent = "" Then Exit function
Set loRegExp = New RegExp
loRegExp.Global = True
loRegExp.IgnoreCase = True
' Zoeken naar URls
loRegExp.Pattern = "((ht|f)tps?://\S+[/]?[^\.])([\.]?.*)"
' Link maken van Url
LinkURLs = loRegExp.Replace(asContent, "$1$3")
' Zoeken naar e-mailadressen
loRegExp.Pattern = "(\S+@\S+.\.\S\S\S?)"
' Link maken
LinkURLs = loRegExp.Replace(LinkURLs, "$1")
Set oRegExp = Nothing
End function
%>