%
Dim invoer, email, emailadres
invoer = request("invoer")
email = request("email")
emailadres = request("emailadres")
if email = "aan" AND emailadres = "" then
fout = 1
end if
Set objCon = Server.CreateObject ("ADODB.Connection")
objCon.Open strCon
%>
Wijzig e-mail instellingen
<% 'Invoeren van de gegevens in de tabel
if invoer = "ja" AND fout <> 1 then
SQL = "SELECT email, emailadres FROM instellingen WHERE instelling_id = 1"
Set objData = Server.CreateObject ("ADODB.Recordset")
objData.CursorType = 2
objData.LockType = 3
objData.Open SQL,objCon
if email = "aan" then
objData.Fields("email") = True
objData.Fields("emailadres") = emailadres
elseif email = "uit" then
objData.Fields("email") = False
if emailadres <> "" then
objData.Fields("emailadres") = emailadres
end if
end if
objData.Update
objData.Requery
objData.close
Set objData = Nothing
objCon.close
set objCon = nothing
response.redirect "email.asp"
response.end
end if
%>
<%
if fout <> 1 then
SQL = "SELECT email, emailadres FROM instellingen WHERE instelling_id = 1"
Set objData = Server.CreateObject ("ADODB.Recordset")
objData.Open SQL, objCon, 3
email = objData("email")
emailadres = objData("emailadres")
objdata.close
set objdate=nothing
objCon.close
set objCon = nothing
else
email = email
emailadres = emailadres
end if
%>