admin_affiche_del.asp

来自「商业网站/图片管理系统/投票系统/新闻管理系统/」· ASP 代码 · 共 43 行

ASP
43
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<%
if request.cookies("admin_OK")="" then
	response.redirect("admin_login.html")
end if
%>
<%
dim db,sql,rst,myErrors
db=0
%>
<!-- 后台公告管理->删除公告 -->
<!-- #include file="../config/db.asp" -->
<!-- #include file="../config/function.inc.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
if isnumeric(request.querystring("id")) and not isempty(request.querystring("id")) then
	sql="delete from shop_affiche where a_id="&request.querystring("id")
	conn.execute sql
		set myErrors=conn.errors
		if myErrors.count=0 then
			msgboxU("删除成功!")
			'-----------返回公告管理页面-------------
			response.Redirect("admin_affiche.asp")
		else
			msgboxU("删除失败!原因:"&myErrors.item(0).description)
		end if
else
	msgboxU("参数错误")
end if
conn.close
set conn=nothing
%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?