📄 del.asp
字号:
<% Option explicit %>
<!-- #Include file="./connects.inc"-->
<!-- #Include file="../globals.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel=stylesheet>
</head>
<body leftmargin=10 topmargin=10 background="../images/bg.gif">
<%
'//定义变量:
Dim sSQL, rs, sSQLCondition
sSQLCondition=request("sSQLCondition")
'判断即将删除的记录中是否包含“adminor”帐户,如果是,就不删除:
sSQL="select f_accountname from tabAccountInfo where " & sSQLCondition & " and f_accountname in ('adminor')"
'response.write sSQL
set rs=server.createobject("adodb.recordset")
rs.open sSQL, sConn, 1, 1
if rs.recordcount>0 then
response.write "<br><br><br><table border='0' align='center' style='line-height:20pt;'><tr><td>"
response.write "即将删除的帐户中包含超级用户“adminor”。<br>"
response.write "删除超级用户 adminor 将导致您的系统无法管理。<br>"
response.write "本次操作已经自动停止。<br>"
response.write "<br><center><a href='lists.asp'>返 回</a></center>"
response.write "</td><tr></table>"
response.end
end if
set rs=nothing
'--正常删除-----
sSQL="delete from tabAccountInfo where " & sSQLCondition
'response.write sSQL
set rs=server.createobject("adodb.recordset")
rs.open sSQL, sConn, 1, 3
set rs=nothing
'还要释放分配给该帐户管理栏目的权限,:
sSQL="delete from tabQXB where f_accountname NOT in (select distinct f_accountname from tabAccountInfo)"
set rs=server.createobject("adodb.recordset")
rs.open sSQL, sConn, 1, 3
set rs=nothing
'回到列表显示界面:
response.redirect("lists.asp")
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -