saveadmin.asp

来自「时代商城购物系统功能」· ASP 代码 · 共 28 行

ASP
28
字号
<!--#include file="const.asp"-->

<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<%'On Error Resume Next
if request("delname")<>"" then
conn.execute("delete from admin where admin='"&request("delname")&"'")
response.write "<script>alert('管理员删除成功');</script>"
response.write "<script>location.href='admin_admin.asp';</script>"
conn.close
set conn=nothing
response.end
end if
if request("name")<>"" and request("UserPassword")<>"" then
name=request("name")
UserPassword=request("UserPassword")
qx=request("qx")
sql="insert into admin (admin,pwd,qx) values ('"&name&"','"&UserPassword&"',"&qx&")"
conn.execute(sql)
response.write "<script>alert('管理员增加成功');</script>"
response.write "<script>location.href='admin_admin.asp';</script>"
elseif request("name")="" or request("UserPassword")="" then
response.write "<script>alert('用户名和密码不能为空');</script>"
response.write "<script>location.href='admin_admin.asp';</script>"
end if
conn.close
set conn=nothing
'Response.Write Err.description%>

⌨️ 快捷键说明

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