<%
Option Explicit
Dim conn
Dim RSHits
Dim TheMessage
Dim StartDate
Dim EndDate
If Not IsEmpty(Request.Form("DisplayReport")) Then
  set conn = server.createobject ("adodb.connection")
  conn.open "EmpDir", "sa", "twoje_haslo"
  set RSHits = conn.Execute("select Count(ReferralID) as TheCount " _
    & "from Referrals " _
    & "where UserName = '" & Request.Form("UserName") & "' " _
    & "and HitDate >= '" & Request.Form("StartDate") & "' " _
    & "and HitDate <= '" & Request.Form("EndDate") & "' ")
  TheMessage = " W tym okresie zarejestrowano" _
    & RSHits("TheCount") & " klikni."
else
  TheMessage ="Wprowad nazw uytkownika oraz graniczne daty, dla" _
    & "dla ktrego chcesz pozna liczb klikni."
End If
StartDate = "1/1/" & Year(Date)
EndDate = Date
%>  
