% data_path="../../../" 'ACC连接数据库路径,对SQL无效 %>
<%
if request.Cookies("masterflag")="" or request.Cookies("masterflag")="" then
response.write ""
response.end
end if
'权限限制^^^^^^^^^^^^^^^^^^^^
dim ishavegant
ishavegant=false
in_str=split(request.Cookies("masterflag"),",")
for each ins in in_str
if trim(ins)="04" then
ishavegant=true
end if
next
if ishavegant=false then
response.redirect "../../err.asp"
response.end
end if
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^End
if request.QueryString("action")="del" then
if not isempty(request("selAnnounce")) then
newsidlist=request("selAnnounce")
if instr(newsidlist,",")>0 then
dim newsidarr
newsidArr=split(newsidlist)
dim log_newsid
for i = 0 to ubound(newsidarr)
log_newsid=clng(newsidarr(i))
call deleteannounce(log_newsid)
next
else
call deleteannounce(clng(newsidlist))
end if
end if
end if
%>
<%
Rs.close
Set Rs=nothing
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^分类名称
Function GetCatName(id)
Sql="Select CatName From benming_ch_NewsCat where id="&id
Set Rstype=Server.CreateObject("ADODB.RecordSet")
Rstype.open Sql,Conn,1,1
if Rstype.eof=False and Rstype.bof=False then
GetCatName=Rstype("CatName")
else
GetCatName=""
end if
Rstype.close
Set Rstype=nothing
End function
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^删除文章图片同生成页面
sub deleteannounce(newsid)
dim rs,sql, RsInfo
Set RsINfo=Conn.Execute("Select newsid,typeid,Picture From benming_ch_news Where newsid="&newsid&" ")
if NOt RsINfo.Eof Then
ttid=RsINfo("newsid")
typeid=RsINfo("typeid")
Picture=RsInfo("Picture")
'FileName="/UploadFile/Newsuppic/"&typeid&"-"&ttid&".html"
'Call FileDel(FileName) '删除生成文件
FileName=Picture
if Picture<>"/UploadFile/Newsuppic/nopicture.gif" then
Call FileDel(FileName) '删除图片文件
end if
End if
RsInFo.Close
Set RsInfo=NOthing
set rs=server.createobject("adodb.recordset")
sql="delete from [benming_ch_news] where newsid="&cstr(newsid)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 ! "
end if
End sub
Conn.close
Set Conn=nothing
%>