<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>个人求职注册</title>
<link rel="stylesheet" href="<%=HOPE_InstallDir%>Blue/Blue.css" type="text/css" />
<link rel="stylesheet" href="<%=HOPE_InstallDir%>images/General.css" type="text/css" />
<script language="javascript">
 function checkcontent() //提交时统一验证内容不能为空
   {
   	 if((document.all("zhu").style.display!="none") || (document.all("emaildiv").style.display!="none") || (document.all("passdiv").style.display!="none")|| (document.all("passtoodiv").style.display!="none") )
	 {
	 alert("对不起！您所填写的信息中有误！请检查输入正确的信息!");
	 return false;
    }
 
     if(document.form.Verifycode.value.replace(/\s+/g,"")=="")
	  {
	   alert("请输入验证码！");
	   document.form.Verifycode.focus();
	   return false;
	  }
 
	 if(document.form.uname.value.replace(/\s+/g,"")=="")
	 {
	  alert("请输入用户名！");
	  document.form.uname.focus();
	  return false;
	 }
	 if(document.form.pass.value.replace(/\s+/g,"")=="")
	 {
	  alert("请输入登录密码！");
	  document.form.pass.focus();
	  return false;
	 }
	 if(document.form.confirmpassword.value.replace(/\s+/g,"")=="")
	  {
	   alert("请输入确认密码！");
	   document.form.confirmpassword.focus();
	   return false;
	  }
 
 
 	 if(document.form.email.value.replace(/\s+/g,"")=="")
	  {
	   alert("请输入电子邮箱地址！");
	   document.form.email.focus();
	   return false;
 	  }
 
   }
   
  //存储会员名单--------start ------------------------------------------
    sallte=new Array();
	<%
	Dim iie
	iie=0
	sqlchecke="select jobuser from Websen_jobuser"  
	set rsche=server.CreateObject("adodb.recordset")
	rsche.open sqlchecke,conn,1,1
 	if not rsche.eof then 
	do while not rsche.eof
	%>
	sallte[<%=iie%>]=new Array("<%=rsche("jobuser")%>");
	<%
	iie=iie+1
	rsche.movenext
	loop
	rsche.close
	end if
	%>
   
 	function check_userName(value)
    {
		//验证登录名
   	  var filter=/^\s*[A-Za-z0-9]{6,20}\s*$/;
	if(value.replace(/\s+/g,"")!="")
	 {
	 if(!filter.test(value))
	   { 
		 
 		document.all("zhu").innerText="温馨提示：登录名填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9）长度不小于6个字符，不超过20个字符，注意不要使用空格。"; 
		document.all("zhu").style.display='';
		document.form.uname.focus();
 		return false; 
 		}
		
	  else
		   {
		   
			var iie;
			var ishavee=false;
			  for(iie=0;iie<sallte.length;iie++) 
			  {
				if(sallte[iie][0]==value) 
			   {
				ishavee=true ;	
			   }
			  }
			   if(ishavee==false)
				 {
					document.all("zhu").style.display='none';
				 }
			   else 
			   {
					document.all("zhu").innerText="温馨提示：对不起！您输入的登录名已经存在被人使用，请换用另一个登录名 ！"; 
					document.all("zhu").style.display='';
					document.form.uname.focus();
  					return false;  
			   }
			   
		   }
		
 	  }
	  else
	  {
	   document.all("zhu").style.display="none";
	  }
	  
	  
	  }
	  
	  
	  
 function check_pass(value)
	 {
	 //验证密码
	   var filter=/^\s*[A-Za-z0-9]{6,20}\s*$/;
		if (!filter.test(value))
		 { 
		  if(value.replace(/\s+/g,"")!="")
		   {
			document.all("passdiv").innerText="温馨提示：登录密码填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9）长度不小于6个字符，不超过20个字符，注意不要使用空格。"; 
			document.all("passdiv").style.display='';
			document.form.pass.focus();
 			return false; 
 		   }
		   else
		   {
		     document.all("passdiv").style.display='none';
			 }
 		}
		else
		{ 
	 	  document.all("passdiv").style.display='none';
  		 if(value!=document.form.confirmpassword.value)
		    {
			 if(document.form.confirmpassword.value.replace(/\s+/g,"")!="")
			 {
    	     	document.all("passtoodiv").innerText="温馨提示：对不起！您两次输入的密码不一致！"; 
				document.all("passtoodiv").style.display='';
 				return false; 	
			  }
			  else
		   {
		 		document.all("passtoodiv").style.display='none';
 		   }
    	    } 
			else
		   {
		 		document.all("passtoodiv").style.display='none';
 		   }
  		 }
 	 }
	 function check_passtoo(value)
	 {
	 //验证二次密码
	   var filter=/^\s*[A-Za-z0-9]{6,20}\s*$/;
		if (!filter.test(value))
		 { 
		 if(value.replace(/\s+/g,"")!="")
		 {
 		document.all("passtoodiv").innerText="温馨提示：确认密码填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9）长度不小于6个字符，不超过20个字符，注意不要使用空格。"; 
		document.all("passtoodiv").style.display='';
		document.form.confirmpassword.focus();
 		return false; 
 		}
		else
		{
				document.all("passtoodiv").style.display='none';
 		}
 		}else
		{
		   if(value!=document.form.pass.value)
		    {
			  if(document.form.pass.value.replace(/\s+/g,"")=="")
			  {
			    document.all("passtoodiv").innerText="温馨提示：对不起！您还没有输入登录密码！"; 
				document.all("passtoodiv").style.display='';
				document.form.pass.focus();
 				return false; 
			  }
			  else
			  {
				document.all("passtoodiv").innerText="温馨提示：对不起！您两次输入的密码不一致！"; 
				document.all("passtoodiv").style.display='';
 				return false; 			  
 			  }
 	        }
	 	 document.all("passtoodiv").style.display='none';
 		}
 	 }
	   function check_email(value)
	 {//验证Email地址
	   var filter=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
	   if(value!="")
	   {
 		if (!filter.test(value))
		   { 	 
			document.all("emaildiv").innerText="温馨提示：对不起！您输入电子邮箱地址格式不正确，请检查！"; 
			document.all("emaildiv").style.display='';
			document.form.email.focus();
 			return false;  
	       }
		   else
		  {
 	 	 document.all("emaildiv").style.display='none';
	  }
  } else
		  {
 	 	 document.all("emaildiv").style.display='none';
	  }
  }
</script>
  
</head>
<%
'--添加记录---------------------------------
goreg=Replace_Text(request.Form("goreg"))
Verifycode=Replace_Text(request.Form("Verifycode"))
uname=Replace_Text(request.Form("uname"))
pass=Replace_Text(request.Form("pass"))
confirmpassword=Replace_Text(request.Form("confirmpassword"))
email=Replace_Text(request.Form("email"))
 
 
if goreg<>"" and Verifycode<>"" and uname<>"" and   pass<>"" and  confirmpassword<>"" and  email<>"" then

if not isnumeric(Verifycode) then
response.Write("<script >alert('请输入正确的验证码!');history.back(-1);</script>")
response.End()
else
vercode=Verifycode
 end if
 
  if issession=0 then
		if Replace_Text(request.Cookies("safecode"))<>"" then
		 safecode=Replace_Text(request.Cookies("safecode"))
		 else
		 safecode=1111
		end if
		else
		 safecode=Session("SafeCode")
  end if
 
 
if cstr(vercode)<>cstr(safecode)  then
response.Write("<script >alert('请输入正确的验证码!');history.back(-1);</script>")
response.End()
end if

set rsj=server.CreateObject("adodb.recordset")
sqlj="select  * from Websen_jobuser where jobuser='"&uname&"' "
rsj.open sqlj,conn,1,3
if not rsj.eof then 
response.Write("<script >alert('对不起！该登录名已经被人使用，请另换一个！');history.back(-1);</script>")
response.End()
else
rsj.addnew
rsj("jobuser")=uname
rsj("jobpass")=pass
rsj("email")=email
rsj("addtime")=date()
rsj("xueli")="未提供"
 rsj("sex")="保密"
rsj.update
rsj.close
response.Write("<script >alert('恭喜你注册成功！请登录个人求职用户管理中心完善自己的简历信息！');location.href='"&HOPE_InstallDir&"job/';</script>")
response.End()
end if
 
  if issession=0 then
 		 response.Cookies("safecode")=""
 		else
		 Session("SafeCode")=""
  end if
end if


'------------------------------------

%>
<body>
<!--#include file="../inc/head.asp"-->
<div class="juzhong">
 <table width="760" border="0" style=" margin-left: 5px" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40" bgcolor="#F6F6F6">&nbsp;<font color="#006699"><b>Welcome!</b></font><font color="#FF0000"><b> 欢迎注册成为<%=webname%>个人求职会员! </b></font>&nbsp;【<a href="<%=HOPE_InstallDir%>job/">招聘中心首页</a>】</td>
  </tr>
  <tr><td height="2"   bgcolor="#D9D9D9"></td></tr>
  <tr><td height="30">
 &nbsp;<font  color="#0099CC" style="font-size: 16px"><b>①</b></font>.请仔细阅读个人求职注册协议中的相关说明!&nbsp;<font  color="RED" style="font-size: 16px"><b>②</b></font>.填写注册信息&nbsp;<font color="#0099CC" style="font-size: 16px"><b>③</b></font>.注册成功后发布你的简历信息,让招聘单位第一时间看见你的信息!
  <br>
  </td></tr>
</table><br />
<table width="760" border="1" cellpadding="0" cellspacing="0" style=" margin-left: 5px" bordercolor="#EBEBEB">
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
	<table width="100%" border="0" style="border-collapse:collapse" align="center" cellpadding="0" cellspacing="0">
 <form  name="form" method="post" action="<%=HOPE_InstallDir%>job/regjob.asp"  onSubmit="return checkcontent()">
    <tr>
    <td height="30"  colspan="2"  align="center" bgcolor="#F3F3F3">第一步注册帐号（说明：*为必填项 ）</td>
  </tr>
  
  <tr><td height="1" colspan="2" bgcolor="#999999"></td>
  </tr>
    <tr  bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#D7E3F3'"> 
    <td width="26%" height="50" align="right">验证码:</td>
    <td width="74%" align="left">&nbsp;&nbsp;
      <input name="Verifycode" tabindex=0   onKeyUp="value=value.replace(/[^\d]/g,'') " size=4 maxlength="5" tonbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" class="mailboxbig"  style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#cccccc;width:45;height:19">
	    <img src="../vCode.asp?" onClick="this.src+=Math.random()" alt="图片看不清？点击重新得到验证码" style="cursor:hand;">
	  &nbsp;<font  color="red">*</font>  	</td>
  </tr> 
  
  
  <tr  bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#D7E3F3'"> 
    <td width="26%" height="50" align="right">登录名:</td>
    <td width="74%" align="left">&nbsp;&nbsp;
      <input name="uname" type="text"   value="" size="20" maxlength="20"  onKeyUp="this.value=this.value.replace(/\s/g,'');check_userName(document.form.uname.value); "   style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#cccccc;width:120;height:19"/>&nbsp;<font  color="red">*</font>&nbsp;&nbsp;<font color="#666666">用户名为6-20位字符组成，只能由字母、数字组成</font>
  	<div id="zhu"  style="display:none; background-color: #FFCC99; color:#333333;"></div>
	
	</td>
  </tr>  <tr  bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
    <td align="right" height="50">密码:</td>
    <td align="left">&nbsp;&nbsp;
      <INPUT   type="password" maxLength=20   size=20   name="pass" onKeyUp="this.value=this.value.replace(/\s/g,'');check_pass(document.form.pass.value);"  style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#cccccc;width:120;height:19" >
    &nbsp;<font  color="red">*</font>&nbsp;&nbsp;<font color="#666666">您必须输入密码，最少6位，最长20位，请保管好个人密码。</font>
    <div id="passdiv"  style="display:none; background-color: #FFCC99; color:#333333;  "></div>
  
  	</td>
  </tr> <tr  bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
    <td align="right" height="50">确认密码:</td>
    <td align="left">&nbsp;&nbsp;
      <INPUT   type="password" maxLength=20   size=20  name="confirmpassword"  onKeyUp="this.value=this.value.replace(/\s/g,'');check_passtoo(document.form.confirmpassword.value);"   style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#cccccc;width:120;height:19"/>&nbsp;<font  color="red">*</font>&nbsp;&nbsp;<font color="#666666">请再次输入密码，以进行密码确认。 </font>
	 <div id="passtoodiv"  style="display:none; background-color: #FFCC99; color:#333333;  "></div>
  	</td>
  </tr> <tr  bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
    <td align="right" height="50">电子邮箱:</td>
    <td align="left">&nbsp;&nbsp;
      <INPUT name="email" value="" size=31  maxLength=50   onKeyUp="this.value=this.value.replace(/\s/g,'');check_email(document.form.email.value);"  style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#cccccc;width:120;height:19">&nbsp;<font  color="red">*</font>&nbsp;&nbsp;<font color="#666666">请输入正确的电子邮箱，用于联系,交流!</font>
  <div id="emaildiv"  style="display:none; background-color: #FFCC99; color:#333333;  "> 
  	</td>
  </tr>
  <tr><td colspan="2" height="50" align="center"><input type="submit" value="我要注册" name="goreg" /></td></tr>
  </form>
 </table></td></tr></table>
 	</td>
  </tr>
 
</table> 
 <!--#include file="../inc/end.asp"-->
 </div>
</body>
</html>
