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/includes/inc_stats.asp
<%
Sub LogVisit(ByVal intPagnId, ByVal intScreenWidth, ByVal blnFotoVolgordeUpdate)
	'On Error Resume Next
	Dim strSQL, strIpHost, strIpLocal
	strIpHost	 = Request.ServerVariables("REMOTE_HOST")
	strIpLocal = Request.ServerVariables("LOCAL_ADDR")
	strSQL = "UPDATE DD_PAGINAS SET HITS = HITS+1 WHERE ID = " & IntToSQL(intPagnId)
	ExecSQL(strSQL)

	strSQL = "INSERT INTO DD_STATISTIEKEN(datum,pagn_id,screenwidth,ip_host,ind_foto_volgorde_update) " & _
					 "VALUES(Now(), "								& _
					 IntToSQL(intPagnId)							& ", " & _
					 IntToSQL(intScreenWidth)						& ", " & _
					 StrToLSQL(strIpHost,15)						& ", " & _
					 BoolToSql(blnFotoVolgordeUpdate)				& ")" 
	ExecSQL(strSQL)
End Sub

Function getUniekeBezoekers(ByVal dat1, Byval dat2)
  Dim strSql, Rs, strFontColor, strTable, intAantUniekTotaal
  
  txtLog "getUniekeBezoekers(" & dat1 & ","& dat2 & ")" 
  strSql = "select count(ip_host) as DistinctIP from(select distinct ip_host from dd_statistieken  WHERE datum > " & DateToSql(dat1) & " AND datum <= " & DateToSql(dat2) & ")"
  Set Rs = GetRs(strSql)
  If Not Rs.EOF then
    intAantUniekTotaal = SQlToInt(Rs("DistinctIP"))
  End If
  Rs.Close
	
	
  strTable = "<h1>" & intAantUniekTotaal & " unieke bezoekers op " & FormatDateParam(dat1,"dddd, dd mmmm yyyy") & "</h1>"
  'strTable = strTable & "<br/>"
  
  strTable = strTable & "<table class=""clsDefault"" cellpadding=""2"" cellspacing=""1"" ID=""Table1"">"
  strTable = strTable & "<tr>"
  strTable = strTable & "<th align=""left"">Pagina</th>"
  strTable = strTable & "<th align=""right"">unieke bezoekers</th>"
  strTable = strTable & "</tr>"

  
  strSql = "select P.naam, count(S.ip_host) as DistinctIP from(select distinct P.naam, S.ip_host from dd_statistieken S, dd_paginas P WHERE S.pagn_id=P.id AND S.datum > " & DateToSql(dat1) & " AND S.datum <= " & DateToSql(dat2) & ") GROUP BY P.naam ORDER BY COUNT(S.ip_host) DESC"
  Set Rs = GetRs(strSql)
  While Not Rs.EOF 
  If Rs("naam") = "Mobile" or Rs("naam") = "Algemeen" Then
    strFontColor = "green"
  Else  
	strFontColor = "black"
  End If  
	strTable = strTable & "<tr>"
	strTable = strTable & "<td><font color=" & strFontColor & ">" & StrToHTML(Rs("naam")) & "</font></td>"
	strTable = strTable & "<td align=""right""><font color=" & strFontColor & ">" & IntToHTML(Rs("DistinctIP")) & "</font></td>"
	strTable = strTable & "</tr>"
	Rs.MoveNext					
  Wend
  Rs.Close					
  strTable = strTable & "</table>"
  getUniekeBezoekers = strTable
End Function  
%>