📄 fixreg.asp
字号:
<!-- #include file="../include/skin.asp" -->
<!-- #include file="../include/jk_md5.asp" -->
<!-- #include file="../include/jk_email.asp" -->
<!-- #include file="../include/jk_sendmail.asp" -->
<!-- #include file="../include/jk_val_code.asp" -->
<%
'****************************************************
' Web: http://www.aouoo.com , http://www.aouoo.net
' Copyright (C) 2007 Aouoo.com All Rights Reserved.
'****************************************************
iframe=true
index_url="user_reg"
tit_fir="注册新用户"
dim val_url
val_url=joekoe_cms.web_urls
select case action
case "reg_val"
tit="注册用户邮件验证"
case "main"
tit="填写注册用户资料"
case "val"
tit="填写用册资料验证"
case "chk"
tit="注册新用户成功"
case else
tit="注册新用户条款"
end select
call web_head(0,0,3,0,0)
if login_username<>"" then
call format_redirect("/")
end if
'----------------------------中间 开始----------------------------
%>
<table border=0 width='912' align="center" cellspacing=0 cellpadding=0>
<tr><td align=center>
<table cellspacing=0 cellpadding=0 width="100%">
<tr><td class=td0> <%response.write img_skin("m_user")&tit%></td></tr>
<tr class=bg_td><td align=center height=300>
<%
if int(format_mid_num(2))=0 then
select case action
case "reg_val"
call register_reg_val()
case "main"
call register_main()
case "val"
call register_val()
case "chk"
call register_chk()
case else
call register_read()
end select
else
response.write "<font class=red>目前网站已暂停新用户注册!</font>"
end if
%>
</td></tr>
</table>
</td></tr>
</table>
<%
response.write ukong
'----------------------------中间 结束----------------------------
call web_end(0,0)
sub register_reg_val()
dim val_var,id,username,password,found_err
val_var=joekoe_cms.code_form(request.querystring("val_var"))
if len(val_var)<>32 or symbol_name(val_var) then
%>
<table border=0>
<tr><td><font class=red>您输入的验证码有错误或已过期!</font></td></tr>
</table>
<%
exit sub
end if
if joekoe_cms.chk() then
username=trim(request.form("username"))
password=trim(request.form("password"))
found_err=""
if symbol_name(username)=false then
found_err=found_err&"+您输入的 <font class=red>用户名称</font> 为空或不符合相关规则!<br>"
end if
if symbol_ok(password)=false then
found_err=found_err&"+您输入的 <font class=red>登陆密码</font> 为空或不符合相关规则!<br>"
end if
if val_chk("reg_val")=false then
found_err=found_err&"+您输入的 <font class=red>验 证 码</font> 为空或有错误!<br>"
end if
if found_err="" then
password=jk_md5(password,"short")
sql="select top 1 id from user_data where username='"&username&"' and password='"&password&"' and tmp='"&val_var&"' and hidden=0"
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
found_err=found_err&"+您输入的 <font class=red>用户验证信息</font> 有错误或已验证!<br>"
else
id=rs("id")
end if
rs.close
end if
if found_err<>"" then
response.write found_error(found_err,260)
exit sub
end if
call joekoe_cms.exec("update user_data set tmp='',hidden=1 where id="&id,0)
call cookies_load()
response.cookies(joekoe_cms.web_cookies).path=joekoe_cms.web_dir
response.cookies(joekoe_cms.web_cookies)("login_username")=username
response.cookies(joekoe_cms.web_cookies)("login_password")=jk_encrypt(password)
response.write vbcrlf&"<font class=blue><b>"&username&"</b></font>,您已通过注册信息验证!<br><br><flon class=red>从现在起您正式成为我们的注册用户。</font><br><br>请进入 <a href='user_main.asp'>用户中心</a> 修改您的其它相关信息。"
call val_chk_end("reg_val")
exit sub
end if
%>
<table border=0>
<form name=reg_val_frm action='?action=<%response.write action%>&val_var=<%response.write val_var%>' method=post onsubmit="frm_submitonce(this);">
<input type=hidden name=chk value='yes'>
<tr><td>用户名称:</td><td><input type=text name=username value='' size=20 maxlength=20><%response.write redx%></td></tr>
<tr><td>登陆密码:</td><td><input type=password name=password value='' size=20 maxlength=20><%response.write redx%></td></tr>
<tr><td height=40>验证信息码:</td><td><font class=blue><b><%response.write val_var%></b></font></td></tr>
<tr><td>验 证 码:</td><td><%response.write val_code("reg_val")%></td></tr>
<tr><td colspan=2 align=center height=30><input type=submit value='提交注册信息验证'></td></tr>
</form>
</table>
<%
end sub
sub register_chk()
dim username,password,password2,passwd,email,found_err,reg_val,val_var,sbody,sendmail,stit,temp1
username=trim(request.form("username"))
password=trim(request.form("password"))
password2=trim(request.form("password2"))
passwd=trim(request.form("passwd"))
email=joekoe_cms.code_form(request.form("email"))
found_err=""
if symbol_name(username)=false then
found_err=found_err&"+您输入的 <font class=red>用户名称</font> 为空或不符合相关规则!<br>"
else
if health_name(username)=false then
found_err=found_err&"+您输入的 <font class=red>用户名称</font> 含有<font class=red>本系统禁用字符</font>!<br>"
end if
end if
if symbol_ok(password)=false then
found_err=found_err&"+您输入的 <font class=red>登陆密码</font> 为空或不符合相关规则!<br>"
else
if password<>password2 then
found_err=found_err&"+您输入的 <font class=red>登陆密码</font> 和 <font class=red>确认密码</font> 不一致!<br>"
end if
end if
if symbol_name(passwd)=false then
found_err=found_err&"+您输入的 <font class=red>密码钥匙</font> 为空或不符合相关规则!<br>"
end if
if email_ok(email,50)=false then
found_err=found_err&"+您输入的 <font class=red>E-mail</font> 为空或不符合邮件规则!<br>"
end if
if val_chk("reg")=false then
found_err=found_err&"+您输入的 <font class=red2>验 证 码</font> 为空或有错误,请勿非法提交!<br>"
end if
if found_err="" then
password=jk_md5(password,"short")
sql="select top 1 id from user_data where username='"&username&"'"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
found_err=found_err&"+您输入的 <font class=red>用户名称(<font class=blue><b>"&username&"</b></font>)</font> 已被注册!<br>"
end if
rs.close
if int(format_mid_num(5))=1 and found_err="" then
sql="select top 1 email from user_data where email='"&email&"'"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
found_err=found_err&"+您输入的 <font class=red>E - mail(<font class=blue><b>"&email&"</b></font>)</font> 已被使用!<br>"
end if
rs.close
end if
end if
if found_err<>"" then
found_err=found_err&"+请查阅有关 <a href='"&joekoe_cms.web_dir&"support/help.asp?action=register' target=_blank class=red>用户注册注意事项</a> 并重新填写。"
response.write found_error(found_err,280)
exit sub
end if
reg_val=format_mid_num(3)
val_var=""
sql="select * from user_data where id is null"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("nname")=""
rs("password")=password
rs("passwd")=jk_md5(passwd,"short")
rs("email")=email
if trim(request.form("sex"))="girl" then
rs("sex")=false
else
rs("sex")=true
end if
rs("birthday")="1980-6-17"
rs("whe")=""
rs("face")="../images/face/0.gif"
rs("face_w")=90
rs("face_h")=90
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -