<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/Commoncode.asp"-->
<!--#include file="../checkvalid.asp"-->
<%If Not FRAdminLevel(801) Then Call ErrorMsg()
link=trim(request("link"))%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/style<%=sk%>.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../inc/input.js"></script>
<title>清除系统缓存</title>
</head>
<body>
<table width='100%' border='0' align="center" cellpadding='2' cellspacing='1' class="tableBorder">
  <tr>
    <th height='25'>清除系统缓存</th>
  </tr>
    <tr>
    <td height='25'><%Call RemoveAllCache()%></td>
  </tr>
    <tr>
      <td height='25' align="center"><a href="#" onclick="history.back();">&lt;&lt; 返回</a></td>
    </tr>
</table>
<%if link<>"" then%>
<meta http-equiv=Refresh content='1; URL=<%=link%>'>
<%end if%>
<!--#include file="../inc/copy.asp" -->
</body>
</html>
<%
Sub RemoveAllCache()
    Dim cachelist,i
    Call InnerHtml("UpdateInfo","<b>开始执行清理当前站点缓存</b>：")
    Cachelist=split(GetallCache(),",")
    If UBound(cachelist)>1 Then
        For i=0 to UBound(cachelist)-1
            DelCahe Cachelist(i)
            Call InnerHtml("UpdateInfo","更新 <b>"&cachelist(i)&"</b> 完成")
        Next
        Call InnerHtml("UpdateInfo","更新了"& UBound(cachelist)-1 &"个缓存对象<br>")
    Else
        Call InnerHtml("UpdateInfo","<b>当前站点全部缓存清理完成。</b>。")
    End If
End Sub

Function  GetallCache()
    Dim Cacheobj
    For Each Cacheobj in Application.Contents
        GetallCache = GetallCache & Cacheobj & ","
    Next
End Function

Sub DelCahe(MyCaheName)
    Application.Lock
    Application.Contents.Remove(MyCaheName)
    Application.unLock
End Sub

Sub InnerHtml(obj,msg)
    Response.Write "<li>"&msg&"</li>"
    Response.Flush
End Sub
%>