<%
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 " " & tijdstip & " | "
next
Response.write "uur | "
Response.write " "
end if
Response.write " "
DATABASE_OPEN
%>
<%
Response.write ""
Response.write "| Bezoekers van vandaag | "
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 "| "
if oRs("datum") <> datumsave then
Response.write day(oRs("datum")) & "-" & month(oRs("datum")) & "-" & year(oRs("datum"))
end if
datumsave = oRs("datum")
Response.write " | "
Response.write "" & oRs("tijd") & " | "
Response.write ""
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 " "
oRs.MoveNext
Loop
oRs.close
Set oRs = Nothing
%>
|
<%
Response.write ""
Response.write "| Totaal aantal bezoekers | "
Response.write "| "
Response.write "Totaal:"
totaal = Session("TOTAALAANTALBEZOEKERS") + 0
Response.write " | " & totaal & " | "
%>
|
<%
Response.write ""
Response.write "| Via welke site | "
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("website") & " | " & oRs("aantal") & " | "
oRs.MoveNext
Loop
oRs.close
Set oRs = Nothing
%>
<%
Response.write ""
Response.write "| Via welke URL (laatste 50 bezoekers) | "
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("bezoekersreferentie") & " | " & oRs("aantalbezoekers") & " | "
oRs.MoveNext
Loop
oRs.close
Set oRs = Nothing
%>
<%
DATABASE_CLOSE
%>
|