< %
Function IsCookiesOpen()
Dim ClientIP, URL, QueryString, IsNew
Application.Lock
If Session(“SessionID")=Session.SessionID Then
IsCookiesOpen = True
ClearApp
Exit Function
End If
IsNew = False
If Session(“SessionID") = Empty Then
CurrentIP =Request.ServerVariables
(“REMOTE_ADDR")
If CurrentIP <> Application(“IP") Then
ClearApp
IsNew = True
End If
End If
If Not IsNew And Application(“Visit") >= 1 Then
IsCookiesOpen = False
ClearApp
Exit Function
End If
Application(“Visit") = Application(“Visit") + 1
Application(“IP") =Request.ServerVariables
(“REMOTE_ADDR")
Session(“SessionID") = Session.SessionID
URL =“_page_=”&Request.ServerVariables
(“PATH_INFO")
QueryString=Request.ServerVariables
(“QUERY_STRING")
If Len(QueryString) > 0 Then URL = URL & “&" & QueryString
If Not Response.IsClientConnected Then ClearApp
End Function
Sub ClearApp()
Application(“Visit") = 0
Application(“IP") = “"
End Sub
% >