% ' De variabelen van het sBericht Dim aAlleData, sNaam, sEmail, sWebsite, sBericht, sDatum, iLeeg, sTekst, sNaamveld ' Opvragen startpositie Dim iStart, iOffset iStart = Request("Start") iOffset = Request("Offset") 'controle op posities if Not IsNumeric(iStart) or Len(iStart) = 0 then iStart = 0 else iStart = CInt(iStart) end if if Not IsNumeric(iOffset) or Len(iOffset) = 0 then iOffset = iAantalPP else iOffset = Cint(iOffset) end if sSQL = "SELECT * FROM Berichten ORDER BY Datum DESC, Bericht_id DESC" ' Maak een serverobject aan voor de connectie (ObjectConnectie -> objCon) Set objCon = Server.CreateObject ( "ADODB.Connection" ) objCon.open strCon 'Maak een recordset aan met de gegevens uit de database. Dim objRec set objRec=objCon.execute(sSQL) ' Als er geen gegevens in de database staan geeft dit dan aan. if objRec.eof then ileeg = 1 Call SluitAlles end if if ileeg <> 1 then ' Nu halen we alle records uit de database en zetten ze in aAlleData aAlleData=objRec.getrows Call SluitAlles end if %>
" else ' Tel het aantal rijen. Dim iAantalRijen, iRijTeller, iStop iAantalRijen=ubound(aAlleData,2) If iAantalRijen > (iOffset + iStart) Then iStop = iOffset + iStart - 1 Else iStop = iAantalRijen End If ' Loop door de rijen heen. FOR iRijTeller = iStart to iStop ' Zet de waarden uit uit de database in de variabelen. sNaam = aAlleData(1,iRijTeller) sEmail = aAlleData(2,iRijTeller) sWebsite = aAlleData(3,iRijTeller) sBericht = aAlleData(4,iRijTeller) sDatum = aAlleData(5,iRijTeller) if blnSmileys = True then ' Verander de smileys in plaatjes. 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) end if ' Als er geen sNaam ingevult is, maak er Anoniem van. if trim(sNaam) = "" OR isnull(sNaam) OR trim(sEmail) = chr(13) then sNaam = "Anoniem" end if ' Kijk of er een e-mailadres is ingevuld en als dat er is maar er een link van. if trim(sEmail) = "" OR isnull(sEmail) OR trim(sEmail) = chr(13) then sNaamveld = sNaam else if isEmail(sEmail)= true then sNaamveld = nospam(sEmail,sNaam) else sNaamveld = sNaam end if end if ' Kijk of er iets is ingevult voor sWebsite if trim(sWebsite) = "" OR trim(sWebsite) = "http://" then sWebsite = "-" else sTekst = sWebsite if len(sTekst) > 34 then sTekst = left(sTekst,34) sTekst = sTekst & "..." end if sWebsite = "" & sTekst & "" end if %>
|
<% ' ************* Het verwijderen van de onderstaande informatie is niet toegestaan!!!********************** response.write "
" response.write "Powered by Madness.nl
" ' ******************************************************************************************************** %>