<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/Bk_safe.Asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/Md5.Asp"-->
<%
'*********************************************
'软件名称：博科企业网站内容管理系统（BOKECMS）
'软件开发：博科网络科技工作室
'网    址：http://www.bokew.net
'服务  QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：bokewlkj
'*********************************************
%>
<%Response.Charset="utf-8"
dim mMemName,mRealName,mSex,mPassword,mpayPassword,mQuestion,mAnswer,mCompany,mAddress,mZipCode,mTelephone,mFax,mMobile,mUserqq,mEmail,mHomePage,mmaillist
dim vPassword
dim rs,sql
mMemName=trim(request.form("MemName"))
mRealName=trim(request.form("RealName"))
mSex=trim(request.form("Sex"))
mPassword=trim(request.form("Password"))
mpayPassword=trim(request.form("payPassword"))
mQuestion=trim(request.form("Question"))
mAnswer=trim(request.form("Answer"))
mCompany=trim(request.form("Company"))
mAddress=trim(request.form("Address"))
mZipCode=trim(request.form("ZipCode"))
mTelephone=trim(request.form("Telephone"))
mFax=trim(request.form("Fax"))
mMobile=trim(request.form("Mobile"))
mUserqq=trim(request.form("Userqq"))
mEmail=trim(request.form("Email"))
mmaillist=trim(request.form("maillist"))
mHomePage=trim(request.form("HomePage"))

set rs = server.createobject("adodb.recordset")
sql="select * from BokeCMS_Members where MemName='"&mMemName&"'"
rs.open sql,conn,1,1
if Not rs.bof or Not rs.eof then
response.Write "<script language=javascript>alert('该用户名 "&mMemName&" 已存在，请另选！');location.href='-1';</script>"
	conn.execute(sql)
	if err then 
	response.Write(0)
	Else
	response.Write(1)	
	end If
rs.close
Set rs=Nothing
response.end
End If

set rs = server.createobject("adodb.recordset")
sql="select * from BokeCMS_Members"
rs.open sql,conn,1,3

rs.addnew
rs("MemName")=mMemName
rs("RealName")=StrReplace(mRealName)
rs("Sex")=mSex
rs("Password")=Md5(mPassword)
rs("payPassword")=Md5(mpayPassword)
rs("Question")=StrReplace(mQuestion)
rs("Answer")=Md5(mAnswer)
rs("Company")=StrReplace(mCompany)
rs("Address")=StrReplace(mAddress)
rs("ZipCode")=StrReplace(mZipCode)
rs("Telephone")=StrReplace(mTelephone)
rs("Fax")=StrReplace(mFax)
rs("Mobile")=StrReplace(mMobile)
rs("Userqq")=mUserqq
rs("Email")=mEmail
rs("maillist")=mmaillist
rs("HomePage")=StrReplace(mHomePage)
rs("GroupID")="2011721738397168"
rs("GroupName")=GroupName("2011721738397168")
If usersh =True Then
rs("Working")=0
Else
rs("Working")=1
End If
rs("AddTime")=now()
rs.update

	conn.execute(sql)
	if err then 
	response.Write(0)
	Else
	response.Write(1)	
	end If
Session("GetCode")=""'清除验证码以防止表单的重复提交
rs.close
Set rs=Nothing

function GroupName(GroupID)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from BokeCMS_MemGroup where GroupID='"&GroupID&"'"
  rs.open sql,conn,1,1
  GroupName=rs("GroupName")
  rs.close
  set rs=nothing
end function
%>