<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<%
Response.cachecontrol="no-cache"
Response.addHeader "pragma","no-cache"
Response.expires=-1
Response.expiresAbsolute=now-1
Response.Addheader "Content-Type","text/html; charset=gb2312" 

Call WriteLog()
Call DelCaches()
Response.Write "<script>window.top.location=""/"";</script>"

'清除所有缓存
Public Sub DelCaches()
	On Error Resume Next
	Application.Lock
	Application.Contents.RemoveAll()
	Application.unLock
End Sub

'写入日志文件
Public Sub WriteLog()
	On Error Resume Next
	Dim FSO, F, Content, Path, Data
	If Request.ServerVariables("HTTP_REFERER") <> "" Then
		Data = Request.ServerVariables("HTTP_REFERER")
	Else
		Data = Session("M_ComeUrl")
	End If
	If Data <> "" Then
		Path = Server.MapPath("ErrLog.log")
		Set FSO = Server.CreateObject("Scripting.FileSystemObject")
		If Not FSO.FileExists(Path) Then
			Set F = FSO.CreateTextFile(Path)
			F.Write Now & "     " & Data & vbCrLf
			F.Close
			Set F = Nothing
		Else
			Set F = FSO.OpenTextFile(Path, 8, True)
			F.Write Now & "     " & Data & vbCrLf
			F.Close
			Set F = Nothing
		End If
		Set FSO = Nothing
	End If
	If Err.Number <> 0 Then Err.Clear
End Sub
%>