<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="web.asp"-->
<%
if rs5("addable")=-1 then
	if request("style")="add" then
		sql="select * from admin where admin='"&trim(request("user"))&"'"
		set rs=server.CreateObject("adodb.recordset")
		rs.open sql,conn,1,3
		if rs.eof or rs.bof then
			rs.addnew
			rs("admin")=request("user")
			rs("password")=request("password")
			rs("flag")=1
			rs.update
			
			response.Write("<script>alert('恭喜你,注册成功!现在可以登录上传图片了.');this.location.href='login.asp';</script>")
			response.end
		else
			response.Write("<script>alert('对不起,这个用户已经注册了!');this.location.href='../index.asp';</script>")
			response.End()
		end if
	end if
else
    response.Write("<script>alert('对不起,目前没有开放会员注册功能!');history.back();</script>")
	response.end
end if
%>