📄 reg.asp
字号:
<!-- #include file="top_cnbbr.asp" -->
<!-- #include file="Inc/md5.asp" -->
<%
if SYS_REGUSER=0 then Call AlertInfo("对不起,当前系统不允许新用户注册!","Index.asp",1)
if Out_Status=1 then Call AlertInfo("系统使用外接用户注册系统,正在转接...!",Out_RegUrl,1)
Dim RegStep
RegStep=CheckStr(Trim(Request.Form("RegStep")))
if Not isNum(RegStep) then
RegStep=1
else
RegStep=Clng(RegStep)
if RegStep>2 or RegStep<1 then RegStep=1
end if
Dim RegAct
RegAct=CheckStr(Trim(Request.Form("RegAct")))
if Not isNum(RegAct) then
RegAct=0
else
RegAct=Clng(RegAct)
if RegAct>2 or RegAct<1 then RegAct=0
end if
if RegStep=2 And RegAct=1 then
Call Cnbbr_CheckPost(0)
Dim BBRName,BBRPass,BBRRePass,BBREmail
BBRName=CheckStr(Trim(Request.Form("BBRName")))
BBRPass=CheckStr(Trim(Request.Form("BBRPass")))
BBRRePass=CheckStr(Trim(Request.Form("BBRRePass")))
BBREmail=CheckStr(Trim(Request.Form("BBREmail")))
if BBRName="" then Call AlertInfo("对不起,请填写你想要注册的用户名!","",0)
if Len(BBRName)<5 or Len(BBRName)>20 then Call AlertInfo("对不起,你填写的用户名超出长度限制范围!","",0)
if BBRpass="" or BBRRePass="" then Call AlertInfo("对不起,请填写你的用户密码!","",0)
if Len(BBRPass)<6 or Len(BBRPass)>20 then Call AlertInfo("对不起,你填写的用户密码超出长度限制范围!","",0)
if BBRPass<>BBRRePass then Call AlertInfo("对不起,你两次填写的用户密码不一致!","",0)
if BBREmail="" then Call AlertInfo("对不起,请填写你的个人电子邮箱地址!","",0)
if Len(BBREmail)<7 or Len(BBREmail)>48 then Call AlertInfo("对不起,你填写的个人电子邮箱地址超出长度限制范围!","",0)
BBRPass=md5(BBRPass,cBBRMd5Byte)
Dim RndPass
if SYS_SENDREGEMAIL=2 then
Randomize
RndPass=Cstr(Int((100000 - 1000 + 1) * Rnd + 1000))
RndPass=Md5(RndPass,cBBRMd5Byte)
else
RndPass=Cstr("1")
end if
On Error Resume Next
Dim RsNewUserID
Sql="Select RegID,RegAdmin,RegValidated,RegUserName,RegPassWord,RegEmail,Credit,BBRMoney,RegTime,UserLoginTimes,RndPass from users where RegUserName='"& BBRName &"'"
Set RsNewUserID=Server.CreateObject("ADODB.RecordSet")
RsNewUserID.Open Sql,conn,1,3
if RsNewUserID.Eof then
RsNewUserID.AddNew
RsNewUserID("RegAdmin")="N"
if IdStatus=1 then
RsNewUserID("RegValidated")="Y"
else
RsNewUserID("RegValidated")="N"
end if
RsNewUserID("RegUserName")=BBRName
RsNewUserID("RegPassWord")=BBRPass
RsNewUserID("RegEmail")=BBREmail
RsNewUserID("Credit")=0
RsNewUserID("BBRMoney")=0
RsNewUserID("RegTime")=Now()
RsNewUserID("UserLoginTimes")=1
RsNewUserID("RndPass")=RndPass
RsNewUserID.Update
Dim TempNewUserID
TempNewUserID=RsNewUserID("RegID")
RsNewUserID.Close
Set RsNewUserID=nothing
if Err.Number<>0 then
Response.Write Err.Description
Call AlertInfo("出错了,请返回检查你所输入的信息是否正确!","",0)
else
Call SysCount(1,1)
Response.Cookies(super_user)("uname")=BBRName
Response.Cookies(super_user)("ccnnbbbbrrkey")=Super_User
Response.Cookies(super_user)("uid")=TempNewUserID
if Comp_Check("JMAIL.SMTPMail") then
Dim MailTo,MailTopic,MailBody
MailTo=BBREmail
MailTopic=SYS_WEBNAME &"新用户注册资料,请查收!"
MailBody="你好,"& BBRName &"<BR><BR>"&_
"欢迎你成为"& SYS_WEBNAME &"的新用户,以下是你注册的用户信息:<BR><BR>"&_
"用 户 名:"& BBRName &"<BR>"&_
"用户密码:"& BBRRePass &"<BR>"&_
"注册时间:"& Now() &_
"<BR><BR>"&_
"感谢你对本站的关注和支持!<BR><BR>"&_
"<a href=""http://"& SYS_WEBURL &""" target=""_blank"">"& SYS_WEBName &"客户服务中心</a>"
Call JMail(MailTo,MailTopic,MailBody)
end if
Call AlertInfo("新用户注册成功,并已登录,请继续填写你的详细资料!","RegUserDetail.asp",1)
end if
else
RsNewUserID.Close
Set RsNewUserID=nothing
Call AlertInfo("出错了,此用户名已经被注册了,请返回重新注册!","",0)
end if
end if
Response.Write Cnbbr_Head
Dim SiteMenu_Width,SiteMenu_Left,SiteMenu_Right
SiteMenu_Width=SYS_BodyCenterWidth
SiteMenu_Left="Reg.asp|[menu]|新用户注册"
SiteMenu_Right=""
Response.Write CnbbrSiteMenu(SiteMenu_Width,SiteMenu_Left,SiteMenu_Right)
%>
<!-- 用户注册导航条 -->
<table align="center" border="0" cellpadding="2" cellspacing="2" width="<%=SYS_BodyCenterWidth%>" class="td">
<tbody>
<tr>
<td width="55%"><img src="Images/Spacer.gif" border="0" alt=""></td>
<%
Dim TempRegStepStr
if RegStep=1 then
TempRegStepStr="<td width=""15%"" class=""orangeSpace"">1、注册信息</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">2、填写资料</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">3、注册成功</td>"& Vbcrlf
elseif RegStep=2 then
TempRegStepStr="<td width=""15%"" class=""graySpace"">1、注册信息</td>"& Vbcrlf &_
"<td width=""15%"" class=""orangeSpace"">2、填写资料</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">3、注册成功</td>"& Vbcrlf
elseif RegStep=3 then
TempRegStepStr="<td width=""15%"" class=""graySpace"">1、注册信息</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">2、填写资料</td>"& Vbcrlf &_
"<td width=""15%"" class=""orangeSpace"">3、注册成功</td>"& Vbcrlf
else
TempRegStepStr="<td width=""45%"" class=""graySpace"">新用户注册</td>"& Vbcrlf
end if
Response.Write TempRegStepStr
%>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="2" cellspacing="2" width="<%=SYS_BodyCenterWidth%>" class="td">
<tbody>
<tr>
<td> </td>
<td width="698">
<div class=Div1px><img src="Skins/<%=Skins_Folder%>/ErrMsg.gif" border="0" alt="">
<%
if RegStep=1 then
Response.Write "你准备好了吗?第一步,请填写你的系统注册信息。" & Vbcrlf
elseif RegStep=2 then
Response.Write "恭喜你,你的用户帐号已经建立!第二步,为了你的系统交易能够顺利进行,请继续完善你的个人详细资料。" & Vbcrlf
elseif RegStep=3 then
Response.Write "感谢你的支持!你现在可以在系统进行购物或者销售宝贝了,祝你购物愉快!" & Vbcrlf
else
Response.Write "出错了!" & Vbcrlf
end if
%>
</div>
</td>
<td> </td>
</tr>
</tbody>
</table>
<!-- 用户注册导航条结束 -->
<table align="center" border="0" cellpadding="2" cellspacing="2" width="<%=SYS_BodyCenterWidth%>" class="td">
<tbody>
<tr>
<td width="100%" align="center">
<table align="center" border="0" cellpadding="2" cellspacing="2" width="698">
<form name=regform method=post action="">
<tbody>
<tr>
<td colspan="3" width="100%" height="20" align="Left"><img src="images/Spacer.gif" border="0" alt=""></td>
</tr>
<tr>
<td colspan="3" width="100%" height="20" align="Left"><img src="Skins/<%=Skins_Folder%>/NavReg.gif" border="0" alt=""> <Span Style="Font-Size: 14px; Font-weight: bold;">填写注册信息</Span>(带<img src="Skins/<%=Skins_Folder%>/notSpace.gif" border="0" alt="">为必填项)</td>
</tr>
<tr>
<td colspan="3" width="100%" height="10" align="Left"><img src="images/Spacer.gif" border="0" alt=""></td>
</tr>
<tr>
<td width="20%" height="38" align="Right">用 户 名:</td>
<td width="25%"><input name=BBRName Type=text value="" title="请填写你想要注册的用户名称"><img src="Skins/<%=Skins_Folder%>/notSpace.gif" border="0" alt=""></td>
<td width="55%">5-20个字符(包括小写字母、数字、下划线、中文),一个汉字为两个字符,推荐使用中文用户名。注册成功后用户名不能修改。</td>
</tr>
<tr>
<td width="20%" height="38" align="Right"><img src="images/spacer.gif" border="0" alt=""></td>
<td width="25%"><input name=BBRChkName Type=Button value="检测用户名是否可用" title="" class="ButtonInput" onClick="document.regform.action='ChkNewUserName.asp'; document.regform.target='_blank'; document.regform.submit();"></td>
<td width="55%">检测用户名是否还能够有效注册</td>
</tr>
<tr>
<td width="20%" height="38" align="Right">用 户 密 码:</td>
<td width="25%"><input name=BBRPass Type=password value="" title="请填写你的个人密码"><img src="Skins/<%=Skins_Folder%>/notSpace.gif" border="0" alt=""></td>
<td width="55%">密码由6-20个字符组成,请使用英文字母加数字或符号的组合密码,不能单独使用英文字母、数字或符号作为您的密码。</td>
</tr>
<tr>
<td width="20%" height="38" align="Right">确认用户密码:</td>
<td width="25%"><input name=BBRRePass Type=password value="" title="请重新输入并确认你的个人密码"><img src="Skins/<%=Skins_Folder%>/notSpace.gif" border="0" alt=""></td>
<td width="55%">重新输入以上你所设置的个人用户密码,两次输入的密码必须保持一致。</td>
</tr>
<tr>
<td width="20%" height="38" align="Right">你的电子邮箱:</td>
<td width="25%"><input name=BBREmail Type=text value="" title="请输入你的个人电子邮箱地址"><img src="Skins/<%=Skins_Folder%>/notSpace.gif" border="0" alt=""></td>
<td width="55%">输入你的个人电子邮箱地址,以便我们能为你提供更好,更可靠,更周到的电子服务。</td>
</tr>
<tr>
<td colspan="3" width="100%" height="38" height="20" align="center"><input name=submitreg type=button value="同意以下服务协议并提交注册信息" class="buttoninput" style="height: 32px;" onClick="document.regform.submitreg.disabled=true; document.regform.action='Reg.asp'; document.regform.target='_top'; document.regform.submit();"></td>
</tr>
<tr>
<td colspan="3" width="100%" height="20" align="Left"><img src="images/Spacer.gif" border="0" alt=""></td>
</tr>
<tr>
<td colspan="3" width="100%" height="20" align="Left"><img src="Skins/<%=Skins_Folder%>/NavReg.gif" border="0" alt=""> <Span Style="Font-Size: 14px; Font-weight: bold;">阅读服务协议</Span>(注册前请认真阅读该协议,注册完成后即表示你已接受此协议)</td>
</tr>
<tr>
<td colspan="3" width="100%" height="20" align="center">
<textarea name="ServiceProtocol" cols="88" rows="6">
<!-- #include file="Service_RegProtocol.asp" -->
</textarea>
</td>
</tr>
<tr>
<td colspan="3" width="100%" height="20" align="Left"><img src="images/Spacer.gif" border="0" alt=""></td>
</tr>
<input name=regStep type=hidden value=<%=RegStep+1%>>
<input name=regAct type=hidden value=<%=RegStep%>>
</form>
</tbody>
</table>
</td>
</tr>
</table>
<%
Response.Write Cnbbr_Bottom
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -