<!--#include file="conn/conn_index.asp"-->
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/money.asp"-->
<!--#include file="inc/char.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/sql.asp"-->
<%
	end if
	action=ReplaceBadChar(Trim(Request.Form("action")))
	if action="add" then
		If Session("getcode")<>int(Trim(Request.Form("code"))) Then
			response.write"<SCRIPT language=JavaScript>alert('验证码输入错误');"                   
			response.write"javascript:history.go(-1)</SCRIPT>"                   
			response.end
		else
			uname=ReplaceBadChar(Trim(Request.Form("uname")))
			email=ReplaceBadChar(Trim(Request.Form("email")))
			pwd1=ReplaceBadChar(Trim(Request.Form("pwd")))
			pwd=mistake(pwd1)
			question=ReplaceBadChar(Trim(Request.Form("question")))
			if question="cus" then
				custom_question=ReplaceBadChar(Trim(Request.Form("custom_question")))
				if custom_question="" then
					response.write"<SCRIPT language=JavaScript>alert('自定义问题不能为空，请重来');"                   
					response.write"javascript:history.go(-1)</SCRIPT>"                   
					response.end
				else
					question=custom_question
				end if
			end if
			answer=ReplaceBadChar(Trim(Request.Form("answer")))
			Set rs = Server.CreateObject("ADODB.Recordset")
			sql="select * from company where uname='"&uname&"'"
			rs.open sql,conn,2,3
			if not rs.eof then
				response.write"<SCRIPT language=JavaScript>alert('用户名重复，请重新选择一个用户名！');"
				response.write"javascript:history.go(-1)</SCRIPT>"
				response.end
			else
				rs.addnew
				rs("uname")=uname
				rs("pwd")=pwd
				rs("question")=question
				rs("answer")=answer
				rs("email")=email
				rs("fen")=csetup1
				rs("dian")=csetup
				rs("jobnum")=jobnum
				rs("maxfont")=0
				rs("shunxu")=0
				rs("gj")=0
				rs("refresh")=date()
				rs("changepay")=0
				rs("readnum")=0
				rs("begintime")=date()
				rs("endtime")=date()
				rs("grade")=0
				rs("lock")=0
				rs("setup")=date()
				rs("ltime")=date()
				rs("open")=1
				rs.update
				rs.close
				set rs=nothing
			end if
			
			Set rs = Server.CreateObject("ADODB.Recordset")
			sql="select * from company where uname='"&uname&"'"
			rs.open sql,conn,1,1
			kk=rs("id")
			rs.close
			set rs=nothing
			
			Set rs = Server.CreateObject("ADODB.Recordset")
			sql="select * from cmailbox"
			rs.open sql,conn,2,3
			rs.addnew
			rs("reid")=kk
			rs("senduid")="0"
			rs("title")=csmailtitle
			rs("sendname")="系统管理员"
			rs("sdate")=date()
			rs("mailtext")=csmailtext
			rs.update
			rs.close
			set rs=nothing
			
			Response.Cookies("admin_company_name")=uname
			Response.Cookies("admin_company_id")=kk
			
			Response.Cookies("admin_company_name").expires=(now()+1/24)
			Response.Cookies("admin_company_id").expires=(now()+1/24)
		
		'以下为电子邮件发送代码
	
			'邮件发送代码完毕
				
			response.write"<SCRIPT language=JavaScript>alert('恭喜！您已成功注册，现在正为您转向企业中心完成其他设置！');"
			response.write"this.location.href='company/';</SCRIPT>"
			response.end
		end if
	end if
%>
<!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>
<link rel="Shortcut Icon" href="Images/favicon.ico">
<link rel="Bookmark" href="Images/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<TITLE><%= homename %>--企业会员注册</TITLE>
<meta name="Keywords" content="<%= webmeta %>">
<meta name="Description" content="<%= webmeta1 %>">
<style type="text/css">
<!--
.STYLE6 {	color: #0099CC;
	font-size: 12pt;
	font-weight: bold;
	}
.STYLE2 {	color: #ffffff;
	font-size: 14pt;
	font-weight: bold;
}
.style193 {color: #FF6600}
.style193 {color: #FF6600}
body,td,th {
	font-size: 12px;
}
body {
	background-image: url(images/preg/indextopbackground.gif);
	background-repeat:repeat-x;
	margin-left: 0px;
	margin-top: 24px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script language=JavaScript src="js/preg.js"></script>
<script language="JavaScript" type="text/javascript" src="js/keyfilter.js"></script>
<script type="text/javascript" src="js/checkpwd.js"></script>
<link href="css/preg.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkuserinfo()
{
    if(checkspace(document.userinfo.uname.value) || document.userinfo.uname.value.length < 5 || document.userinfo.uname.value.length >16) {
	document.userinfo.uname.focus();
    alert("用户名长度不能为空,在5位到16位之间,请重新输入！");
	return false;
  }
    if(checkspace(document.userinfo.pwd.value) || document.userinfo.pwd.value.length < 6 || document.userinfo.pwd.value.length >16) {
	document.userinfo.pwd.focus();
    alert("密码长度不能为空,在6位到16位之间,请重新输入！");
	return false;
  }
    if(document.userinfo.pwd.value != document.userinfo.pwd1.value) {
	document.userinfo.pwd.focus();
	document.userinfo.pwd.value = '';
	document.userinfo.pwd1.value = '';
    alert("两次输入的密码不同，请重新输入！");
	return false;
  }

 if(document.userinfo.email.value.length!=0)
  {
    if (document.userinfo.email.value.charAt(0)=="." ||        
         document.userinfo.email.value.charAt(0)=="@"||       
         document.userinfo.email.value.indexOf('@', 0) == -1 || 
         document.userinfo.email.value.indexOf('.', 0) == -1 || 
         document.userinfo.email.value.lastIndexOf("@")==document.userinfo.email.value.length-1 || 
         document.userinfo.email.value.lastIndexOf(".")==document.userinfo.email.value.length-1)
     {
      alert("Email地址格式不正确！");
      document.userinfo.email.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空！");
   document.userinfo.email.focus();
   return false;
   }
   if(checkspace(document.userinfo.question.value)) {
	document.userinfo.question.focus();
    alert("对不起，请填写密码提问！");
	return false;
  }
   if(checkspace(document.userinfo.answer.value)) {
	document.userinfo.answer.focus();
    alert("对不起，请填写密码提问的答案！");
	return false;
  }
   if(checkspace(document.userinfo.code.value)) {
	document.userinfo.code.focus();
    alert("对不起，请填写验证码！");
	return false;
  }
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>
<style type="text/css">
<!--
.STYLE7 {color: #FF0000}
-->
</style>
</HEAD>
<BODY topMargin=0 leftmargin="0" rightmargin="0">
<!--#include file="top_reg.asp"-->
<table width="977"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30">&nbsp;<img src="images/preg/a2.gif" width="9" height="9" /><a href="index.asp"> 首页</a>-企业会员注册</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" bgcolor="#DEF0FF"><span class="STYLE6">&nbsp;<img src="images/preg/p1.gif" width="16" height="16" /> <%= homename %>欢迎您！</span></td>
            </tr>
            <tr>
              <td bgcolor="#A0CDF3"><img name="" src="" width="32" height="1" alt="" style="background-color: #A0CDF3" /></td>
            </tr>
          </table>
            <table width="100%" border="1" cellpadding="10" cellspacing="0" bordercolor="#C4E4FF">
            
              <tr>
                <td valign="top" bordercolor="#FFFFFF">
                <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
                 <% If creg_open=1 Then %>
             <tr><td valign="top" bordercolor="#FFFFFF" colspan="2"><br>
                <table width="910"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                      <td bgcolor="#77CD38"><div align="center"><span class="white"><strong>企业会员注册</strong></span></div></td>
                   </tr>
                  </table>
                  <table width="910" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77CD38">
               		 <tr>
                        <td bordercolor="#FFFFFF"><table width="95%" height="214" border="0" align="center" cellPadding="5" cellSpacing="0">
                                <tr>
                                  <td align="center">对不起，网站暂时停止企业注册，感谢您的支持，请稍后再试</td>
                                </tr>
                          </table>
                       </td>
                      </tr>
                  </table>
                  <br>
                </td>
             </tr>
              </table>
            <% Else %>
                <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><span class="orange">欢迎注册成为<%= homename %>(<%= replace(homeurl, "http://www.", "") %>)企业招聘会员</span><br />
                          <br />
                        注册会员后，您可以随时发布、查询公司招聘职位；有效管理应聘者的求职简历，建立并管理企业人才库；以及即时跟踪公司招聘效果，分析公司招聘效果等服务。请注意：<br />
                        1、请您根据以下要求，完整并正确填写贵公司资料（带 * 号为必填项）：<br />
                        2、当您“提交资料”注册资料后，需要通过<%= homename %>审核，才能获得<%= homename %>服务，（审核通过时间为24小时，假期可能会有延迟请谅解）；<br />
                        3、从贵公司收到<%= homename %>确认信之日起，即成为<%= homename %>会员，届时会有相关工作人员与您联系。<br />
                        <br />
                        <font color="#FF0000"><img src="images/creg/p12.gif" width="14" height="14" /> 注：非招聘企业和单位请勿注册和登录，否则不予审核通过！</font></td>
                    </tr>
                  </table>
                    <br />
                    <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="80" height="30" bgcolor="#009900"><div align="center" class="white"><span class="style2"><strong>第1步</strong></span></div></td>
                        <td bgcolor="#77CD38"><div align="center"><span class="white"><strong>企业会员注册</strong></span></div></td>
                      </tr>
                    </table>
                  <table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77CD38">
                      <tr>
                        <td bordercolor="#FFFFFF"><form action="?" method="post" name="userinfo" onSubmit="return checkuserinfo();"  id="userinfo">
                        <input name="action" type="hidden" value="add" />
                              <table border="0" bordercolor="#111111" cellpadding="5" cellspacing="0" style="border-collapse: collapse" width="100%" align="center">
                                <!--DWLayoutTable-->
                                <tr>
                                  <td bgcolor="#f6f6f6" colspan="2" height="37" style="border-top-style: none; border-top-width: medium"><!--DWLayoutEmptyCell-->&nbsp;</td>
                                </tr>
                                <tr>
                                  <td align="center" bgcolor="#ffffff" height="17"><font class="TrueText">用 
                                    户 名：</font></td>
                                  <td align="left" bgcolor="#ffffff" height="17"><p align="left"> <span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"> <font color="#000000">
                                      <input name="uname" type="text" id="uname" onKeyPress="keyFilter('1234567890abcdefghijklmnopqrstuvwxyz_')" onpaste="return false" onMouseOver="focus();select();" style="IME-MODE: disabled;width:205px;"  />
                                  </font><span class="STYLE7">*</span>(<span class="STYLE7"></span> </span><span style="FONT-SIZE: 12px"><font face="Arial"><b>6~20</b></font></span><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">个字符<font color="#435049">，</font><span style="border-top-style: none; border-top-width: medium"><font color="#435049">请输入英文字母，数字或下划线，不区分大小写。</font></span>)</span> </p></td>
                                </tr>
                                <tr>
                                  <td height="1" align="center" valign="top" bgcolor="#f6f6f6"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">登陆密码：</span></td>
                                  <td height="1" align="left" bgcolor="#f6f6f6"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"> <font color="#000000">
                                    <input name="pwd" type="password" id="pwd" class="form1txt" style="width:205px;" onChange="javascript:EvalPwd(this.value);" onKeyUp="javascript:EvalPwd(this.value);"/>
                                  </font><span class="STYLE7">*</span>(<span class="STYLE7"></span> </span><span style="FONT-SIZE: 12px"><font face="Arial"><b>6~20</b></font></span><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">个字符)</span></td>
                                </tr>
<tr><td>&nbsp;</td><td><table style="width:207px;" height="20" border="0" cellpadding="0" cellspacing="0" id="pwdpower">
<tr>
<td id="pweak" style=""><div align="center">弱</div></td>
<td id="pmedium" style=""><div align="center">中</div></td>
<td id="pstrong" style=""><div align="center">强</div></td>
</tr>
</table></td></tr>
                                <tr>
                                  <td height="1" align="center" valign="top" bgcolor="#F6F6F6"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">再次确认：</span></td>
                                  <td height="1" align="left" bgcolor="#F6F6F6"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"> <font color="#000000">
                                    <input name="pwd1" type="password" id="pwd1" class="form1txt" style="width:205px;" />
                                  </font><span class="STYLE7">*</span>(<span class="STYLE7"></span> </span><span style="FONT-SIZE: 12px"><font face="Arial"><b>6~20</b></font></span><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">个字符)</span></td>
                                </tr> <tr>
                                  <td width="151" height="20" align="center" bgcolor="#FFFFFF"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">密码问题：</span></td>
                                  <td align="left" bgcolor="#FFFFFF" class="tb_c_con vt">
					<select style="width:210px;" name="question" id="question" onchange="checkQuestion()">
						<option value="">[请选择您的密码提示问题] </option>
						<option value="cus">***自定义密码提示问题***</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>
					<span class="orange"> <span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"><span class="STYLE7">*</span></span> 忘记密码的提示问题。</span></td>
                                </tr>
       						  <tr  id="cus_question" style="display:none">
                        <td align="center" bgcolor="#F6F6F6" class="tb_c_ttl vt"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">自定义问题：</span></td>
                        <td align="left" bgcolor="#F6F6F6" class="tb_c_con vt"><input type="text" style="width:205px;" class="minput" name="custom_question" id="custom_question" /> <span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"><span class="STYLE7">*</span></span></td>
                      </tr>
                      <tr>
                        <td align="center" bgcolor="#FFFFFF" class="tb_c_ttl vt"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">问题的答案：</span></td>
                      <td align="left" bgcolor="#FFFFFF" class="tb_c_con vt"><input name="answer" id="answer" size="32" class="minput" style="width:205px;"/> <span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"><span class="STYLE7">*</span></span></td>
                      </tr>
                                <tr>
                                  <td width="151" height="20" align="center" bgcolor="#F6F6F6"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">电子邮局：</span></td>
                                  <td width="778" height="20" align="left" bgcolor="#F6F6F6"><input name="email" type="text" id="email" style="IME-MODE: disabled;width:205px;"  />
                                  <span class="orange"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"><span class="STYLE7">*</span></span> 邮箱需要验证，请正确填写</span></td>
                                </tr>
 <tr>
                              <td align="center" valign="middle"><span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">验 证 码：</span></td>
                        <td align="left" valign="middle" bgcolor="#FFFFFF"><input name="code" id="code" size="8" maxlength="4" />
                          &nbsp;<span class="STYLE7">*</span>&nbsp;<img src="GetCode.asp" vspace="2" align="absbottom" ></td>
                            </tr>
                                <tr>
                                  <td height="47" colspan="2" valign="bottom" bgcolor="#F6F6F6"><p align="center">
                                    <input border="0" src="images/creg/reg1.gif" name="Submit" type="image"  width="167" height="35" />
                                  </p></td>
                                </tr>
                          </table>
                        </form></td>
                      </tr>
                  </table>
                  <% End If %>
                  </td>
              </tr>
          </table></td>
      </tr>
    </table>
<!--#include file="end.asp"-->