<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=../inc/md5.asp-->
<%
dim rs,sql,username,password
username=replace(trim(request("username")),"'","‘")
password=replace(trim(request("password")),"'","‘")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select username,password from [jle_admin] where username='"&username&"'" 
rs.open sql,conn,1,3
if not rs.eof or not rs.bof then
response.write "<li>错误，管理员已经存在！"
response.end
else
rs.addnew
rs("username")=username
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"">"
%>