<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<% 
Dim Rs,Znum
Dim Username,Password,Perid,UserEmail,JobType,Question,Answer
Dim Agree
'//检验用户是否同意用户协议
Agree = Replace_text(request.form("agree"))
If Agree = "" Then
  Response.write "<script >alert('"&Cls_WebName&" 提示：\n\n对不起，您没有同意用户服务协议,请重新注册...');history.back(-1);</script>"
  Response.end
End if

Username = Replace_text(Request.Form("username")) '//用户名
Password = Replace_text(Request.Form("password")) '//密码
Randomize timer
Znum = Cint(8999*Rnd+1000)
Perid = Cls_WebKey&gen_key(10)&Znum               '//会员ID
Useremail=replace_text(request.form("useremail")) '//邮件
Question = replace_text(request.form("question")) '//问题提示
Answer = replace_text(request.form("answer"))     '//提示答案
JobType = replace_text(request.form("jobtype"))     '//会员类型
Cityid = Replace_Text(Request("Cityid"))

Set Rs = Server.Createobject("ADODB.recordset")
'//检测是否含有同名帐号
Rs.Open "Select UserName,UserEmail,Perid From [pH_Person_Base] Where Username='"&username&"' or Useremail='"&useremail&"'  or Perid='"&Perid&"'",Conn,1,1

If Not Rs.Eof Then
    '//同名的帐号
	If Rs("Username") = UserName or Rs("Perid") = Perid Then
	    CloseRs
		CloseDB
		Response.write "<script >alert('"&Cls_WebName&" 提示：\n\n对不起，你的帐号已经使用了,请重新选择帐号并继续注册...');history.back(-1);</script>"
		Response.end
    End if
	'//同名的邮件
    If Rs("Useremail") = Useremail Then
	    CloseRs
	    CloseDB
		Response.write "<script >alert('"&Cls_WebName&" 提示：\n\n对不起，系统中有同名的邮箱,请重新选择邮箱并继续注册...');history.back(-1);</script>"
	    Response.end
    End if

End if 
Rs.Close


 %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName %> -- 个人会员注册</title>
</head>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <!--#include file="../Header/Person_Login.asp" -->
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="50%"><img src="../Images/reg_03.gif" width="292" height="67"></td>
                <td width="50%" valign="bottom"><img src="../Images/reg2_3.gif" width="380" height="54"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td><hr size="1" color="#f1b5a1"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#f1b5a1">
              <tr> 
                <td bgcolor="#FFFFFF"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="35"><img src="../Images/reg1_2_2.gif" width="192" height="18"></td>
                    </tr>
                    <tr> 
                      <td height="25" align="left" class="font-14">欢迎您加入<font color="#FF0000"><%= Cls_WebName %></font>！<font color="#FF0000">请继续下一步填写基本资料，否则账号不能启用</font></td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&nbsp;用户名称：<%= username %> </td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&nbsp;用户密码：<%= password %></td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&nbsp;密码提示：<%= Question %></td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&nbsp;提示答案：<%= Answer %></td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&nbsp;电子邮箱：<%= useremail %></td>
                    </tr>
                    <tr> 
                      <td height="25" align="left" class="font-14"><font color="#000000">加入<%= Cls_WebName %>，您可以：</font></td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&middot;拥有完整、专业又个性化的简历；</td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&middot;查询、订阅、收藏职位，让满意的工作定期发到你的邮箱； </td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&middot;查看哪些企业曾经向您发送过招聘意向； </td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&middot;申请合适您的无数职位； </td>
                    </tr>
                    <tr class="text01"> 
                      <td height="25">&middot;有想法？想交流就去参与论坛。</td>
                    </tr>
                    <tr> 
                      <td height="25" align="left"><%= Cls_WebName %>，随时等待您应聘！现在就开始填写简历吧！ 
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
              <form action="Register3.asp" name="reg" method="POST">
                <tr> 
                  <td height="40" align="center"> <input type="hidden" name="username" value="<%= username %>"> 
                    <input type="hidden" name="password" value="<%= password %>"> 
                    <input type="hidden" name="useremail" value="<%= useremail %>">
					 <input type="hidden" name="cityid" value="<%= Cityid %>">
                    <input type="hidden" name="perid" value="<%= perid %>"> <input type="hidden" name="question" value="<%= question %>"> 
                    <input type="hidden" name="answer" value="<%= answer %>"> 
                    <input type="hidden" name="jobtype" value="<%= jobtype %>"> 
                    <input type="submit" name="Submit" value=" 下一步：基本资料填写 " style="height:30px;"> 
                  </td>
                </tr>
              </form>
            </table></td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table>
	  <!--#include file="../Include/Footer.asp" -->
	  </td>
  </tr>
</table>

</body>
</html>
<% CloseDB %>
