📄 hover_news_del.asp
字号:
<%@language=VBScript codepage=936 %>
<!--#include file="toptable.asp"-->
<!--#include file="../Inc/Ubbcode.asp"-->
<%
'=================================
' 良精科技企业管理系统
' QQ在线客服:65961930 82993936
' 咨询定购Tel:010-81991660
' asp3721@hotmail.com
' www.liangjing.net
' copyright(c)2001-2008 HoverCms 2007特别版
'=================================
%>
<!--#include file="Inc/Function.asp"-->
<%
dim ID,Action,sqlDel,rsDel,FoundErr,ErrMsg,ObjInstalled
ID=trim(request("ID"))
Action=Trim(Request("Action"))
FoundErr=False
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")
if ID="" or Action<>"Del" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
end if
if FoundErr=False then
if instr(ID,",")>0 then
dim idarr,i
idArr=split(ID)
for i = 0 to ubound(idArr)
call DelNews(clng(idarr(i)))
next
else
call DelNews(clng(ID))
end if
end if
if FoundErr=False then
call CloseConn()
response.Redirect "Hover_News_Manage.asp"
else
call CloseConn()
call WriteErrMsg()
end if
sub DelNews(ID)
PurviewChecked=False
sqlDel="select * from Hover_News where ID=" & CLng(ID)
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
if FoundErr=False then
if DelUpFiles="Yes" and ObjInstalled=True then
dim fso,strUploadFiles,arrUploadFiles
strUploadFiles=rsDel("firstImageName") & ""
if strUploadFiles<>"" then
Set fso = CreateObject("Scripting.FileSystemObject")
if instr(strUploadFiles,"|")>1 then
arrUploadFiles=split(strUploadFiles,"|")
for i=0 to ubound(arrUploadFiles)
if fso.FileExists(server.MapPath("../" & arrUploadfiles(i))) then
fso.DeleteFile(server.MapPath("../" & arrUploadfiles(i)))
end if
next
else
if fso.FileExists(server.MapPath("../" & strUploadfiles)) then
fso.DeleteFile(server.MapPath("../" & strUploadfiles))
end if
end if
Set fso = nothing
end if
end if
rsDel.delete
rsDel.update
set rsDel=nothing
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -