<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=../md5.asp-->
<%
dim flag
flag=request.cookies("foxwww")("fox")
if flag=10 then
response.Write "<script LANGUAGE='javascript'>alert('您只是后台测试员，请注意身份！');history.go(-1);</script>"
response.end
end if%>
<link rel="stylesheet" type="text/css" href="images/fox.css">
<style type=text/css>
BODY{
	margin:0px;
	FONT-SIZE: 12px;
	FONT-FAMILY: "宋体", "Verdana", "Arial", "Helvetica", "sans-serif";
	background-color: #CCCC99; 
	scrollbar-highlight-color: #CC9933; 
	scrollbar-arrow-color: #FFFFFF; 
	scrollbar-base-color: #CC9933
}
table { border:0px; }
td { font:normal 12px 宋体; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋体; color:#111111; text-decoration:none; }
a:hover { color:#384780;text-decoration:underline; }
.sec_menu { border-left:2px solid #CC3300; border-right:2px solid #CC3300; border-bottom:2px solid #CC3300; overflow:hidden; background:#ffffff; }
.menu_title {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title span { position:relative; top:2px; left:8px; color:#FFFF00; font-weight:bold; }
.menu_title2 {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title2 span { position:relative; top:2px; left:8px; color:#FEFEFE; font-weight:bold; }
input,select,Textarea{
font-family:宋体,Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
</style>

<%
dim rs,sql,username,password,quan
username=replace(trim(request("username")),"'","‘")
password=replace(trim(request("password")),"'","‘")
quan=replace(trim(request("quan")),"'","‘")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [FOX_admin] where username='"&username&"'" 
rs.open sql,conn,1,3
if not rs.eof or not rs.bof then
  if trim(rs("username"))=username then
	Response.Write"<li>此用户名称已存在，请更换！"
 response.end
 end if
else
rs.addnew
rs("username")=username
rs("level")=quan
rs("password")=md5(password)

rs.update
end if
rs.close
set rs=nothing
closedb
response.write "<li>恭喜你，添加用户成功！"
response.write "<meta http-equiv=refresh content=""1;URL=admin_add.asp"">"
%></body></html>