<!-- #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" -->
<!-- #include file="../include/jk_ip_stop.asp" -->
<%
dim useripstop,username
useripstop=0
iframe=true
index_url="register"
url_fir="register.asp"
tit_fir="注册新用户"
dim val_url
val_url=joekoe_cms.web_urls
select case action
 case "resend"
  tit="重新发送注册验证邮件"
 case "reg_val"
  tit="注册用户邮件验证"
case "main"
  tit="填写注册用户资料"
case "val"
  tit="填写用册资料验证"
case "chk"
  tit="注册新用户成功"
case else
  tit="注册新用户条款"
end select

call web_head(0,0,2,0,0)
if login_username<>"" then
  call format_redirect("user_main.asp")
end if
'----------------------------中间 开始----------------------------
%>
<table border=0 width='70%'>
<tr><td align=center>
  <table cellspacing=1 cellpadding=4 class=table>
  <tr><td class=td>&nbsp;<%response.write img_skin("m_user")&tit%></td></tr>
  <tr class=tr><td align=center height=300>
<%
if int(format_mid_num(2))=0 then
  call user_ip_stop1(1)
   if useripstop=0 then
  select case action
  case "resend"
     call register_resend()
  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
  end if
else
  response.write "<font class=red>目前网站已暂停新用户注册！</font>"
end if
%>
  </td></tr>
  </table>
</td></tr>
</table>



<%if int(format_mid_num(46))=0 then%>
<script language=JavaScript src='../style/softkeyboard.js'></script>
<script>
window.onload=
	function ()
	{
		password1=null;		
		initCalc();
		Load();
	}
</script>
<%
end if
response.write ukong
'----------------------------中间 结束----------------------------
call web_end(0,0)

sub register_resend()
  dim username,password,email,found_err,u_id,u_tmp,val_var,sbody,sendmail,stit,temp1,passwd
  if joekoe_cms.chk() then
    username=trim(request.form("username"))
    password=trim(request.form("password"))
    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>"
    end if
    if symbol_ok(password)=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("resend")=false then
      found_err=found_err&"+您输入的 <font class=red2>验 证 码</font> 为空或者有错误存在！<br>"
    end if
    if found_err<>"" then
      response.write found_error(found_err,260)
      exit sub
    end if
    sql="select top 1 "
	passwd=password
    password=jk_md5(password,"short")
    sql="select top 1 id,tmp from user_data where username='"&username&"' and password='"&password&"' and email='"&email&"' and hidden=0"
    set rs=joekoe_cms.exec(sql,1)
    if rs.eof then
      rs.close
      found_err=found_err&"+您输入的 <font class=red>用户验证信息</font> 有错误或已验证！<br>"
      response.write found_error(found_err,260)
      exit sub
    end if
    u_id=rs(0)
    u_tmp=rs(1)
    rs.close
    val_var=jk_md5(joekoe_cms.rand_num(10),"long")
    if var_null(u_tmp)<>"" and len(val_var)<>len(u_tmp) then
      found_err=found_err&"+您输入的 <font class=red>用户信息</font> 为非注册原因被设为未审核状态！<br>"&u_tmp
      response.write found_error(found_err,320)
      exit sub
    end if
    
    sql="update user_data set tmp='"&val_var&"' where id="&u_id
    call joekoe_cms.exec(sql,0)
    
    stit=tit
    sbody="您于 "&joekoe_cms.time_type("",2)&" 提交重新发送注册验证邮件！" & _
	  vbcrlf&"" & _
	  vbcrlf&"用户名称："& username & _
	  vbcrlf&"登陆密码："& passwd & _
	  vbcrlf& _
	  vbcrlf&"请尽快访问以下地址以验证您的注册信息："& _
	  vbcrlf& _
	  vbcrlf& val_url &"register.asp?action=reg_val&val_var="&val_var& _
	  vbcrlf& _
	  vbcrlf&"请在验证后登陆本站用户中心修改您的相关注册信息！"& _
	  vbcrlf& _
	  vbcrlf&"用户登陆页面：" & _
	  vbcrlf& val_url &"login.asp"
    temp1="恭喜！<font class=blue><b>"&username&"</b></font>，您已成功提交重新发送注册验证邮件。<br><br>您现在的状态为：<font class=red>未审核</font><br><br>请尽快查收您的邮箱（"&email&"）并进行<a href='register.asp?action=reg_val'>注册验证</a>身份！<br><br>"
    sendmail=send_mail(username,email,stit,sbody)
    if sendmail then
      temp1=temp1&"<font class=red>注册验证邮件已成功发送至邮箱（"&email&"）中！</font>"
    else
      temp1=temp1&"<font class=red2>系统配置不正常，注册邮件没有能正确发送！</font>"
    end if
    response.write temp1
    call val_chk_end("resend")
    exit sub
  end if
