<!--#include file="sub/webvar.asp"--> 
<!--#include file="sub/fun.asp"--> 
<!--#include file="sub/conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="inc/upiconfig.asp"-->
<%
'//==恒浪整合检查注册开始==By Howave.Net & SeaShell 2007/05/10==
 Howave_CheckIsReg
'//==检测注册结束====
if request.Cookies("yzlove")("grade")>=333 then
	closeconn
	call msg("你已经是本站会员，不需要再注册了","-1")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>娱乐杭州交友网新会员注册。</title>
<link href="sub/main.css" rel="stylesheet" type="text/css">
</head>
<%=webbody%>
<!--#include file="top.asp"-->
<table width="778" height="7" border="0" align="center" cellpadding="0" cellspacing="0" background="images/05_title_son_back.gif" bgcolor="FFC3DD">
  <tr> 
    <td width="24"></td>
    <td valign="top"><img src="images/05_title_son2.gif" width="26" height="7"></td>
    <td width="95"></td>
    <td width="71"></td>
    <td width="68" ></td>
    <td width="68"></td>
    <td width="68"></td>
    <td width="67"></td>
    <td width="58"></td>
    <td width="48"></td>
    <td width="87"></td>
  </tr>
</table>
<table width="778" height="9" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td align="center" valign="top"><img src="images/zeai/3.gif" width="760" height="22"></td>
  </tr>
</table>
<table width="778" height="24" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="107" align="right" valign="top"><font color="#FF6699">新用户注册！</font></td>
    <td width="661" align="center" valign="top" style="padding-bottom:6px;">&nbsp;</td>
  </tr>
</table>
<%
if request("action")="apply" then
call reg_2()
elseif request("action")="save" then
call reg_3()
  if founderr and errmsg<>"" then call yzlove_error("<font style='font-size:18pt;font-family: Verdana, Arial, Helvetica, sans-serif'>Sorry!</font> <br><br>由于某种原因，注册失败！<br><br><a href=javascript:history.back()><< 返回</a> <br><br>")
else
call reg_1()
end if
%>
<%sub reg_1()%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="images/zeai/member_01.gif" width="778" height="27"></td>
  </tr>
</table>
<table width="778" height="247" border="0" align="center" cellpadding="0" cellspacing="0" background="images/zeai/member_2.gif">
  <tr> 
    <td valign="top"> 
      <table width="692" border="0" align="center" cellpadding="0" cellspacing="0" >
          <tr> 
            
          <td width="5">&nbsp;</td>
            
          <td align="center" valign="top" bgcolor="#FFFFFF"> 
            <table width="657" height="36" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr> 
                <td align="center" style="font-size:10.3pt;border-bottom:#cccccc 1px dotted;"><b><font color="#0066CC">服务条款和声明</font></b></td>
              </tr>
            </table>
            <table width="622" height="296" border="0" cellpadding="15" cellspacing="0">
              <tr> 
                  
                <td valign="top" style="line-height:150%;"> 　　　　　　　　　　　　注册前请先阅读娱乐杭州交友网(www.hapjy.com)注册协议<br>
                  <br>
                  　　欢迎您加入娱乐杭州交友网(www.hapjy.com)这个大家庭，为维护网上公共秩序和社会稳定，请您自觉遵守以下条款：<br>
                  <font color="0066CC">一、</font>不得利用本站危害国家安全、泄露国家秘密，不得侵犯国家社会集体的和公民的合法权益，不得利用本站制作、复制和传播下列信息： 
                  <p><font color="0066CC">（一）</font>煽动抗拒、破坏宪法和法律、行政法规实施的；<br>
                    <font color="0066CC">（二）</font>煽动颠覆国家政权，推翻社会主义制度的；<br>
                    <font color="0066CC">（三）</font>煽动分裂国家、破坏国家统一的；<br>
                    <font color="0066CC">（四）</font>煽动民族仇恨、民族歧视，破坏民族团结的；<br>
                    <font color="0066CC">（五）</font>捏造或者歪曲事实，散布谣言，扰乱社会秩序的；<br>
                    <font color="0066CC">（六）</font>宣扬封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖、教唆犯罪的；<br>
                    <font color="0066CC">（七）</font>公然侮辱他人或者捏造事实诽谤他人的，或者进行其他恶意攻击的；<br>
                    <font color="0066CC">（八）</font>损害国家机关信誉的；<br>
                    <font color="0066CC">（九）</font>其他违反宪法和法律行政法规的；<br>
                    <font color="0066CC">（十）</font>进行商业广告行为的。 </p>
                    
                  <p><font color="0066CC">二、</font>互相尊重，对自己的言论和行为负责。<br>
                    <br>
                    <font color="0066CC">三、</font>会员义务：<br>
                    　　1.遵守本网站的网站章程。<br>
                    　　2.如实、详细地提供个人资料，发布真实的照片。<br>
                    　　3.遵守国家的法律法规，严禁利用本网站从事宗教活动或其他违法、违规活动。<br>
                    　　4.未经当事人同意，不随意泄露其他会员的资料。<br>
                    　　5.积极参加本网站的各项活动，并为网站的各项活动献计献策。<br>
                    　　6.会员有义务维护本网站的声誉，不做有损本网站形象的事。<br>
                    <br>
                    <font color="0066CC">四、</font>娱乐杭州交友网(www.hapjy.com)属服务性质，不负责对信息进行核实，不承担因此带来的任何责任。</p></td>
                </tr>
              </table>
              <table width="378" height="40" border="0" cellpadding="0" cellspacing="0">
			  <form action="reg.asp?action=apply" method="post">
                <tr> 
                  <td align="center"><b> 
                    <input name="Submit2" type="image" src="images/regnew2.gif" width="131" height="36">
                    </b></td>
                </tr>
				</form>
              </table></td>
            
          <td width="5" align="center" style="line-height:130%;">&nbsp;</td>
          </tr>
      </table>
      　</td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="images/zeai/member_3.gif" width="778" height="33"></td>
  </tr>
</table>
<%end sub%>
<%sub reg_2()%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/zeai/member_01.gif" width="778" height="27"></td>
  </tr>
</table>
<table width="778" height="247" border="0" align="center" cellpadding="0" cellspacing="0" background="images/zeai/member_2.gif" bgcolor="#FFFFFF">
  <tr> 
    <td><br> <table width="692" border="0" align="center" cellpadding="0" cellspacing="0" >
          <tr> 
            
          <td width="5">&nbsp;</td>
            
          <td align="center" valign="top" bgcolor="#FFFFFF" >
		  <form method="post"  action="reg.asp?action=save" name=frmAnnounce>
              <table width="622" height="40" border="0" cellpadding="0" cellspacing="0" bgcolor="D0F2FD">
              <tr> 
                <td align="center" style="font-size:12pt;"><b><font color="#0066CC">第一步：填写基本注册资料</font></b></td>
              </tr>
            </table>
              <table width="624" height="95" border="0" cellpadding="6" cellspacing="1">
                <tr align="center" valign="top"> 
                  <td width="156" bgcolor="DFF4FF"><img src="images/party.jpg" width="120" height="68" hspace="5" vspace="4" border="1" style="border-color:#ffffff;"><br> 
                    <input name="kind" type="radio" id="radio3" style="WIDTH: 12px"  value="约会交友" checked> 
                    <b><font color="006699">约会交友</font></b> <br> <table width="90%" border="0" cellspacing="0">
                      <tr> 
                        <td width="100%"><font color="006699">志同道合的真诚友谊，一起吃喝玩乐，做些大家都爱做的事情。</font></td>
                      </tr>
                    </table></td>
                  <td width="156" bgcolor="#FFE1ED"><img src="images/ring.jpg" width="120" height="68" hspace="5" vspace="4" border="1" style="border-color:#ffffff;"><br> 
                    <input name="kind"  type="radio" id="radio4" style="WIDTH: 12px" value="婚姻恋爱"> 
                    <b><font color="F75596">婚姻恋爱</font></b><br> <table width="90%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="100%"><font color="F75596">寻找一个终身伴侣、一份真挚长久的感情。</font></td>
                      </tr>
                    </table></td>
                  <td width="156" bgcolor="#FEF2CB"><img src="images/06/bedfeet.jpg" width="120" height="68" hspace="5" vspace="4" border="1" style="border-color:#ffffff;"><br> 
                    <input id="radio6" style="WIDTH: 12px"  type="radio" value="浪漫情人" name="kind"> 
                    <b><font color="FF6600">浪漫情人</font></b> <br> <table width="90%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="100%"><font color="FF6600">我始终相信还有真爱，但这份真爱不只存在于围城内！ 
                          </font></td>
                      </tr>
                    </table></td>
                  <td width="156" bgcolor="#CEE1FF"><img src="images/zeai/business.gif" width="120" height="68" hspace="5" vspace="4" border="1" style="border-color:#ffffff;"><br> 
                    <input id="radio" style="WIDTH: 12px"  type="radio" value="以商会友" name="kind">
                    <b><font color="#0066CC">以商会友</font></b> <br> <table width="90%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="100%"><font color="#0066CC">商务人士资源共享，集大家的力量解决个人实际问题！</font></td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
              <table width="75" height="5" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td></td>
                </tr>
              </table>
              <table width="622" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="A0DFF3">
                <tr bgcolor="#FFFFFF"> 
                  <td width="153" align="right"><b> 登录用户名：<br>
                    </b></td>
                  <td width="437"> <input name=username type="text" 
 class=tx id="username" style="height:20;font-size:9pt;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid;" size="25" maxlength="12"> 
                    <font color="#006699">(注：一个汉字长度是2，英文字母和数字是1) </font> <table width="75" height="5" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td></td>
                      </tr>
                    </table>
                    <font color="#333333"> 只能使用汉字、a-z的大小写英文字母、数字，总长度在3-12个字符之间。<br>
                    <font color="#006699">如已被使用，建议在用户名后加上数字。 </font></font></td>
                </tr>
                <tr> 
                  <td align="right" bgcolor="DFF4FF"><b>登录密码：<br>
                    </b></td>
                  <td bgcolor="DFF4FF"> <font color="#333333"> 
                    <INPUT name=password1 type="password" 
 class=tx id="password12" style="height:20;font-size:9pt;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid;" size="25" maxlength="20" >
                    　6-20个字符。</font></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td align="right"><b>登录确认密码：<br>
                    </b></td>
                  <td> <font color="#333333"> 
                    <input name=password2 type="password" 
 class=tx id="password22" style="height:20;font-size:9pt;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid;" size="25" maxlength="20">
                    　6-20个字符。</font></td>
                </tr>
                <tr> 
                  <td align="right" bgcolor="DFF4FF"><b>性　　别：</b></td>
                  <td bgcolor="DFF4FF"> <input name="sex" type="radio" id="radio5" style="WIDTH: 12px"  value="男" checked> 
                    <font color="#333333"><img src="images/man.gif" hspace="4"  align="absmiddle">男&nbsp; 
                    <input id="radio8" style="WIDTH: 12px"  type="radio" value="女" name="sex">
                    <img src="images/women.gif"  hspace="4" align="absmiddle">女 
                    &nbsp;</font></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td align="right"><b>生　　日：</b></td>
                  <td><font color="#333333"> 
                    <select name=year style="font-size:9pt;">
                      <option value="" selected>请选择</option>
                      <option value=1988>1988</option>
                      <option value=1987>1987</option>
                      <option value=1986>1986</option>
                      <option value=1985>1985</option>
                      <option value=1984>1984</option>
                      <option value=1983>1983</option>
                      <option value=1982>1982</option>
                      <option value=1981>1981</option>
                      <option value=1980>1980</option>
                      <option value=1979>1979</option>
                      <option value=1978>1978</option>
                      <option value=1977>1977</option>
                      <option value=1976>1976</option>
                      <option value=1975>1975</option>
                      <option value=1974>1974</option>
                      <option value=1973>1973</option>
                      <option value=1972>1972</option>
                      <option value=1971>1971</option>
                      <option value=1970>1970</option>
                      <option value=1969>1969</option>
                      <option value=1968>1968</option>
                      <option value=1967>1967</option>
                      <option value=1966>1966</option>
                      <option value=1965>1965</option>
                      <option value=1964>1964</option>
                      <option value=1963>1963</option>
                      <option value=1962>1962</option>
                      <option value=1961>1961</option>
                      <option value=1960>1960</option>
                      <option value=1959>1959</option>
                      <option value=1958>1958</option>
                      <option value=1957>1957</option>
                      <option value=1956>1956</option>
                      <option value=1955>1955</option>
                      <option value=1954>1954</option>
                      <option value=1953>1953</option>
                      <option value=1952>1952</option>
                      <option value=1951>1951</option>
                      <option value=1950>1950</option>
                      <option value=1949>1949</option>
                      <option value=1948>1948</option>
                      <option value=1947>1947</option>
                      <option value=1946>1946</option>
                      <option value=1945>1945</option>
                      <option value=1944>1944</option>
                      <option value=1943>1943</option>
                      <option value=1942>1942</option>
                      <option value=1941>1941</option>
                      <option value=1940>1940</option>
                      <option value=1939>1939</option>
                      <option value=1938>1938</option>
                      <option value=1937>1937</option>
                      <option value=1936>1936</option>
                      <option value=1935>1935</option>
                      <option value=1934>1934</option>
                      <option value=1933>1933</option>
                      <option value=1932>1932</option>
                      <option value=1931>1931</option>
                      <option value=1930>1930</option>
                      <option value=1929>1929</option>
                      <option value=1928>1ā928</option>
                      <option value=1927>1927</option>
                      <option value=1926>1926</option>
                      <option value=1925>1925</option>
                      <option value=1924>1924</option>
                      <option value=1923>1923</option>
                      <option value=1922>1922</option>
                      <option value=1921>1921</option>
                      <option value=1920>1920</option>
                      <option value=1919>1919</option>
                      <option value=1918>1918</option>
                      <option value=1917>1917</option>
                      <option value=1916>1916</option>
                      <option value=1915>1915</option>
                      <option value=1914>1914</option>
                      <option value=1913>1913</option>
                      <option value=1912>1912</option>
                      <option value=1911>1911</option>
                      <option value=1910>1910</option>
                    </select>
                    年 
                    <select name="month" size="1" id="select3"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                      <%for i=1 to 12 %>
                      <%if i=month(now()) then%>
                      <option value=<%=i%> selected><%=i%></option>
                      <%else%>
                      <option value=<%=i%> ><%=i%></option>
                      <%end if%>
                      <%next%>
                    </select>
                    月 
                    <select name="day" size="1" id="select4"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                      <%for i=1 to 31 %>
                      <%if i=day(now()) then%>
                      <option value=<%=i%> selected><%=i%></option>
                      <%else%>
                      <option value=<%=i%> ><%=i%></option>
                      <%end if%>
                      <%next%>
                    </select>
                    日&nbsp; 　</font></td>
                </tr>
                <tr> 
                  <td align="right" bgcolor="DFF4FF"><b> 婚姻状况：</b></td>
                  <td bgcolor="DFF4FF"> <select name="love" size="1" id="love"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                      <option value="未婚" selected>未婚</option>
                      <option value="已婚">已婚</option>
                      <option value="离异有子女">离异有子女</option>
                      <option value="离异无子女">离异无子女</option>
                      <option value="丧偶有子女">丧偶有子女</option>
                      <option value="丧偶无子女">丧偶无子女</option>
                    </select> </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td align="right"><b>地　　区：</b></td>
                  <td> <select name="area" id="area"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                      <option value="江苏">江苏</option>
                      <option value="北京市">北京市</option>
                      <option value="上海市">上海市</option>
                      <option value="天津">天津市</option>
                      <option value="重庆市" selected>重庆市</option>
                      <option value="河北">河北</option>
                      <option value="山西">山西</option>
                      <option value="内蒙古">内蒙古</option>
                      <option value="河南">河南</option>
                      <option value="辽宁">辽宁</option>
                      <option value="黑龙江">黑龙江</option>
                      <option value="吉林">吉林</option>
                      <option value="山东">山东</option>
                      <option value="安徽">安徽</option>
                      <option value="江西">江西</option>
                      <option value="福建">福建</option>
                      <option value="浙江">浙江</option>
                      <option value="湖北">湖北</option>
                      <option value="湖南">湖南</option>
                      <option value="湖南">湖南</option>
                      <option value="广东">广东</option>
                      <option value="广西">广西</option>
                      <option value="海南">海南</option>
                      <option value="四川">四川</option>
                      <option value="贵州">贵州</option>
                      <option value="云南">云南</option>
                      <option value="西藏">西藏</option>
                      <option value="陕西">陕西</option>
                      <option value="甘肃">甘肃</option>
                      <option value="宁夏">宁夏</option>
                      <option value="青海">青海</option>
                      <option value="新疆">新疆</option>
                      <option value="香港">香港</option>
                      <option value="澳门">澳门</option>
                      <option value="台湾">台湾</option>
                      <option value="海外">海外</option>
                    </select></td>
                </tr>
                <tr> 
                  <td align="right" bgcolor="DFF4FF"><b>电子邮箱：<br>
                    </b></td>
                  <td bgcolor="DFF4FF"> <INPUT name=email type="text" 
 class=tx id="email2" style="height:20;font-size:9pt;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid;" size="40" maxlength="50"> 
                    <table width="75" height="5" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td></td>
                      </tr>
                    </table>
                    <font color="#333333">密码遗忘取回密码的重要凭证，请正确填写。&lt;30个字符。</font><br> 
                    <font color="#006699">例如：</font><font color="#FF0000">username@163.com</font> 
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td align="right"><b>联系电话：<br>
                    </b></td>
                  <td> <INPUT name=yctel type="text" 
 class=tx id="email" style="height:20;font-size:9pt;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid;" size="40" maxlength="50"> 
                    <font color="#006699">联系电话和真实姓名</font> <table width="75" height="5" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td></td>
                      </tr>
                    </table>
                    <font color="#333333">此信息只有管理员才能看到，我们会不定期通过此电话进行身份确认和安排约会。</font> 
                  </td>
                </tr>
                <tr> 
                  <td align="right" bgcolor="DFF4FF"><b>验 证 码：</b></td>
                  <td bgcolor="DFF4FF"><font color="F78C0D"> 
                    <input name="vercode" style="height:20;font-size:9pt;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid;" size="6" maxlength="4">
                    <img src="sub/verifycodebs.asp" alt="验证码" border="0" width="38" height="10"> 
                    </font> <table width="75" height="5" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td></td>
                      </tr>
                    </table>
                    <font color="#006699"> 请把这4个字符填入到上面的框中，不分大小写。 
                    <input type=hidden name=usercookies value=0>
                    <input name=submitok_reg type="hidden" value="ok_reg">
                    </font></td>
                </tr>
                <tr valign="bottom"> 
                  <td height="70" colspan="2" align="center" bgcolor="#FFFFFF" style="padding-bottom:13px;"> 
                    <input name="Submit" type="image" src="images/regnew.gif" width="176" height="36"> 
                  </td>
                </tr>
              </table>
          </form></td>
            
          <td width="5" align="center" style="line-height:130%;">&nbsp;</td>
          </tr>
      </table>
</td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="images/zeai/member_3.gif" width="778" height="33"></td>
  </tr>
</table>
<%end sub%>

<%
sub reg_3()
dim love,kind,area,email,pass,ip,sex,username
ip=request.ServerVariables("REMOTE_ADDR")
sex=trim(replace(replace(replace(request.form("sex"),"'",""),"[",""),"]",""))
love=trim(replace(replace(replace(request.form("love"),"'",""),"[",""),"]",""))
kind=trim(replace(replace(replace(request.form("kind"),"'",""),"[",""),"]",""))
username=trim(replace(replace(replace(request.form("username"),"'",""),"[",""),"]",""))
'检查外部数据
if chkpost=false then
	ErrMsg=ErrMsg+"<Br>"+"<li>您提交的数据不合法，请不要从外部提交发言。"
   	FoundErr=True
end if
'检查用户名
if username="" or strLength(username)>12 or strLength(username)<3 then
	errmsg=errmsg+"<br>"+"<li>请输入您的用户名(长度不能大于12小于3)。"
	founderr=true
	session("ValidCode")=""
	exit sub
end if
if Instr(username,"=")>0 or Instr(username,"%")>0 or Instr(username,chr(32))>0 or Instr(username,"?")>0 or Instr(username,"&")>0 or Instr(username,";")>0 or Instr(username,",")>0 or Instr(username,"'")>0 or Instr(username,chr(34))>0 or Instr(username,chr(9))>0 or Instr(username,"")>0 or Instr(username,"$")>0 or Instr(username,".")>0 or Instr(username,"''")>0 or Instr(username,"<")>0 or Instr(username,">")>0 or Instr(username,"/")>0 or Instr(username,"\")>0 or Instr(username,"@")>0 or Instr(username,"~")>0 or Instr(username,"#")>0 or Instr(username,"^")>0 or Instr(username,"*")>0 or Instr(username,"(")>0 or Instr(username,")")>0 or Instr(username,"-")>0 or Instr(username,"+")>0 or Instr(username,"{")>0 or Instr(username,"}")>0 or Instr(username,"|")>0 or Instr(username,"→")>0 or Instr(username,"←")>0 or Instr(username,"※")>0 then
	errmsg=errmsg+"<br>"+"<li>用户名中含有非法字符，只能使用中文、英文字母、数字或中文、英文字母、数字的组合。"
	founderr=true
else
	username=trim(replace(replace(replace(request.form("username"),"'",""),"[",""),"]",""))
end if

splitwords=split(bad_words,",")
for i = 0 to ubound(splitwords)
	if instr(username,splitwords(i))>0 then
		errmsg=errmsg+"<br>"+"<li>您输入的用户名中包含系统禁止注册字符。"
		founderr=true
		exit for
	end if
next

set rs=server.createobject("adodb.recordset")
sql="select username from love_main where username='"&username&"'"
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
	errmsg=errmsg+"<br>"+"<li>您输入的用户名已经被他人注册，请重新另选一个用户名。"
	rs.close:set rs=nothing
	founderr=true
	session("ValidCode")=""
	exit sub
end if
	
	
'检查密码
	if request("password1")="" or len(request("password1"))>20 or len(request("password1"))<6 then
		errmsg=errmsg+"<br>"+"<li>请输入您的密码(长度不能大于20小于6)。"
		founderr=true
	else
	pass1=request("password1")
	end if
	if request("password2")="" or strLength(request("password2"))>20 or len(request("password2"))<6 then
		errmsg=errmsg+"<br>"+"<li>请输入确认密码(长度不能大于20小于6)。"
		founderr=true
	else
		pass2=request.form("password2")
	end if
	if pass1<>pass2 then
		errmsg=errmsg+"<br>"+"<li>您输入的密码和确认密码不一致。"
		founderr=true
	else
		password=pass1
	end if


'检查生年
if request("year")="" then
		errmsg=errmsg+"<br>"+"<li>出生的年份没有选择。"
		founderr=true
elseif not isnumeric(request("year")) or len(request("year"))<>4 then
		errmsg=errmsg+"<br>"+"<li>出生的年份只能是4位有效数字。"
		founderr=true
elseif  cint(request("year"))<1901 or cint(request("year"))>2000 then
		errmsg=errmsg+"<br>"+"<li>出生的年份错误，请重新输入。"
		founderr=true
else
	birthday=trim(Request.Form("year"))&"-"&trim(Request.Form("month"))&"-"&trim(Request.Form("day"))
end if

'检查所在地
if request("area")="" or strLength(request("area"))>20 or strLength(request("area"))<2 then
	errmsg=errmsg+"<br>"+"<li>地区(长度不能大于20小于2。"
	founderr=true
else
	area=trim(replace(replace(replace(request.form("area"),"'",""),"[",""),"]",""))
	'city=trim(replace(replace(replace(request.form("city"),"'",""),"[",""),"]",""))
end if
'管理员看到的电话
if strLength(request("yctel"))>50 then
	errmsg=errmsg+"<br>"+"<li>您的联系电话信息太长(长度不能大于40)。"
	founderr=true
else
	yctel=trim(replace(replace(replace(request.form("yctel"),"'",""),"[",""),"]",""))
end if

'检查email
if IsValidEmail(trim(request("email")))=false  or len(request.form("email"))>50 then
	errmsg=errmsg+"<br>"+"<li>您的Email有错误。或只能小于50个字，请检查。"
   	founderr=true
else
		Dim SplitUserEmail
		SplitUserEmail=split(bad_words,",")
		For i=0 to ubound(SplitUserEmail)
			if instr(request("email"),SplitUserEmail(i))>0 then
			errmsg=errmsg+"<br>"+"<li>您填写的Email地址含有系统禁止字符。"
   			founderr=true
			exit for
			end if
		Next
	email=trim(replace(replace(replace(request.form("email"),"'",""),"[",""),"]",""))
end if

'验证码
if trim(Request("vercode"))=empty or trim(Request("vercode"))="" then
	errmsg=errmsg+"<br>"+"<li>验证码不能为空，提交失败！请重试。"
	founderr=true
elseif lcase(trim(Request("vercode")))<>lcase(session("ValidCode")) then
	errmsg=errmsg+"<br>"+"<li>验证码校对错误，提交失败！请重试。"
	founderr=true
end if
	session("ValidCode")=""
if founderr then exit sub

'验证通过，开始入库
set rs=Server.CreateObject("ADODB.recordset")
Rs.Open "select * from love_main",conn,1,3
rs.addnew
rs("username")=username
rs("password")=md5(password)
rs("sex")=sex
rs("birthday")=birthday
rs("love")=love
rs("kind")=kind
rs("area")=area
rs("email")=email
rs("loveb")=reg_loveb
rs("regip")=ip
rs("regtime")=now()
rs("refresh_time")=now()
rs("flag")=reg_flag
rs("endtime")=now()
rs("endip")=ip
rs.update
rs.close
'初始love币记录
call loveb_add(username,reg_loveb,"新用户注册时系统分配")
'------------cookies最后------------
	if founduser then
		Response.Cookies("yzlove")("username")=""
		Response.Cookies("yzlove")("password")=""
		Response.Cookies("yzlove")("sex")=""
		Response.Cookies("yzlove")("kind")=""
		Response.Cookies("yzlove")("grade")=""
		Response.Cookies("yzlove")("usercookies")=""
	end if
	select case request("usercookies")
 	case 0
 		Response.Cookies("yzlove")("usercookies") = request("usercookies")
    case 1
	    Response.Cookies("yzlove").Expires=Date+1
 		Response.Cookies("yzlove")("usercookies") = request("usercookies")
    case 2
		Response.Cookies("yzlove").Expires=Date+31
 		Response.Cookies("yzlove")("usercookies") = request("usercookies")
    case 3
	    Response.Cookies("yzlove").Expires=Date+365
 		Response.Cookies("yzlove")("usercookies") = request("usercookies")
	end select
	Response.Cookies("yzlove")("username") = username
	Response.Cookies("yzlove")("password") = password
	Response.Cookies("yzlove")("sex") = sex
	Response.Cookies("yzlove")("kind") = kind
	Response.Cookies("yzlove")("grade") = 1
	
	
	'//==恒浪整合注册开始==By Howave.Net & SeaShell 2007/06/20==
	If HLIntegration = True Then
	  Dim H_ComeUrl,H_UserSex,H_Question,H_Answer
	  H_Question = username&"的问题"
	  H_Answer = username&"的答案"
	  If sex="男" Then
	      H_UserSex = 1
	  Else
	      H_UserSex = 2
	  End If
	  H_ComeUrl=Request.ServerVariables("HTTP_REFERER")
	  H_ComeUrl=Replace(lcase(H_ComeUrl),"reg.asp?action=apply","")
	  Howave_Reg username,password,Email,H_Question,H_Answer,H_UserSex,H_ComeUrl
	End If
	'//==恒浪整合结束==================================================

	'<meta HTTP-EQUIV=REFRESH CONTENT='2; URL=u_mod.asp?submitok=three'>
%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="images/zeai/member_01.gif" width="778" height="27"></td>
  </tr>
</table>
<table width="778" align=center cellpadding=3 cellspacing=1 background="images/zeai/member_2.gif" class=tableborder1>
  <tr valign="bottom"> 
    <th height=60 style="font-size:9pt;color:666666;">注册成功：<%=usetitle%>欢迎您的到来<br> <br> <br> <table width="622" height="40" border="0" cellpadding="0" cellspacing="0" bgcolor="D0F2FD">
        <tr> 
          <td align="center" style="font-size:12pt;"><b><font color="#0066CC">第二步：完善详细个人资料</font></b></td>
        </tr>
      </table></th>
  </tr>
  <tr> 
    <td height="58" align="center" class=tablebody1> 
      <table width="622" height="180" border="0" cellpadding="0" cellspacing="0" bgcolor="D0F2FD" style="border:#D0F2FD 1px solid;">
        <tr> 
          <td align="center" bgcolor="#FFFFFF" style="font-size:12pt;"><b><a href="u_mod1.asp"><font color="#FF3366"><b><u><img src="images/regnew3.gif" width="176" height="36" border="0"></u></b></font></a></b></td>
        </tr>
      </table> </td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="images/zeai/member_3.gif" width="778" height="33"></td>
  </tr>
</table>
<%end sub%>
<!--#include file="bottom.asp"-->
</body>
</html>
<%closeconn%>