<% Dim objFile, objStream Const ForReading=1, ForWriting=2 ' Make sure you change the following to your servers virtual path ' Lets open the file and read the information before we write and change it Set objFile = Server.CreateObject("Scripting.FileSystemObject") Set objStream = objFile.OpenTextFile(Server.MapPath("/") & "\counters\digital\counter1.txt", ForReading, True) strUsrCount = objStream.ReadLine strLastTime = objStream.ReadLine ' Now we have the old count, lets get the new data and ready it for writing strCurCount = strUsrCount + 1 strCurVisit = Now() TotalDigits = Len(strCurCount) ' Now lets take the new data and open the file and write it Set objStream = objFile.OpenTextFile(Server.MapPath("/") & "\counters\digital\counter1.txt", ForWriting, True) objStream.WriteLine strCurCount objStream.WriteLine strCurVisit ' Close the file and tidy up a bit objStream.Close Set objStream = Nothing Set objFile = Nothing %>

icon.jpg (6214 bytes)
HOSPITALITY
DESIGN GROUP
INCORPORATED

ARCHITECTURE

INTERIOR DESIGN

FOODSERVICE DESIGN

4035 Naco Perrin Blvd, Suite 200E

San Antonio, TX 78217-2530

TEL: (210) 831-3580

info@
hospitalitydesigngroup.com


Request info/send feedback

<%for I = 1 to TotalDigits Step 1%>
Webmaster
�2009 Hospitality Design Group, Inc.