|
Main Page
About Us
Products
Projects
Press Bulletin
Join Us
Contact Us
Site Map
Türkçe
<%
IF IsEmpty(Session("TotalCount")) THEN
Call CountThisUser
End IF
SUB CountThisUser()
Dim FSO ' FileSystemObject
Dim TS ' TextStreamObject
Dim strFileName ' Counter text File Name
Dim intOldCount
Dim intNewCount
Dim Create
Create = True
strFileName = Server.MapPath("Counter.txt")
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set TS = FSO.OpenTextFile(strFileName, 1, Create)
IF NOT TS.AtEndOfStream Then
intoldCount = TS.ReadAll
Else
intoldCount = 0
End If
TS.Close
intNewCount = intOldCount + 1
Session("TotalCount")= intNewCount
Set TS = FSO.CreateTextFile(strFileName, Create)
TS.Write intNewCount
TS.Close
Set FSO = Nothing
Set TS = Nothing
End Sub
%>
|