3.0Sp1删除下载、新闻的同时,删除远程存图的图片-风讯CMS教程
『 更新时间:2006-06-16 』『 字体:大 中 小 』『 作者:风讯科技 | 来源:模板无忧 』
功能简介:
删除下载、新闻的同时,删除远程存图的图片
模板无忧--mb5u_COm
补丁下载:
点击浏览该文件 MB5U_coM
补丁运用:
(1)备分相应文件
(2)替换目录inc\Function.asp中的文件
(3)替换目录Admin\Info中的文件DelContent.asp
MB5u.com__模板无忧
这些文件中可能包含其它补丁,如查直接替换有问题请参照下列修改方法去修改。 wwW.MB5U_COM
修改方法分三大步:
一、在文件Inc\Const.asp中增加一句
Const Delpic="yes" '新闻与下载删除的同时,是否删除远程保存的图片(仅删BeyondPicDir中的)。yes:删除,其它不删除。 模板无忧-MB5U.-COM
二、在文件Admin\Info\DelContent.asp中 www.MB5U_COM
(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))
wWw.MB5U_COM
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) 模板无忧--mb5u_COm
Else '站外
timPicPath=Mid(timPic,1,InstrRev(timPic,"/")-1)
End If
'Call DelFilesFolder(timPicPath,"",Mid(timPic,InstrRev(timPic,"/") 1))






评论加载中....