功能简介:
删除下载、新闻的同时,删除远程存图的图片
补丁下载:
点击浏览该文件
补丁运用:
(1)备分相应文件
(2)替换目录inc/Function.asp中的文件
(3)替换目录Admin/Info中的文件DelContent.asp
这些文件中可能包含其它补丁,如查直接替换有问题请参照下列修改方法去修改。
修改方法分三大步:
一、在文件Inc/Const.asp中增加一句
Const Delpic="yes" '新闻与下载删除的同时,是否删除远程保存的图片(仅删BeyondPicDir中的)。yes:删除,其它不删除。
二、在文件Admin/Info/DelContent.asp中
(1)在
If MyFile.FileExists(Server.Mappath(DelNewsSysRootDir&DelNewsClassFileObj("SaveFilePath")&"/"&DelNewsClassFileObj("ClassEName"))&"/"&DelNewsFileObj("FileName")&"."&DelNewsFileObj("FileExtName")) then
MyFile.DeleteFile(Server.Mappath(DelNewsSysRootDir&DelNewsClassFileObj("SaveFilePath")&"/"&DelNewsClassFileObj("ClassEName"))&"/"&DelNewsFileObj("FileName")&"."&DelNewsFileObj("FileExtName"))
End if
后插入
'------------删除远程存图的图片--doudou888--------
If LCase(Delpic)="yes" Then
Call DelLocalFile(replace(DelNewsFileObj("Content"),DelNewsSysRootDir,""&delnewssysrootdir/' target=_blank>"&DelNewsSysRootDir))
Dim timPic,timPicPath
timPic=DelNewsFileObj("PicPath")
If InStr(LCase(timPic),LCase(UpFilesZn))>0 Then '站内
timPicPath=DelNewsSysRootDir&Mid(timPic,1,InstrRev(timPic,"/")-1)
Else '站外
timPicPath=Mid(timPic,1,InstrRev(timPic,"/")-1)
End If
'Call DelFilesFolder(timPicPath,"",Mid(timPic,InstrRev(timPic,"/") 1))
Call DelFilesFolder(timPicPath,"",DelNewsFileObj("NewsID")&"_")
End if
'-------------------------------------------------
(2)在
if MyFile.FileExists(Server.MapPath(DelNewsSysRootDir & DelDownClassObj("SaveFilePath") & "/"& DelDownClassObj("ClassEName")) & "/" & DelDownloadObj("FileName") & "." & DelDownloadObj("FileExtName")) then
MyFile.DeleteFile (Server.MapPath(DelNewsSysRootDir & DelDownClassObj("SaveFilePath") & "/"& DelDownClassObj("ClassEName")) & "/" & DelDownloadObj("FileName") & "." & DelDownloadObj("FileExtName"))
end if
后插入
'-----------------删除远程存图的图片---------------
If LCase(Delpic)="yes" Then
Call DelLocalFile(replace(DelDownloadObj("Description"),DelNewsSysRootDir,""&delnewssysrootdir/' target=_blank>"&DelNewsSysRootDir))
Dim timPic,timPicPath
timPic=DelDownloadObj("Pic")
If InStr(LCase(timPic),LCase(UpFilesZn))>0 Then '站内
timPicPath=DelNewsSysRootDir&Mid(timPic,1,InstrRev(timPic,"/")-1)
Else '站外
timPicPath=Mid(timPic,1,InstrRev(timPic,"/")-1)
End If
'Call DelFilesFolder(timPicPath,"",Mid(timPic,InstrRev(timPic,"/") 1))
新闻热点
疑难解答