HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RImmers/duitsedog.tk/wwwroot/onderhoud/stats.asp
<%
Option Explicit
%>
<!-- #INCLUDE VIRTUAL="/includes/inc_default.asp" -->
<!-- #INCLUDE VIRTUAL="/includes/inc_auth.asp" -->
<%
Response.Buffer = False
Dim Rs, Rs2, i, intAantBezoekers, intAantUniekeBezoekers, intTot, datLaatsteFotoVolgordeUpdate
Dim timStart, intMS, strTimTotal, intAantUniekePaginaBezoekers, strFontColor, strReferer
timStart = milliDif()
intAantBezoekers = Application("intAantalBezoekers")
Set Rs = GetRs("SELECT COUNT(ip_host) AS aantal FROM dd_statistieken")
intAantUniekeBezoekers = Rs("aantal")
Rs.Close
Set Rs = GetRs("SELECT MAX(datum) AS max_datum FROM dd_statistieken WHERE ind_foto_volgorde_update=1")
datLaatsteFotoVolgordeUpdate = Rs("max_datum")
Rs.Close
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/onderhoud.css">
<META HTTP-EQUIV=Refresh CONTENT="300">
<script language="JavaScript">
		function popupHistory(page_id)
		{
		  w = open("./grafiek.asp?page_id="+page_id,"winLov","Scrollbars=1,resizable=1,width=800,height=500");
		  w.focus();
		}		
	</script>		
</HEAD>
<BODY>
<h1>Beknopte Statistieken</h1>
<table border="0">
	<tr>
		<td>
			<p> 
			<table class="clsDefault" cellpadding="2" cellspacing="1"> 
				<tr><th colspan="2">Algemeen</th></tr>
				<tr><td>Aantal actuele bezoekers</td><td align="right"><%=IntToHTML(intAantBezoekers)%></td></tr>
				<tr><td>Totaal aantal unieke bezoekers sinds juni 2007</td><td align="right"><%=IntToHTML(intAantUniekeBezoekers)%></td></tr>
				<tr><td>Laatste foto update</td><td align="left"><%=FormatDateParam(datLaatsteFotoVolgordeUpdate,"dd-mm-yyyy hh:mm")%></td></tr>
			</table>
			</p>
			<p> 
			<table class="clsDefault" cellpadding="2" cellspacing="1" ID="Table1"> 
				<tr>
					<th>&nbsp;</th>
					<th align="left">Pagina</th>
					<th align="right">Totaal aantal bezoekers</th>
					<th align="right">Aantal unieke bezoekers</th>
				</tr>
				<%
				Set Rs2 = GetRs("SELECT pagn_id,COUNT(ip_host) AS hits FROM dd_statistieken GROUP BY pagn_id ORDER BY pagn_id")
				Set Rs = GetRs("SELECT * FROM dd_paginas ORDER BY id")
				intTot = 0	
				intAantUniekePaginaBezoekers = 0
				While Not Rs.EOF 		
					%>
					<tr>
						<td><a href="javascript:popupHistory(<%=Rs("id")%>)"><img border="0" SRC="../images/icons/stat.gif" WIDTH="20" HEIGHT="18"></a></td>
						<td><%=StrToHTML(Rs("naam"))%></td>
						<td align="right"><%=IntToHTML(Rs("hits"))%></font></td>
						<td align="right"><%=IntToHTML(Rs2("hits"))%></font></td>
					</tr>
					<%		
					intTot = intTot + Rs("hits")
					intAantUniekePaginaBezoekers = intAantUniekePaginaBezoekers + Rs2("hits")
					Rs.MoveNext
					Rs2.MoveNext
				Wend
				Rs.Close	
				Rs2.CLose
				%>
				<tr>
					<td><a href="javascript:popupHistory('')"><img border="0" SRC="../images/icons/stat.gif" WIDTH="20" HEIGHT="18"></a></td>
					<td><b>Totaal</b></td>
					<td align="right"><b><%=IntToHTML(intTot)%></b></td>
					<td align="right"><b><%=IntToHTML(intAantUniekePaginaBezoekers)%></b></td>
				</tr>
			</table>
			</p>
			<p> 
			<h1>Unieke bezoekers laatste 7 dagen</h1>
			<table class="clsDefault" cellpadding="2" cellspacing="1"> 
				<tr>
				  <th>Datum</th>
				  <th>Desktop</th>
				  <th>Mobiel</th>				  
				</tr>
				<%
				For i = 0 to 7
					dim sSql, intAantDesktop, intAantMobiel
					sSql = "SELECT COUNT(*) AS aantal FROM (SELECT DISTINCT (ip_host) FROM dd_statistieken WHERE  pagn_id<>9 AND datum >= " & DateToSql(date-i) & " AND datum <" & DateToSql(date-(i-1)) &")"
					Set Rs = GetRs(sSql)
					intAantDesktop = Rs("aantal")
					Rs.Close
					sSql = "SELECT COUNT(*) AS aantal FROM (SELECT DISTINCT (ip_host) FROM dd_statistieken WHERE  pagn_id=9 AND datum >= " & DateToSql(date-i) & " AND datum <" & DateToSql(date-(i-1)) &")"
					'Response.Write(sSql)
					Set Rs = GetRs(sSql)
					intAantMobiel = Rs("aantal")
					Rs.Close					
					%>
					<tr>
						<td><%=Day_long(date-i)%>&nbsp;<%=FormatDateParam(date-i,"dd-mm-yyyy")%></td>
						<td align="right"><%=IntToHTML(intAantDesktop)%></td>
						<td align="right"><%=IntToHTML(intAantMobiel)%></td>
					</tr>
					<%
				Next
				%>	
			</table>
			</p>
			<p> 
			
			</p>
		</td>
		<td>&nbsp;</td>
		<td valign="top">
			<table class="clsDefault" cellpadding="2" cellspacing="1">
				<tr>
					<th>Laatste 50 bezoekers</th>
					<th>Screenwidth</th>
					<th>IP-adres</th>
					<th>Pagina</th>
				</tr>
				<%
				Set Rs = GetRs("SELECT DD_STATISTIEKEN.datum, DD_STATISTIEKEN.screenwidth, DD_STATISTIEKEN.ip_host, DD_PAGINAS.naam as pagn_naam FROM DD_STATISTIEKEN, DD_PAGINAS WHERE DD_STATISTIEKEN.pagn_id=DD_PAGINAS.id ORDER BY DD_STATISTIEKEN.datum desc")
				i=1
				While Not Rs.EOF And i<50
					%>	
					<tr>
						<td><%=FormatDateParam(Rs("datum"),"dd-mm-yyyy hh:mm")%></td>
						<td><%=Rs("screenwidth")%></td>
						<td><%=Rs("ip_host")%></td>
						<td><%=Rs("pagn_naam")%></td>
					</tr>
					<%
					Rs.MoveNext
					i = i + 1
				Wend
				Rs.Close
				%>
			</table>
		</td>
	</tr>
</table>			
<!--
<p>
Ip-address: <%= Request.ServerVariables("REMOTE_HOST")%><br>
Query time: <%= elapsedshort(milliDif() - timStart)%><br>
Random int: <%=GenerateRandomInteger(100)%><br>
</p>
-->
</div>
</BODY>
</HTML>
<%
Set Rs = Nothing
%>