📄 delattach.asp
字号:
<%option explicit%>
<!--#include virtual="include/DataEnvi.asp"-->
<%
Dim objDB,strSQL,objRS,ObjFS
Dim StrDelIDs,StrIDs
Dim StrFileName,StrFilePath
Set objDB = server.CreateObject("ADODB.Connection")
Set ObjFS = Server.CreateObject("Scripting.FileSystemObject")
OpenDB objDB
StrIDs = Request.QueryString("IDs")
StrDelIDs = Request.QueryString("DelIDs")
StrIDs = "," & StrIDs & ","
StrIDs = Replace(StrIDs,"," & StrDelIDs & ",",",")
If Len(StrIDs)>3 Then StrIDs = Mid(StrIDs,2,Len(StrIDs)-2)
strSQL = "Select * From t_OA_Attach Where KeyPath In ('" & Replace(StrDelIDs,",","','") & "')"
Set ObjRS = objDB.Execute(Strsql)
While Not ObjRS.Eof
StrFilePath = Server.MapPath ( Application("RootPath") & "OA/Attach/Files/" & ObjRS("BasePath") & "/" & ObjRS("KeyPath") )
If ObjFS.FolderExists(StrFilePath) Then
ObjFS.DeleteFolder StrFilePath,true
End If
ObjRS.MoveNext
Wend
StrSQL = "Delete From t_OA_Attach Where KeyPath In ('" & Replace(StrDelIDs,",","','") & "')"
objDB.Execute(Strsql)
Response.Redirect "AddNew.asp?IDs=" & StrIDs & "&BasePath=" & Request.QueryString("BasePath")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -