<% '============================================================================= ' Counter Incrementer 1.0 ' Created by Carl Mercier (carl@steelwave.com) 1999-2000 ' ' This is e-mailware. If you like this code, just send me a e-mail! ' If you don't like it or know some way to improve it, also e-mail me! ' '============================================================================= ' Declare our variables Dim objFSO, objCountFile ' object vars for FSO and File Dim strCountFileName ' filename of counter text file Dim iCount ' count variable dim DayNow, MonthNow, YearNow ' will be used when constructing the filenames ' Format all date parts to 2 digits (1/1/2000 ---> 01/01/00). if len(day(date)) = 2 then DayNow = day(date) else DayNow = "0" & day(date) if len(month(date)) = 2 then MonthNow = month(date) else MonthNow = "0" & month(date) YearNow = mid(year(date),3,2) ' . MAIN counter file . . . . . . . . . . . . . . . . . . . . . . . . . . . ' ' The MAIN counter file is basically a plain counter. ' ' This file contains the number of visits which is incremented ' everytime you run this ASP. ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ' ' >>>>>> Modify the file path if needed ------------------------ ' '/' instead of '\' is OK! Don't change it. ' strCountFileName = Server.MapPath("/statsres/counter.txt") ' ' -------------------------------------------------------------- Set objFSO = Server.CreateObject("Scripting.FileSystemObject") ' Open the file (1 = ForReading, True = Create) Set objCountFile = objFSO.OpenTextFile(strCountFileName, 1, True) ' Read the current value of the counter If Not objCountFile.AtEndOfStream Then iCount = CLng(objCountFile.ReadAll) Else ' If no file exists or it's empty start at 0 iCount = 0 End If ' Close the file and destroy the object objCountFile.Close Set objCountFile = Nothing ' Increment the count iCount = iCount + 1 ' Overwrite existing file and get a text stream to new one Set objCountFile = objFSO.CreateTextFile(strCountFileName, True) ' Write updated count objCountFile.Write iCount ' Close the file and destroy the object objCountFile.Close Set objCountFile = Nothing Set objFSO = Nothing ' . TODAY's counter file . . . . . . . . . . . . . . . . . . . . . . . . . . ' ' This file contains the number of visits for TODAY. It is pretty much the ' same code as the main counter file. ' Filename format: [yymmdd].txt (May 1st, 2k = 000501.txt) ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ' ' >>>>>> Modify the file path if needed ------------------------ ' Be sure to NOT specify a file name. You should use the same path ' as the main counter file but without 'counter.asp'. '/' instead of ' '\' is OK! Don't change it. ' strCountFileName = Server.MapPath("/statsres/" & yearnow & monthnow & daynow & ".txt") ' ' -------------------------------------------------------------- Set objFSO = Server.CreateObject("Scripting.FileSystemObject") ' Open the file (1 = ForReading, True = Create) Set objCountFile = objFSO.OpenTextFile(strCountFileName, 1, True) ' Read the current value of the counter If Not objCountFile.AtEndOfStream Then iCount = CLng(objCountFile.ReadAll) Else ' If no file exists or it's empty start at 0 iCount = 0 End If ' Close the file and destroy the object objCountFile.Close Set objCountFile = Nothing ' Increment the count iCount = iCount + 1 ' Overwrite existing file and get a text stream to new one Set objCountFile = objFSO.CreateTextFile(strCountFileName, True) ' Write updated count objCountFile.Write iCount ' Close the file and destroy the object objCountFile.Close Set objCountFile = Nothing Set objFSO = Nothing %> HI-TEK Racing Results

2001
Connecticut Race Results

Select the race results you wish to view


      

wwwhitek.gif (2531 bytes)