<!--#include file="admin_conn.asp"-->
<%
chkLogin
dim action,stype
action = be("get","action")
stype = be("get","type")
if isN(stype) then stype= 0 else stype = clng(stype)

Select case action
	case "cls" : cls
	case "upto": update
	case "uptodata": updatedata
	case "uptofile": updatefile
	case "uptoindex": updateindex
	case else : headAdmin "缓存管理" : main
End Select
dispseObj()

sub update
	clsCache
end sub

sub updatedata
	updateCacheFile
end sub

sub updatefile
	if objFile.isFolderExists("../upload/cache/app") then objFile.delFolder("../upload/cache/app")
	if objFile.isFolderExists("../upload/cache/vodlist") then objFile.delFolder("../upload/cache/vodlist")
	if objFile.isFolderExists("../upload/cache/artlist") then objFile.delFolder("../upload/cache/artlist")
	if objFile.isFolderExists("../upload/cache/search") then objFile.delFolder("../upload/cache/search")
end sub

sub updateindex
	if objFile.isFileExists("../index.html") then objFile.delFile("../index.html")
	if objFile.isFileExists("../index.htm") then objFile.delFile("../index.htm")
	
end sub

sub main
%>
<table class="tb">
<%
	dim i,filestr,filearr,filecount,rc
	rc = false
	if stype =0 then
		for each i In Application.Contents
			rc=true
			writeF "<tr><td> " & i &" </td></tr>"
		next
	else
		filestr = objFile.fileItem("../upload/cache/app")
		if filestr <> false then
			rc=true
			writeA "<tr><td> 文件名|大小|时间 </td></tr>"
			filearr = split(filestr,"||")
			filecount = ubound(filearr)
			for i=0 to filecount
				writeF "<tr><td>" & filearr(i) &" </td></tr>"
			next
		end if
	end if
	if rc=false then writeF "<tr><td align=center> 当前系统中没有缓存数据 </td></tr>"
%>
</table>
</body>
</html>
<%
end sub
%>