<!--#include file="Include/Const.Asp"-->
<!--#include file="Include/NoSQL.Asp" -->
<!--#include file="Include/ConnSiteData.Asp"-->
<%
If DateDiff("s", session("time"), Now())<Refresh Then
    response.Write "<script language='JavaScript'>alert('防刷新机制启动：请不要在 "&Refresh&" 秒内重复刷新！');" & "history.back()" & "</script>"
    response.End
Else
    session("time") = Now()
End If
Dim rs, sql
Dim JobID, TalentsName, BirthDate, Stature, Marriage, RegResidence, EduResume, JobResume
Dim mMemID, mLinkman, mSex, mAddress, mZipCode, mTelephone, mMobile, mEmail, CheckCode
JobID = request.QueryString("JobID")
TalentsName = Trim(request.Form("TalentsName"))
BirthDate = Trim(request.Form("BirthDate"))
Stature = Trim(request.Form("Stature"))
Marriage = Trim(request.Form("Marriage"))
RegResidence = Trim(request.Form("RegResidence"))
EduResume = Trim(request.Form("EduResume"))
JobResume = Trim(request.Form("JobResume"))
mMemID = request.QueryString("MemberID")
mLinkman = Trim(request.Form("Linkman"))
mSex = Trim(request.Form("Sex"))
mAddress = Trim(request.Form("Address"))
mZipCode = Trim(request.Form("ZipCode"))
mTelephone = Trim(request.Form("Telephone"))
mMobile = Trim(request.Form("Mobile"))
mEmail = Trim(request.Form("Email"))
CheckCode = Trim(request.Form("CheckCode"))
Dim ErrMessage, ErrMsg(14), FindErr(14), i
ErrMsg(0) = "请填写申请职位。"
ErrMsg(1) = "出生日期格式错误。"
ErrMsg(2) = "身高必须为数字。"
ErrMsg(3) = "请填写户口所在地。"
ErrMsg(4) = "请填写教育经历。"
ErrMsg(5) = "请填写工作经历。"
ErrMsg(6) = "请填写姓名。"
ErrMsg(7) = "请填写联系地址。"
ErrMsg(8) = "请正确填写邮政编码。"
ErrMsg(9) = "请正确填写联系电话。"
ErrMsg(10) = "请正确填写手机号码。"
ErrMsg(11) = "电子信箱格式错误。"
ErrMsg(12) = "验证码不能为空，请返回检查。"
ErrMsg(13) = "您在【产品订购】页面停留的时间过长，导致验证码失效。\n请返回并刷新【产品订购】页面重新订购！"
ErrMsg(14) = "您输入的验证码和系统产生的不一致，请重新输入。"
If Len(TalentsName)>100 Or Len(TalentsName) = 0 Then
    FindErr(0) = True
End If
If Not IsDate(BirthDate) Then
    FindErr(1) = True
End If
If Not IsNumeric(Stature) Or Len(Stature) = 0 Then
    FindErr(2) = True
End If
If Len(RegResidence)>100 Or Len(RegResidence) = 0 Then
    FindErr(3) = True
End If
If Len(EduResume) = 0 Then
    FindErr(4) = True
End If
If Len(JobResume) = 0 Then
    FindErr(5) = True
End If
If Len(mLinkman)>50 Or Len(mLinkman) = 0 Then
    FindErr(6) = True
End If
If Len(mAddress)>100 Or Len(mAddress) = 0 Then
    FindErr(7) = True
End If
If Len(mZipCode)<>6 Then
    FindErr(8) = True
End If
If Len(mTelephone)>50 Or Len(mTelephone) = 0 Then
    FindErr(9) = True
End If
If Len(mMobile)>50 Or Len(mMobile)<11 Or Len(mMobile) = 0 Then
    FindErr(10) = True
End If
If Not IsValidEmail(mEmail) Then
    FindErr(11) = True
End If
If CheckCode = "" Then
    FindErr(12) = True
End If
If Trim(Session("CheckCode")) = "" Then
    FindErr(13) = True
End If
If CheckCode <> Session("CheckCode") Then
    FindErr(14) = True
End If
For i = 0 To UBound(FindErr)
    If FindErr(i) = True Then
        ErrMessage = ErrMessage+ErrMsg(i) + "\n"
    End If
Next
If Not (ErrMessage = "" Or IsNull(ErrMessage)) Then
    WriteMsg(ErrMessage)
    response.End
End If
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from Shenbi_Talents"
rs.Open sql, conn, 1, 3
rs.addnew
rs("JobID") = JobID
rs("TalentsName") = StrReplace(TalentsName)
rs("BirthDate") = BirthDate
rs("Stature") = Stature
rs("Marriage") = Marriage
rs("RegResidence") = StrReplace(RegResidence)
rs("EduResume") = StrReplace(EduResume)
rs("JobResume") = StrReplace(JobResume)
rs("MemID") = mMemID
rs("Linkman") = StrReplace(mLinkman)
rs("Sex") = mSex
rs("Address") = StrReplace(mAddress)
rs("ZipCode") = StrReplace(mZipCode)
rs("Telephone") = StrReplace(mTelephone)
rs("Mobile") = StrReplace(mMobile)
rs("Email") = mEmail
rs("AddTime") = Now()
rs.update
rs.Close
Set rs = Nothing
conn.Execute "update Shenbi_Jobs set TalentsNumber = TalentsNumber+1 where ID="&JobID
response.Write "<script language='javascript'>alert('简历提交成功！');location.replace('Index.Asp');</script>"
%>