<!--#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("password")<>"" then
name=request("name")
password=request("password")
qx=request("qx")
sql="insert into admin (admin,pwd,qx) values ('"&name&"','"&password&"',"&qx&")"
conn.execute(sql)
response.write "<script>alert('管理员增加成功');</script>"
response.write "<script>location.href='admin_admin.asp';</script>"
elseif request("name")="" or request("password")="" 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%>