%>
<table border=0>
<form name=reg_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=chk value='yes'>
<tr>
<td>用户名称：</td>
<td><input type=text name=username size=20 maxlength=20><%response.write redx%></td>
</tr>
<tr>
<td>登陆密码：</td>
<td><input type=password name=password size=15 maxlength=20<%if int(format_mid_num(46))=0 then%> readOnly onKeyDown="Calc.password.value=this.value" onChange="Calc.password.value=this.value" onclick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''"<%end if%>><%response.write redx%></td>
</tr>
<tr>
<td>E - mail：</td>
<td><input type=text name=email size=30 maxlength=50><%response.write redx%></td>
</tr>
<tr>
<td>验 证 码：</td>
<td><%response.write val_code("resend")%></td>
</tr>
<tr><td colspan=2 align=center height=30><input type=submit class=btn value='重新发送注册验证邮件'></td></tr>
</form>
</table>
<br>
<table border=0 width=350>
<tr><td align=center class=htd>注：执行本操作可以将您的注册验证邮件重新发送一遍！<br>但如果是因为非注册原因被设为未审核时，将不能进行本操作。</td></tr>
</table>
<%
end sub


sub register_reg_val()
  call user_ip_stop1(1)
  if useripstop=0 then
  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_path
    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 size=15 maxlength=20<%if int(format_mid_num(46))=0 then%> readOnly onKeyDown="Calc.password.value=this.value" onChange="Calc.password.value=this.value" onclick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''"<%end if%>><%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 class=btn value='提交注册信息验证'></td></tr>
</form>
</table>
<%
end if
end sub

sub register_chk()
  call user_ip_stop1(1)
   if useripstop=0 then
  dim username,password,password2,passwd,email,found_err,reg_val,val_var,sbody,sendmail,stit,temp1
  dim send_u,accept_u,topic,word,types,isread,red_3
  dim nname,sex,birthday,face,face_w,face_h,qq,msn,phone,address,url,whe,remark,p45,popedom,p1,p2
  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"))
  sex=trim(request.form("sex"))
  nname=trim(request.form("nname"))
  birthday=trim(request.form("b_year"))&"-"&trim(request.form("b_month"))&"-"&trim(request.form("b_day"))
  face=trim(request.form("face_pic"))
  if var_null(face)="" then
     if trim(request.form("sex"))="girl" then
       face="../images/face/2.gif"
    else
       face="../images/face/22.gif"
    end if
  end if
  face_w=90
  face_h=90
  qq=joekoe_cms.code_form(trim(request.form("qq")))
  msn=joekoe_cms.code_form(trim(request.form("msn")))
  phone=joekoe_cms.code_form(trim(request.form("phone")))
  address=joekoe_cms.code_form(trim(request.form("address")))
  url=joekoe_cms.code_form(trim(request.form("url")))
  whe=joekoe_cms.code_form(trim(request.form("whe")))
  remark=joekoe_cms.code_form(request.form("remark"))
  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 len(password)<int(dim_num(23)) then
    found_err=found_err&"+您输入的 <font class=red>登陆密码</font> 长度小于"&dim_num(23)&"！<br>"
  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 not(isdate(birthday)) then
    found_err=found_err&"+您选择的 <font class=red>生日</font> 不是一个有效的日期格式！<br>"
  end if
  if qq<>"" and not isnull(qq) then
    if not(isnumeric(qq)) or len(qq)>15 then
      found_err=found_err&"+您输入的 <font class=red>QQ</font> 不是数字或长度超过15位！<br>"
    end if
  end if
  if len(remark)>250 then
    found_err=found_err&"+您输入的 <font class=red>个人介绍</font> 太多了！不能超过250个字符。<br>"
  end if
  if found_err<>"" then
    found_err=found_err&"+请查阅有关 <a href='../common/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")=nname
  rs("password")=password
  rs("passwd")=jk_md5(passwd,"short")
  rs("email")=email
  if sex="girl" then
    rs("sex")=false
  else
    rs("sex")=true
  end if
  rs("birthday")=birthday
  rs("whe")=whe
  rs("face")=face
  rs("face_w")=90
  rs("face_h")=90
  if qq<>"" and not isnull(qq) then
    rs("qq")=qq
  end if
  rs("msn")=msn
  rs("url")=url
  rs("phone")=phone
  rs("address")=address
  rs("strength")=0
  rs("lentim")=0
  rs("lentimt")=0
  rs("tim")=joekoe_cms.now_time
  rs("power")=format_power2(ubound(dim_user)+1,1)
  rs("remark")=remark
  if int(reg_val)=1 then
    val_var=jk_md5(joekoe_cms.rand_num(10),"long")
    rs("hidden")=false
    rs("tmp")=val_var
  else
    rs("hidden")=true
    rs("tmp")=""
  end if
  rs("bbs_counter")=0
  rs("counter")=0
  rs("integral")=dim_num(37)
  rs("emoney")=dim_num(39)
  rs("login_num")=0
  rs("last_tim")=joekoe_cms.now_time
  rs("last_ip")=joekoe_cms.ip_sys(0)
  if int(format_mid_num(35))=1 then
    rs("u_ip")=joekoe_cms.ip_sys(0)
  else
    rs("u_ip")=""
  end if
  p45=1
  if trim(request.form("p45"))="yes" then p45=0
  rs("popedom")="00000000000000000000000000000000000000000000"&p45&"00000"
  rs("estate")=0
  rs("abate")=false
  rs("otim")=joekoe_cms.time_type(joekoe_cms.now_time,4)
    if trim(request.form("isper"))="yes" then
  rs("isper")=true
  else
  rs("isper")=false
  end if
  rs.update
  rs.close
  
  call joekoe_cms.exec("update configs set new_username='"&username&"',num_reg=num_reg+1 where id=1",0)
  application.lock
  application(joekoe_cms.web_cookies&"_configs_new_username")=username
  application(joekoe_cms.web_cookies&"_configs_num_reg")=application(joekoe_cms.web_cookies&"_configs_num_reg")+1
  application.unlock
  
  '-----------------------注册短信通知开始------------------------
