del.asp
来自「asp」· ASP 代码 · 共 33 行
ASP
33 行
<%response.expires=0%>
<!--#include file="conn.asp"-->
<%
userid=Session("userid")
userlevel=Session("userlevel")
if userid="" or userlevel="" then
call msgbox("请重新登陆!",3)
end if
if not isnumeric(userid) or not isnumeric(userlevel) then
call msgbox("请重新登陆!",3)
end if
id =request("id")
if id="" then
call msgbox("请确定要删除的新闻!",1)
end if
if not isnumeric(id) then
call msgbox("请确定要删除的新闻!",1)
end if
sql="select top 1 filenum from news where id="&id
rs.open sql,conn,1,1
if not rs.eof then
filenum=rs(0)
else
rs.close
call msgbox("该新闻不存在!",1)
end if
rs.close
rs.open "delete from newsphoto where filenum="&filenum,conn,1,3
rs.open "delete from news where id="&id,conn,1,3
call msgbox("新闻成功删除!","../news/default.asp?categoryid="&Session("categoryid"))
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?