%@ Language=VBScript %> <% gebruiker_id = Request.Cookies("gebruiker_id") if gebruiker_id = "" then Response.Cookies("gebruiker_id") = Session.SessionID Response.Cookies("gebruiker_id").Expires = DateAdd("yyyy", 1, Now()) end if set wammes = Server.CreateObject("ADODB.Connection") wammes.Open "DSN=wammes" toevoeg_id = Request.QueryString("toevoeg_id") if toevoeg_id <> "" then checkbestel = "select count(id) as aantal from bestellingen where bestel_id = 0 and artikel_id = " & toevoeg_id & " and gebruiker_id = '" & gebruiker_id & "'" set checkbestel_output = server.createobject("ADODB.Recordset") checkbestel_output.open checkbestel,wammes,cursor_type,lock_type if checkbestel_output("aantal") = 0 then updatebestel = "insert into bestellingen (artikel_id, gebruiker_id, aantal) values (" & toevoeg_id & ",'" & gebruiker_id & "',1)" wammes.Execute(updatebestel) updatebestel = empty end if checkbestel_output.close set checkbestel_output = nothing %><% end if Set reklametekst = server.createobject("ADODB.Recordset") reklametekst.open "select * from config where type = 'Reklametekst' order by nummer",wammes,cursor_type,lock_type Set artikel = server.createobject("ADODB.Recordset") artikel.open "select * from artikelen where reklame = 1",wammes,cursor_type,lock_type %>
<% if artikel.EOF = true then %>