<% if Session("statmentor_date1") = "" OR Session("statmentor_date2") = "" then Response.Redirect "Selectperiod_2.asp" end if If Session("houseviewlogin") = "" OR Session("houseviewpass") = "" OR Session("houseviewgroup") = "" then Response.Redirect "login.asp" End If Dim sortdata sortdata= Session("houseviewBanner") groupingdata = Session("houseviewgroup") if Request.Form("btndoit") = "Get Info" then Function GetFormattedDate( dDate ) Dim sMonth, sDay sMonth = DatePart( "m", dDate) If Len(sMonth) = 1 Then sMonth = "0" & sMonth End If sDay = DatePart( "d", dDate) If Len(sDay) = 1 Then sDay = "0" & sDay End If GetFormattedDate = DatePart( "yyyy", dDate ) & sMonth & sDay End Function %> <%=strtitle%>
<%=straddress%> <%=strtitle%> Stats
Currently Logged in: <%=Session("houseviewlogin")%> of <%=Session("houseviewAgency")%>
Banner Hits Selected period
From: <% If Session("statmentor_date1")<> "" Then Response.Write Session("statmentor_date1") End If%>
To: <% If Session("statmentor_date2")<> "" Then Response.Write Session("statmentor_date2") End If%>

<% if trim(sortdata) <> "" then on error resume next newurl = Trim(sortdata) strurl = Replace(Mid(newurl,8,Len(newurl)),".","") tempname = Len(strurl) - 3 strurl = Left(strurl,tempname) End if Set fs = CreateObject("Scripting.FileSystemObject") If fs.FileExists(Server.MapPath ("/ctrfiles/ads/clicks/") & "\" & strurl & ".txt") then count = 0 Set a = fs.OpenTextFile(server.MapPath("/ctrfiles/ads/clicks/" & strurl & ".txt"), 1, 0, 0) Do While a.AtEndOfStream <> TRUE strLine = Trim(Server.HTMLEncode(a.ReadLine)) strLine = Split(strLine, "|") if GetFormattedDate(strLine(0)) >= GetFormattedDate(Trim(Session("statmentor_date1"))) AND GetFormattedDate(strLine(0)) =< GetFormattedDate(trim(Session("statmentor_date2"))) then count = count + 1 %> <% end if Loop a.Close Set fs = Nothing else Response.Write("No Active Banner Associated with This Account
") Response.Write("Request for Advertisement here
") Set fs = Nothing Response.End End if %>
<%StatWriteMenu%> <%=sortdata%> Banner Hits from: <%=Session("statmentor_date1")%> To: <%=Session("statmentor_date2")%>
Date Time Reffering Page
<%=strline(0)%> <%=strline(1)%> <%=strline(2)%>
SUM <%=count%>
<% else %>
<%=straddress%> <%=strtitle%> Banner Stats
Currently Logged in: <%=Session("houseviewlogin")%> of <%=Session("houseviewAgency")%>
Pageviews Selected period
From: <% If Session("statmentor_date1")<> "" Then Response.Write Session("statmentor_date1") End If%>
To: <% If Session("statmentor_date2")<> "" Then Response.Write Session("statmentor_date2") End If%>

<%StatWriteMenu%>
">
Click for Banner Hits
(Please click only once!)

Banner Hit Reports will only Generate from Dates Selected
Within the same Year
<%end if %>