<% set rs=server.createobject("ADODB.Recordset") if request.form("verwijder") = "Delete" then rs.open "Berichten",strCon ,adOpenStatic,adLockOptimistic,adCmdTable rs.filter=makefilter("bericht_id",request.form) rs.movefirst if trim(makefilter("bericht_id",request.form)) <> "" then do while not rs.eof rs.Delete rs.movenext loop end if rs.close response.redirect "berichten.asp" End if %> Beheer berichten

Beheer berichten

<% sorteren=request("sorteren") if sorteren="" then SQL="select bericht_id, naam, email, website, bericht, datum from berichten order by datum DESC, bericht_id DESC" else SQL="select bericht_id, naam, email, website, bericht, datum from berichten order by " & sorteren end if showblank=" " shownull=" " 'set objCon=server.createobject("adodb.connection") 'objCon.open strCon 'set objRec=objCon.execute(SQL) set objRec = server.createobject("adodb.recordset") objRec.open SQL,strCon, adopenkeyset, adlockoptimistic If objRec.eof then response.write "Geen berichten gevonden!
" response.write "
Terug" Call SluitAlles response.end end if If request.querystring("id") = "" or request.form("action") = "del" Then response.write(" ") Else idedit=request.querystring("id") response.write("Het record NR "&idedit&" is gewijzigd


") End if AlleData=objRec.getrows Call SluitAlles %> Gesorteerd op: <%= sorteren %>
<% AantalRijen=ubound(AlleData,2) FOR RijTeller= 0 TO AantalRijen iberichtID = AlleData(0, RijTeller) sNaam = AlleData(1, RijTeller) if trim(sNaam) = "" then sNaam = " " sNaam = left(sNaam, 15) sEmail = AlleData(2, RijTeller) if trim(sEmail) = "" then sEmail = " " sEmail = left(sEmail, 15) sWebsite = AlleData(3, RijTeller) sWebsite = left(sWebsite, 15) if trim(sWebsite) = "" OR trim(sWebsite) = "http://" then swebsite = " " sBericht = AlleData(4, RijTeller) if len(sBericht) > 150 then sBericht = left(sBericht, 150) & "..." end if sBericht = Replace(sBericht, "[:)]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:student:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:happybirthday:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:smilies:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:greenbiggrin:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:greenrolleyes:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:shy:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:baby:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:oh:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:finger:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:animbaby:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:greenrolleyes:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:madashell:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:inlove:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:razz:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:angel:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:read:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:walk:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:smoker:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:sad:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[;)]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:disgust:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:mad:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:drunk:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:D]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:afro:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:bigmouth:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:banghead:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:cat:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:bored:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:x]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:hat:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:crazy:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:dunce:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:eyepop:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:(]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:boo:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:hug:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:hyper:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:innocent:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:jester:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:king:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:queen:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:knight:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:prin:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:lily:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:medusa:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:monkey:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:prop:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:rose:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:smoke:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:skull:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:finger:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:tired:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:tomb:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:vamp:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:yell:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:yuck:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:zombie:]", "", 1, -1, 1) sBericht = Replace(sBericht, "[:z:]", "", 1, -1, 1) sDatum = AlleData(5, RijTeller) %> <% NEXT %>
Edit Delete ID Datum Naam Email website bericht
Edit <%=iberichtID%> <%=sDatum%> <%= sNaam %> <%= sEmail%> <%= swebsite%> <%= sBericht%>
Klik op delete om de geselecteerde records te verwijderen!

Terug <% ' ************* Het verwijderen van de onderstaande informatie is niet toegestaan!!!********************** response.write "

" response.write "Powered by Madness.nl

" ' ******************************************************************************************************** %> <% SUB SluitAlles objRec.close set objRec=nothing 'objCon.close set objCon=nothing END SUB function makefilter(veldnaam,invoer) dim filtervalue, elem filtervalue="" for each elem in invoer if invoer(elem)="on" then if len(filtervalue)=0 then filtervalue=veldnaam&"="&elem else filtervalue=filtervalue&" or "&veldnaam&"="&elem response.write filtervalue end if end if next makefilter=filtervalue end function %>