<!--#include file="../include/conn.asp"-->
<!--#include file="seeion.asp" -->
<%
'website:http://www.angelasp.com
' Angel工作室技术开发团队:QQ:815657032、QQ：709047174
' Copyright (C) Angel工作室 (http://www.angelasp.com).  All rights reserved
Dim book_name,password,password2,book_email
dim adminname,i,myletters

book_name=request.form("book_name")
password=request.form("password")
password2=request.form("password2")
book_email=request.form("book_email")
if Trim(book_name)=""  then 
response.Write("<script language=javascript>alert('登陆帐号不能为空!');history.go(-1)</script>") 
response.end 
end If

myletters="0123456789abcdefghijklmnopqrstuvwxyz_" 
book_name=Lcase(trim(book_name)) 
for i=1 to len(book_name) 
adminname=mid(book_name,i,1) 
if Instr(myletters,adminname)=0 then 
response.write "<script>alert('登陆帐号只能由字母、数字及下划线组成!');history.go(-1);</script>" 
response.end 
end if 
Next

if password=""  then 
response.Write("<script language=javascript>alert('登陆密码不能为空!');history.go(-1)</script>") 
response.end 
end If

if password<>password2 then 
Response.Write "<script>alert('密码输入不一致！请重新输入！');history.go(-1);</script>" 
response.end
end If

set rs=server.createobject("adodb.recordset")
sql="select * from [Admin]"
rs.open sql,conn,1,3
rs.addnew
rs("book_name")=book_name
rs("book_password")=password
rs("book_addtime")=Now()
rs("book_email")=book_email
rs("book_ip")=getIP()
rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
Response.Write "<script>alert('添加成功！点击继续添加！');window.location.href='adminlist.asp';</script>" 
%>