<!-- #include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<!--#include file="Comm/md5.asp" -->
<%
 

Dim strMenu,PageTitle
strMenu = ""

Set Qsite = New Site_Class

If Not instr(1,Request.ServerVariables("http_Referer"),Request.ServerVariables ("SERVER_NAME"),1)=8 Then
	Qsite.ShowMsg "请不要非法提交数据" , "Index.asp"
End If


Qsite.SiteConfig()
Qsite.GotoErrPage()

PageTitle = Qsite.SiteName & " - 个人注册页面"

If Qsite.PerRegClose = "1" Then
	Response.Redirect("ErrPage.asp?str="& Qsite.PerRegCloseNote)
	Response.End()
End If

Dim Rs,PerId
Dim UserName,PassWord,PassWord2,Question,Answer
Dim RealName,Sex,Age,Nation,Political,Birthplace,Marriage,Qualification,Standing,Weight
Dim Salary,Nature,Position_b,Position_s,JobPost,Province,City,County
Dim NowAddr,HomeAddr,QQ,MSN,Tel,Mobile,Email
Dim FromIp

FromIp = Request.ServerVariables("REMOTE_ADDR")

If Request.Form <> "" Then
	UserName = LCase(Qsite.chgStr(Trim(Request.Form("UserName"))))
	PassWord = LCase(Qsite.chgStr(Trim(Request.Form("PassWord"))))
	PassWord2 = LCase(Qsite.chgStr(Trim(Request.Form("PassWord2"))))
	Email = Qsite.chgStr(Trim(Request.Form("Email")))
	
	RealName = Qsite.chgStr(Trim(Request.Form("RealName")))
	Sex = Qsite.chgStr(Trim(Request.Form("Sex")))
	Age = Qsite.chgStr(Trim(Request.Form("Age")))
	Nation = Qsite.chgStr(Trim(Request.Form("Nation")))
	Political = Qsite.chgStr(Trim(Request.Form("Political")))
	Birthplace = Qsite.chgStr(Trim(Request.Form("Birthplace")))
	Marriage = Qsite.chgStr(Trim(Request.Form("Marriage")))
	Qualification = Qsite.chgStr(Trim(Request.Form("Qualification")))
	Standing = Qsite.chgStr(Trim(Request.Form("Standing")))
	Weight = Qsite.chgStr(Trim(Request.Form("Weight")))
	
	Salary = Qsite.chgStr(Trim(Request.Form("Salary")))
	Nature = Qsite.chgStr(Trim(Request.Form("Nature")))
	Position_b = Qsite.chgStr(Trim(Request.Form("Position_b")))
	Position_s = Qsite.chgStr(Trim(Request.Form("Position_s")))
	JobPost = Qsite.chgStr(Trim(Request.Form("JobPost")))
	Province = Qsite.chgStr(Trim(Request.Form("Province")))
	City = Qsite.chgStr(Trim(Request.Form("City")))
	County = Qsite.chgStr(Trim(Request.Form("County")))
	
	NowAddr = Qsite.chgStr(Trim(Request.Form("NowAddr")))
	HomeAddr = Qsite.chgStr(Trim(Request.Form("HomeAddr")))
	QQ = Qsite.chgStr(Trim(Request.Form("QQ")))
	MSN = Qsite.chgStr(Trim(Request.Form("MSN")))
	Tel = Qsite.chgStr(Trim(Request.Form("Tel")))
	
	If Qsite.CheckUserName(UserName) = True Then
		Qsite.ShowMsg "用户名称只能是字母，数字或下划线" , ""
	End If
	If Qsite.CheckStr(UserName , Qsite.RegNoName) = True Then
		Qsite.ShowMsg "输入的用户名称含有非法字符，请返回重新输入" , ""
	End If
	If Qsite.CheckStr(PassWord , "&|<|>|\|'") = True Or Qsite.CheckStr(PassWord2 , "&|<|>|\|'") = True Then
		Qsite.ShowMsg "输入的密码含有非法字符，请返回重新输入" , ""
	End If
	If PassWord <> PassWord2 Then
		Qsite.ShowMsg "输入的两次密码不一致" , ""
	End If
	If Email = "" Or IsNull(Email) Then
		Qsite.ShowMsg "请输入邮箱地址" , ""
	End If
	If Not Qsite.IsValidEmail(Email) Then
		Qsite.ShowMsg "输入的电子信箱不正确，请返回重新输入" , ""
	End If
	If RealName = "" Or IsNull(RealName) Then
		Qsite.ShowMsg "请输入真实姓名" , ""
	End If
	If Qsite.CheckStr(RealName , Qsite.RegNoName) = True Then
		Qsite.ShowMsg "输入的真实姓名含有非法字符，请返回重新输入" , ""
	End If
	If Sex = "" Or IsNull(Sex) Then
		Qsite.ShowMsg "请选择性别" , ""
	End If
	If Age = "" Or IsNull(Age) Or Not IsNumeric(Age) Then
		Qsite.ShowMsg "请输入年龄"
	End If
	If Political = "" Or IsNull(Political) Then
		Qsite.ShowMsg "请选择政治面貌" , ""
	End If
	If Birthplace = "" Or IsNull(Birthplace) Then
		Qsite.ShowMsg "请输入籍贯" , ""
	End If
	If Marriage = "" Or IsNull(Marriage) Then
		Qsite.ShowMsg "请输入婚姻状况" , ""
	End If
	If Qualification = "" Or IsNull(Qualification) Then
		Qsite.ShowMsg "选择学历" , ""
	End If
	If Standing <> "" And Not IsNumeric(Standing) Then
		Qsite.ShowMsg "输入的身高不正确，请返回重新输入" , ""
	End If
	If Weight <> "" And Not IsNumeric(Weight) Then
		Qsite.ShowMsg "输入的体重不正确，请返回重新输入" , ""
	End If
	If Len(Salary) > 5 Then
		Qsite.ShowMsg "月薪不能超过5位数字" , ""
	End If
	If Salary = "" Or IsNull(Salary) Or Not IsNumeric(Salary) Then
		Qsite.ShowMsg "输入的要求月薪不正确，请返回重新输入" , ""
	End If
	If Nature = "" Or IsNull(Nature) Then
		Qsite.ShowMsg "请选择工作性质" , ""
	End If
	If Position_b = "" Or IsNull(Position_b) Then
		Qsite.ShowMsg "请选择拟定职业" , ""
	End If
	If Position_s = "" Or IsNull(Position_s) Then
		Qsite.ShowMsg "请选择拟定职业" , ""
	End If
	If JobPost = "" Or IsNull(JobPost) Then
		Qsite.ShowMsg "请输入求职意向岗位" , ""
	End If
	If Province = "" Or IsNull(Province) Then
		Qsite.ShowMsg "请输入工作地区" , ""
	End If
	If City = "" Or IsNull(City) Then
		Qsite.ShowMsg "请输入工作地区" , ""
	End If
	If NowAddr = "" Or IsNull(NowAddr) Then
		Qsite.ShowMsg "请输入现在所在地" , ""
	End If
	If HomeAddr = "" Or IsNull(HomeAddr) Then
		Qsite.ShowMsg "请输入家庭地址" , ""
	End If
	If QQ <> "" And Not IsNumeric(QQ) Then
		Qsite.ShowMsg "输入的QQ号码不正确，请返回重新输入" , ""
	End If
	If MSN <> "" And Not Qsite.IsValidEmail(MSN) Then
		Qsite.ShowMsg "输入的MSN不正确，请返回重新输入" , ""
	End If
	If Tel = "" Or IsNull(Tel) Then
		Qsite.ShowMsg "请输入联系电话" , ""
	End If
	If Not Qsite.IsValidTel(Tel) Then
		Qsite.ShowMsg "输入的联系电话不正确，请返回重新输入" , ""
	End If
	
	Set Rs = server.createobject("ADODB.Recordset")
	
	Rs.Open "select * from PersonTbl where UserName = '"& UserName &"'" , Conn , 1 , 1
	If Not Rs.Eof Then
		Qsite.ShowMsg "此用户名称已存在，请返回重新选择" , ""
	End If
	Rs.Close
	Rs.Open "select * from PersonTbl where Email = '"& Email &"'" , Conn , 1 , 1
	If Not Rs.Eof Then
		Qsite.ShowMsg "此电子信箱已经注册，请返回重新输入" , ""
	End If
	Rs.Close
	
	PassWord = MD5(PassWord)
	
	Rs.Open "select * from PersonTbl where (PerId is null)" , Conn , 3 , 2
	Rs.AddNew
	Rs("UserName") = UserName
	Rs("PassWord") = PassWord
	Rs("RealName") = RealName
	Rs("Sex") = Sex
	Rs("Age") = Age
	Rs("Nation") = Nation
	Rs("Political") = Political
	Rs("Birthplace") = Birthplace
	Rs("Marriage") = Marriage
	Rs("Qualification") = Qualification
	Rs("Standing") = Standing
	Rs("Weight") = Weight
	Rs("Salary") = Salary
	Rs("Nature") = Nature
	Rs("Position_b") = Position_b
	Rs("Position_s") = Position_s
	Rs("JobPost") = JobPost
	Rs("Province") = Province
	Rs("City") = City
	Rs("County") = County
	Rs("NowAddr") = NowAddr
	Rs("HomeAddr") = HomeAddr
	Rs("QQ") = QQ
	Rs("MSN") = MSN
	Rs("Tel") = Tel
	Rs("Email") = Email
	Rs("RegFromIp") = FromIp
	Rs("RegDate") =Qsite. FormatDate(Now())
	Rs("EditDate") = Qsite.FormatDate(Now())
	Rs("ThisLoginIp") = FromIp
	Rs("ThisLoginDate") = Qsite.FormatDate(Now())
	Rs("LoginQuantity") = 1
	
	Rs("jbFlag") = "1"
	Rs("qzFlag") = "1"
	Rs("lxFlag") = "1"
	Rs("jyFlag") = "0"
	Rs("pxFlag") = "0"
	Rs("yyFlag") = "0"
	Rs("gzFlag") = "0"
	
	Rs("IsLock") = "0"
	Rs("IsSh") = Qsite.NewPerSh
	Rs.Update
	If Qsite.NewPerSh = "1" Then
		Session("PerId") = ""
	Else
		PerId = Rs("PerId")
		Session("PerId") = PerId
	End If
	Session("UserName") = UserName
	Session("PassWord") = PassWord
	Session("PassWord2") = PassWord2
	Session("RealName") = RealName
	Session("Email") = Email
	Session("IsLock") = "0"
	Session("UserType") = "Person"
	Rs.Close
	
	If Err Then
		Session("PerId") = ""
		Session("UserName") = ""
		Session("PassWord") = ""
		Session("PassWord2") = ""
		Session("RealName") = ""
		Session("Email") = ""
		Session("IsLock") = "0"
		Session("UserType") = ""
		Qsite.ShowMsg "操作失败" , ""
	Else
		Response.Redirect("Person_Reg_2.asp")
		Response.End()
	End If
End If
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=PageTitle%> - 胶州人才网</title>
 <meta name="keywords" content="关于胶州人才网站,胶州招聘网站,胶州人力资源,胶州人才市场,胶州找工作,胶州兼职,胶州培训,胶州职业顾问,胶州职业规划,胶州人事代理">
 <meta name="description" content="胶州人才网是胶州地区内最具影响力的人才网站之一，为企业提供一站式的人才招聘服务，帮助个人求职者与企业搭建最佳互动平台，打造胶州地区权威求职招聘网站!！">
<!--#include file="top.asp" -->
     <table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="47" background="../images/Person_Register_step1.jpg">&nbsp;</td>
      </tr>
      <tr>
        <td height="326" valign="top" background="../images/Company_Register_r4_c2.jpg"><table width="800" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="190" align="center"><font color="#666666"><strong>会员帐号注册</strong></font> </td>
              <td width="610"> 
                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
                  <tr height="1">
                    <td background="../images/ico_point.gif"></td>
                  </tr>
                </table></td>
            </tr><form id="RegForm" name="RegForm" method="post" action="Person_Reg_2.asp" style="margin:0" onSubmit="return CheckForm();">
          </table>


<form id="RegForm" name="RegForm" method="post" action="" style="margin:0" onSubmit="return CheckForm();">
			<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td width="700">&nbsp;</td>
				</tr>
				<tr>
					<td><img src="Images/Reg_Img_01.jpg" width="196" height="26" /></td>
				</tr>
				<tr>
					<td height="35" class="td_line_col_FFFFFF">欢迎您加入<font color="#FF0000"><%=Qsite.SiteName%></font>！请妥善保管好您的注册信息，以免造成不必要的麻烦。</td>
				</tr>
				<tr>
					<td height="35" class="td_line_col_FFFFFF" style="line-height:25px;padding-top:10px;padding-bottom:10px;">用户名称：<%=Session("UserName")%><br />
						登录密码：<%=Session("PassWord2")%><br />
						电子信箱：<%=Session("Email")%></td>
				</tr>







<%
dim msg,jmail,adm_mail,mailyesorno,mailserver,mailname,mailpassword,sitename,CLStr
jmail="1"
adm_mail=Session("Email")
mailyesorno="1"
mailserver="smtp.189.cn"
mailname="ks189@189.cn"
mailpassword="wujun0102"
sitename="胶州人才网"
CLStr=Chr(13) & Chr(10)



 
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName = mailname
msg.MailServerPassword = mailpassword   
msg.From = mailname
msg.FromName = sitename
msg.AddRecipient adm_mail
msg.Subject = "胶州新人才通知：("&Session("UserName")&")您已成功注册个人求职会员！"
msg.Body = "登录账号为："&Session("UserName")&" "&CLStr&"登录密码为："&Session("PassWord2")&""&CLStr&"请牢记此账号密码，详情您可以通过登陆胶州人才网查询！"&CLStr&"胶州人才网网址：http://www.521jz.net "
msg.Send (mailserver)
msg.close
set msg = nothing
%>







				<tr>
					<td>&nbsp;</td>
				</tr>
<%
If Qsite.NewPerSh = "1" Then
%>
				<tr>
					<td height="35"><font color="#FF6600">提醒：现在您帐号还处在审核期，请等待管理员审核，审核后您可以进入管理中心完善您的简历！</font></td>
				</tr>
<%
Else
%>
				<tr>
					<td height="35"><font color="#FF6600">提醒：您的简历已经创建，但现在简历并不完整，建议您马上点击 <a href="Person/ChgPerInfo_5.asp"><font color="#FF0000"><strong>这里</strong></font></a> 来进一步填写 教育、培训、语言、工作经历 等信息。</font></td>
				</tr>
<%
End If
%>
				<tr>
					<td height="35"><span style="font-weight: bold">一份出众的简历将给您带来更多的机会！</span></td>
				</tr>
				<tr>
					<td height="35">内容完整详细的简历有助于企业真实、及时地认识您的学识和能力，使您优先获得合适的工作机会！</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table>
		</form></td>
      </tr>
      <tr>
        <td height="17" background="../images/Company_Register_r10_c2.jpg"></td>
      </tr>
    </table>
 
            
<table width="974" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr height="8">
        <td height="8"></td>
      </tr>
    </table>
  <!--#include file="foot.asp" -->
