<% Response.Expires = -1 'asp altijd opnieuw van de server laten komen Response.Buffer = true 'asp in een keer laten zien ' ------------------------------------------------------------------------------------------------------------------------------------ ' 25-07-2006 NIEUWBOUW ' ------------------------------------------------------------------------------------------------------------------------------------ if Session("actueleautorisatieniveau") > 1 then ' niets doen else Response.end end if Session("parameterID") = 0 %> <% datum = CDbl(date()) dim toondatum dim totaal totaal = 0 Dim maxaantal maxaantal = 0 Dim uur(24), tijdstip dim grafiekhoogte dim datumsave %> Zoeken ">
<% Response.write "" Response.write "" %>
" & Session("WEBSITEID") & "

<% Response.write "OVERZICHT BEZOEKERS VAN VANDAAG + HISTORIE ""VIA WELKE WEBSITE"" (COMPLEET)

" %>
<% DATABASE_OPEN ' ------------------------------------------ Dim ZetLokaal ZetLokaal = SetLocale("nl") ' ------------------------------------------ totaal = 0 statement = "SELECT bezoekers.tijd, bezoekers.datum FROM bezoekers WHERE remote_ipadres <> '" & Session("EIGEN_IPADRES") & "' AND soortbezoek = 'sitebezoek' AND datum = " & datum & "" ' Response.write statement Set oRs = oConn.Execute(statement) Do while (Not oRs.eof) ' Response.write left(oRs("tijd"), 2) & "
" if oRs("tijd") > " " then if mid(oRs("tijd"), 2, 1) = ":" then tijdstip = left(oRs("tijd"), 1) + 0 else tijdstip = left(oRs("tijd"), 2) + 0 end if uur(tijdstip) = uur(tijdstip) + 1 end if toondatum = oRs("datum") totaal = totaal + 1 oRs.MoveNext Loop oRs.close Set oRs = Nothing DATABASE_CLOSE for tijdstip = 0 to 23 if uur(tijdstip) > maxaantal then maxaantal = uur(tijdstip) next Response.write "Datum: " & toondatum & " - Totaal aantal bezoekers: " & totaal & " - Maximum per uur: " & maxaantal & "

" if maxaantal > 0 then grafiekhoogte = 120 ' aantal pixels maxaantal = grafiekhoogte / maxaantal Response.write "" for tijdstip = 0 to 23 response.write "" next Response.write "" Response.write "

" & tijdstip & "
uur
" end if Response.write "
" DATABASE_OPEN %>
<% Response.write "" Response.write "" statement = "SELECT datum, tijd, naam, emailadres, remote_ipadres, COUNT(naam) AS aantal FROM bezoekers WHERE datum = " & datum & " AND remote_ipadres <> '" & Session("EIGEN_IPADRES") & "' AND resolutie > ' ' AND soortbezoek = 'sitebezoek' AND ( remote_ipadres > ' ' OR naam > ' ' OR emailadres > ' ' ) GROUP BY datum, tijd, naam, emailadres, remote_ipadres ORDER BY datum, tijd DESC, naam, emailadres, remote_ipadres" Set oRs = oConn.Execute(statement) Do while (Not oRs.eof) Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" oRs.MoveNext Loop oRs.close Set oRs = Nothing %>
Bezoekers van vandaag
" if oRs("datum") <> datumsave then Response.write day(oRs("datum")) & "-" & month(oRs("datum")) & "-" & year(oRs("datum")) end if datumsave = oRs("datum") Response.write "" & oRs("tijd") & "" if oRs("naam") > " " then Response.write oRs("naam") else if oRs("emailadres") > " " then Response.write oRs("emailadres") else Response.write oRs("remote_ipadres") end if end if Response.write "

<% Response.write "" Response.write "" Response.write "" %>
Totaal aantal bezoekers
" Response.write "Totaal:" totaal = Session("TOTAALAANTALBEZOEKERS") + 0 Response.write "" & totaal & "

<% Response.write "" Response.write "" statement = "SELECT website, SUM(aantalbezoekers) AS aantal FROM bezoekersreferenties GROUP BY website" Set oRs = oConn.Execute(statement) Do while (Not oRs.eof) Response.write "" oRs.MoveNext Loop oRs.close Set oRs = Nothing %>
Via welke site
" & oRs("website") & "" & oRs("aantal") & "

<% Response.write "" Response.write "" teller = 0 statement = "SELECT bezoekersreferentie, aantalbezoekers FROM bezoekersreferenties ORDER BY datumtijd DESC" Set oRs = oConn.Execute(statement) Do while (Not oRs.eof) AND teller < 50 teller = teller + 1 Response.write "" oRs.MoveNext Loop oRs.close Set oRs = Nothing %>
Via welke URL (laatste 50 bezoekers)
" & oRs("bezoekersreferentie") & "" & oRs("aantalbezoekers") & "

<% DATABASE_CLOSE %>