<% if Session("statmentor_date1") = "" OR Session("statmentor_date2") = "" then Response.Redirect "Selectperiod.asp" end if Dim sortdata sortdata= Request.Form("FILE") 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: <%=sortdata%>
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%>

<% Set fs = CreateObject("Scripting.FileSystemObject") If fs.FileExists(Server.MapPath ("/ctrfiles/ads/clicks/") & "\" & sortdata) then count = 0 Set a = fs.OpenTextFile(server.MapPath("/ctrfiles/ads/clicks/" & sortdata), 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("Error File Not Found
") 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: <%=sortdata%>
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%>

<% Dim strPath,objFSO,objFolder,objItem strPath = "/ctrfiles/ads/Clicks/" Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath(strPath)) %>
<%StatWriteMenu%>
Avail Files:

Click for Banner Hits
(Please click only once!)

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