dim usermail
 if int(format_mid_num(35))=1 then
  usermail="[br]您此次注册IP为[color=#0000FF][b]"&joekoe_cms.ip_sys(0)&"[/b][/color]，系统将默认此IP。请您牢记并以后以此IP访问本站。[br][color=#FF0000][b]如需要修改下次登陆时IP或有任何疑问请及时联系系统管理员。[/b][/color]"
 else
  usermail="[br]如有任何疑问请及时联系系统管理员。"
 end if
call joekoe_cms.exec("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&username&"','"&web_dim(3)&"','"&web_dim(1)&"欢迎您的到来！','"&web_dim(1)&"全体管理人员欢迎您的到来。"&usermail&"[br]如有任何使用上的问题请查阅帮助中心。[br]感谢您注册本系统，让我们一起来建设这个网上家园！','"&joekoe_cms.now_time&"',1,0)",0)
'-----------------------注册短信通知结束------------------------
  temp1="恭喜！<font class=blue><b>"&username&"</b></font>，您已成功注册成为本站用户。<br><br>"
  sbody="您于 "&joekoe_cms.time_type("",2)&" 正式注册成为本站用户！" & _
	vbcrlf&"" & _
	vbcrlf&"用户名称："& username & _
	vbcrlf&"登陆密码："& password2 & _
	vbcrlf&"密码钥匙："& passwd
  stit="用户注册成功信息"
  if int(reg_val)=1 then
    stit="用户注册验证信息"
    sbody=sbody&vbcrlf&vbcrlf&"请尽快访问以下地址以验证您的注册信息："& _
	  vbcrlf& _
	  vbcrlf& val_url &"register.asp?action=reg_val&val_var="&val_var& _
	  vbcrlf& _
	  vbcrlf&"并请在验证后登陆本站用户中心修改您的相关注册信息！"
    temp1=temp1&"您现在的状态为：<font class=red>未审核</font><br><br>请尽快查收您的邮箱（"&email&"）并进行<a href='register.asp?action=reg_val'>注册验证</a>身份！<br><br>"
  else
    sbody=sbody&vbcrlf&"感谢您的注册，请尽快登陆本站并更新您的个人信息。"
    call cookies_load()
    response.cookies(joekoe_cms.web_cookies)("login_username")=username
    response.cookies(joekoe_cms.web_cookies)("login_password")=jk_encrypt(password)
    temp1=temp1&"请尽快修改您的个人资料，现在进入 <a href='login.asp' class=blue>用户中心</a> 修改资料。<br><br>"
  end if
  sbody=sbody&vbcrlf&vbcrlf&"用户登陆页面：" & _
	vbcrlf& val_url &"login.asp"
  if int(reg_val)<>2 then 
  sendmail=send_mail(username,email,stit,sbody)
   if sendmail then
    temp1=temp1&"<font class=red>注册邮件已成功发送至邮箱（"&email&"）中！</font>"
   else
    temp1=temp1&"<font class=red2>系统配置不正常，注册邮件没有能正确发送！</font>"
   end if
  end if
  response.write temp1
  call val_chk_end("reg")
 end if
end sub

sub register_val()
  call user_ip_stop1(1)
  if useripstop=0 then
  dim usernames,email,msg_email,reg_true
  reg_true=false
  usernames=trim(request.form("username"))
  email=trim(request.form("email"))
  if symbol_name(usernames)=false or email_ok(email,50)=false then
    response.write joekoe_cms.js_put("alert(""您输入的 用户名称 和 E-mail 为空或不符合相关规则！"");parent.document.reg_frm.val_button.disabled=false;",1)
    exit sub
  end if
  if health_name(usernames)=false then
    response.write joekoe_cms.js_put("alert(""您输入的 用户名称 含有本系统禁用字符！"");parent.document.reg_frm.username.focus();parent.document.reg_frm.val_button.disabled=false;",1)
    exit sub
  end if
  
  sql="select top 1 id from user_data where username='"&usernames&"'"
  set rs=joekoe_cms.exec(sql,1)
  if not rs.eof then
    rs.close
    response.write joekoe_cms.js_put("alert(""对不起！\n\n您输入的用户名称（"&usernames&"）已被注册！\n\n请择其它的用户名称…"");parent.document.reg_frm.username.focus();parent.document.reg_frm.val_button.disabled=false;",1)
    exit sub
  end if
  rs.close
  if int(format_mid_num(5))=1 then
    msg_email="和E-mail（"&email&"）"
    sql="select top 1 id from user_data where email='"&email&"'"
    set rs=joekoe_cms.exec(sql,1)
    if not rs.eof then
      rs.close
      response.write joekoe_cms.js_put("alert(""对不起！\n\n您输入的E-mail（"&email&"）已被使用！\n\n请使用其它E-mail…"");parent.document.reg_frm.email.focus();parent.document.reg_frm.val_button.disabled=false;",1)
      exit sub
    end if
    rs.close
  end if
  response.write joekoe_cms.js_put("alert(""恭喜！\n\n您输入的用户名称（"&usernames&"）"&msg_email&"可以注册！"");",1)
 end if
end sub

sub register_main()
call user_ip_stop1(1)
  if useripstop=0 then
%>
<form name=val_name_frm action='?action=val' method=post target=hiddenframe>
<input type=hidden name=username value=''>
<input type=hidden name=email value=''>
</form>
<script language=javascript>
<!--
function val_name()
{
  var username=document.reg_frm.username.value;
  var email=document.reg_frm.email.value;
  if (username=="" || email=="")
  {
    alert("请先填写您要注册的 用户名称 和 E-mail ！");
    if (username=="")
    { document.reg_frm.username.focus(); }
    else
    { document.reg_frm.email.focus(); }
    return false;
  }
  else
  {
    document.reg_frm.val_button.disabled=true;
    document.val_name_frm.username.value=username;
    document.val_name_frm.email.value=email;
    document.val_name_frm.submit();
  }
}

function reg_check()
{
  if (document.reg_frm.username.value=="")
  { alert("请填写您的 用户名称 ！"); document.reg_frm.username.focus(); return false; }
  if (document.reg_frm.password.value=="" || document.reg_frm.password2.value=="")
  { alert("请填写您的 登陆密码 和 确认密码 ！"); document.reg_frm.password.focus(); return false; }
  else
  {
    if (document.reg_frm.password.value != document.reg_frm.password2.value)
    { alert("登陆密码 和 确认密码 必须相同！"); document.reg_frm.password2.focus(); return false; }
  }
  if (document.reg_frm.passwd.value=="")
  { alert("请填写您的 密码钥匙 ！"); document.reg_frm.passwd.focus(); return false; }
  if (document.reg_frm.email.value=="")
  { alert("请填写您的 Email ！"); document.reg_frm.email.focus(); return false; }
  if (document.reg_frm.valcode.value=="")
  { alert("请填写 验 证 码称 ！"); document.reg_frm.valcode.focus(); return false; }
}


function show_face()
{
  var nface=document.reg_frm.face.options[document.reg_frm.face.selectedIndex].value;
  document.images.face_img.src=nface;
  document.reg_frm.face_pic.value=nface;
}
function show_face2()
{
  document.images.face_img.src=document.reg_frm.face_pic.value;
}


function showadv(){
if (document.reg_frm.advshow.checked == true) {
	 adv.style.display = "";
	 advance.innerText="关闭高级用户设置选项";
}else{
	adv.style.display = "none";
	advance.innerText="显示高级用户设置选项";
}
}
//-->
</SCRIPT>
<table id=regtable border=0 width=320 cellspacing=0 cellpadding=2>
<tr><td <%response.write dd1%> height=10></td><td <%response.write dd2%>></td></tr>
<form name=reg_frm action='?action=chk' method=post onsubmit="frm_submitonce(this);">
<input type=hidden name=chk value='yes'>
<input type=hidden name=reg value='yes'>
<tr><td>用户名称：</td><td><input type=text name=username size=20 maxlength=20><%response.write redx%><input type=button class=btn name=val_button value='验 证' class=bg_2 title='点击验证您填写的用户名是否可以注册' onclick="javascript:val_name();"></td></tr>
<tr><td>登陆密码：</td><td><input type=password name=password size=15 maxlength=20<%if int(format_mid_num(46))=0 then%> readOnly onKeyDown="Calc.password.value=this.value" onChange="Calc.password.value=this.value" onclick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''"<%end if%>><%response.write redx%></td></tr>
<tr><td>确认密码：</td><td><input type=password name=password2 size=15 maxlength=20<%if int(format_mid_num(46))=0 then%> readOnly onKeyDown="Calc.password.value=this.value" onChange="Calc.password.value=this.value" onclick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''"<%end if%>><%response.write redx%><font class=gray>请在输入一遍</font></td></tr>
<tr><td>密码钥匙：</td><td><input type=text name=passwd size=20 maxlength=20><%response.write redx%><font class=gray>可取回丢失密码</font></td></tr>
<tr><td>E - mail：</td><td><input type=text name=email size=30 maxlength=50><%response.write redx%></td></tr>
<tr><td>您的性别：</td><td>&nbsp;<input type=radio name=sex value='boy' checked class=tr>&nbsp;男孩&nbsp;&nbsp;&nbsp;<input type=radio name=sex value='girl' class=tr>&nbsp;女孩&nbsp;<%response.write redx%></td></tr>
<tr><td>用户类别：</td><td>&nbsp;<input type=radio name=isper value='no' checked class=bg_td>&nbsp;企业用户&nbsp;&nbsp;&nbsp;<input type=radio name=isper value='yes' class=bg_td>&nbsp;个人用户</td></tr>
<tr><td>验 证 码：</td><td><%response.write val_code("reg")%></td></tr>
</table>

<table border=0 width=500 cellspacing=0 cellpadding=2 id=adv style="DISPLAY:none">
<tr><td colspan=2><hr size=1 color=#c0c0c0 width='90%'></td></tr>
<tr class=tr><td>头像预览：</td>
<td><img border=0 src='../images/face/0.gif' name=face_img onload="javascript:if(this.width><%response.write max_w%>)this.width=<%response.write max_w%>;"></td>
</tr>
<tr class=tr><td>选择头像：</td><td><select size=1 name=face style='width: 50;' onChange="javascript:show_face();"><%
  for i=0 to dim_num(5)
    response.write vbcrlf & "<option value='../images/face/"&i&".gif'"
    if uface="../images/face/"&i&".gif" then response.write " selected"
    response.write ">"&i&"</option>"
  next
%></select>&nbsp;&nbsp;<a href='face.asp' target=_blank>→查看所有头像</a></td></tr>
<tr class=tr><td>来自哪里：</td><td><input type=text name=whe value='' size=28 maxlength=20></td></tr>
<tr class=tr><td>用户头衔：</td><td><input type=text name=nname value='' size=28 maxlength=20 <%if int(format_mid_num(41))=0 then response.write "readonly"%>></td></tr>
<tr class=tr><td>您的生日：</td><td><select name=b_year><%
  for i=1900 to year(now)
  response.write vbcrlf&"<option value='"&i&"'"
  if i=1990 then response.write " selected"
  response.write ">"&i&"</option>"
  next
  response.write vbcrlf&"</select>年 <select name=b_month>"
  for i=1 to 12
    response.write vbcrlf&"<option value='"&i&"'>"&i&"</option>"
  next
  response.write vbcrlf&"</select>月 <select name=b_day>"
  for i=1 to 31
    response.write vbcrlf&"<option value='"&i&"'>"&i&"</option>"
  next
%></select>日<%response.write redx%></td></tr>
<tr class=tr><td class=htd>个性签名：<br><%response.write web_frm_word%><br>长度<=250字节</td><td><textarea name=remark cols=50 rows=7></textarea></td></tr>
<tr class=trb><td>开放联系信息：</td><td><input type=checkbox name=p45 value='yes'checked class=trb>&nbsp;选择表示开放下面几项联系信息，在关闭时只对于您的好友开放显示。</td></tr>
<tr class=tr><td>QQ：</td><td><input type=text name=qq value='' size=15 maxlength=15></td></tr>
<tr class=tr><td>MSN：</td><td><input type=text name=msn value='' size=30 maxlength=50></td></tr>
<tr class=tr><td>主页地址：</td><td><input type=text name=url value='' size=50 maxlength=100></td></tr>
<tr class=tr><td>联系电话：</td><td><input type=text name=phone value='' size=30 maxlength=20></td></tr>
<tr class=tr><td>联系地址：</td><td><input type=text name=address value='' size=50 maxlength=100></td></tr>
</table>
<table border=0 width=320 cellspacing=0 cellpadding=2>
<tr><td colspan="2"><INPUT id=advcheck name=advshow type=checkbox value=1 onclick=showadv()><span id=advance>显示高级用户设置选项</span></td></tr>

<tr><td height=50 colspan=2 align=center><input type=submit class=btn value='提 交 注 册' onclick="javascript:return reg_check();">　　<input type=reset class=btn value='重新填写'></td></tr>
</form>
</table>
<table border=0 width=300 cellspacing=0 cellpadding=2>
<tr><td><hr size=1 color=#c0c0c0 width='90%'></td></tr>
<tr><td align=center><font class=blue>用户注册注意事项</font></td></tr>
<tr><td>1、用户名称一经注册成功之后将不可以随意更改；</td></tr>
<tr><td>2、用户名称不能含有特殊字符以及不健康字符等；</td></tr>
<tr><td>3、登陆密码由大小写英文字母、阿拉伯数字等组成；</td></tr>
<tr><td>4、用户名和登陆不能相同，其长度均不得超过20位；</td></tr>
<tr><td>5、如出现“<font class=red>验证码错误</font>”的提示，请刷新重新注册；</td></tr>
<tr><td>6、以上要填写的注册信息<font class=red>除密码外</font>均不区分大小写；</td></tr>
<tr><td height=10></td></tr>
</table>
<%
end if
end sub

sub register_read()
call user_ip_stop1(1)
  if useripstop=0 then
%>
<table border=0 width=450 cellspacing=0 cellpadding=0>
<tr><td height=10></td></tr>
<tr><td class=htd>
<!-- #include file="../include/inc_register.inc" -->
</td></tr>
<form name=form_reg action='?' method=get>
<input type=hidden name=action value='main'>
<tr><td height=50 align=center><input type=submit class=btn value="我已阅读并同意以上条款">　　　<input type=button class=btn value="不同意" onclick="javascript:document.location.href='index.asp';"></td></tr>
</form>
</table>
<%
end if
end sub

function rnd_birthday()
  dim rtmp,ri,rm,ryear,rmonth,rday
  rtmp=joekoe_cms.rand_num(2)
  for ri=1 to 5
    if rtmp<=15 then exit for
    rtmp=rtmp\2
    ri=ri-1
  next
  ryear=1981+rtmp
  rtmp=joekoe_cms.rand_num(2)
  for ri=1 to 5
    if rtmp<=12 then exit for
    rtmp=rtmp\2
    ri=ri-1
  next
  if rtmp<1 then rtmp=1
  rmonth=rtmp
  rm=30
  if rmonth=2 then rm=28
  rtmp=joekoe_cms.rand_num(2)
  for ri=1 to 5
    if rtmp<=rm then exit for
    rtmp=rtmp\2
    ri=ri-1
  next
  if rtmp<1 then rtmp=1
  rday=rtmp
  rnd_birthday=ryear&"-"&rmonth&"-"&rday
end function
%>