📄 cache.asp
字号:
<%
Class ImplMocomWAPmoManagerCache
Private strHandle
Private fso
Private Sub Class_Initialize()
Set fso = vbsre.mocom.util.com.forName("Scripting.FileSystemObject")
strHandle = Request.QueryString("Handle")
End Sub
Private Sub Class_Terminate()
Set fso = Nothing
End Sub
Public Sub main()
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Call doPost
Else
Call doGet
End If
End Sub
Private Sub doPost()
Select Case LCase(strHandle)
Case "remove"
Call doPostRemove
Case Else
End Select
End Sub
Private Sub doPostRemove()
Response.Charset = "utf-8"
Select Case LCase(Request.Form("Name"))
Case "index"
Call RemoveCacheX
MyIO.Echo "OK"
Case "staple"
Call doRemoveStaple
MyIO.Echo "OK"
Case "content"
Call doRemoveContent
MyIO.Echo "OK"
Case Else
Echo "未知操作"
End Select
End Sub
Private Sub doRemoveStaple()
Dim lngId
lngId = atol(Request.Form("Id"))
If lngId <= 0 Then
Dim objParent, objFolder
Set objParent = fso.GetFolder(getMapPath("cache"))
For Each objFolder In objParent.SubFolders
If LCase(Left(objFolder.Name, 6)) = "staple" Then
RemoveCacheY Mid(objFolder.Name, 7)
End If
Next
Else
RemoveCacheY lngId
End If
End Sub
Private Sub doRemoveContent()
Dim lngId
lngId = atol(Request.Form("Id"))
If lngId <= 0 Then
doRemoveAllContent getMapPath("cache")
Else
RemoveCacheZ lngId, atol(Request.Form("Time")), atol(Request.Form("Follow"))
End If
End Sub
Private Sub doRemoveAllContent(ByVal strPath)
Dim objParent, objFolder
Dim objFile
Set objParent = fso.GetFolder(strPath)
For Each objFolder In objParent.SubFolders
doRemoveAllContent strPath & "\" & objFolder.Name
Next
For Each objFile In objParent.Files
If LCase(Left(objFile.Name, 6)) = "index_" Then
fso.DeleteFile strPath & "\" & objFile.Name
End If
Next
End Sub
Public Function newInstance()
Set newInstance = New ImplMocomWAPmoManagerCache
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -