TalentSave.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:4k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

ASP/ASPX

  1. <% response.charset="utf-8" %>
  2. <!--#include file="../skweb/Const.asp" -->
  3. <!--#include file="../skweb/ConnSiteData.asp" -->
  4. <!--#include file="../skweb/Function.asp"-->
  5. <%
  6. dim rs,sql
  7. dim JobID,TalentsName,BirthDate,Stature,Marriage,RegResidence,EduResume,JobResume
  8. dim MemID,Linkman,Sex,Company,Address,ZipCode,Telephone,Mobile,Email,VerifyCode
  9. JobID=request.QueryString("JobID")
  10. TalentsName=trim(request.form("TalentsName"))
  11. BirthDate=trim(request.form("BirthDate"))
  12. Stature=trim(request.form("Stature"))
  13. Marriage=trim(request.form("Marriage"))
  14. RegResidence=trim(request.form("RegResidence"))
  15. EduResume=trim(request.form("EduResume"))
  16. JobResume=trim(request.form("JobResume"))
  17. MemID=request.QueryString("MemberID")
  18. Linkman=trim(request.form("Linkman"))
  19. Sex=trim(request.form("Sex"))
  20. Company=trim(request.form("Company"))
  21. Address=trim(request.form("Address"))
  22. ZipCode=trim(request.form("ZipCode"))
  23. Telephone=trim(request.form("Telephone"))
  24. Mobile=trim(request.form("Mobile"))
  25. Email=trim(request.form("Email"))
  26. dim ErrMessage,ErrMsg(12),FindErr(12),i
  27.   ErrMsg(0)="·职位名称必填,长度不能超过100个字符"
  28.   ErrMsg(1)="·出生日期格式不正确"
  29.   ErrMsg(2)="·身高栏请填写数字"
  30.   ErrMsg(3)="·户口所在地必填,长度为不得多于100个字符"
  31.   ErrMsg(4)="·教育经历必填"
  32.   ErrMsg(5)="·工作经历必填"
  33.   ErrMsg(6)="·姓名必填,长度不得超过50个字符"
  34.   ErrMsg(7)="·地址必填,长度不得超过100个字符"
  35.   ErrMsg(8)="·邮编必填长度为6-20个字符"
  36.   ErrMsg(9)="·电话长度不得超过50个字符"
  37.   ErrMsg(10)="·移动电话必填,长度为11-50个字符"
  38.   ErrMsg(11)="·电子邮箱格式不正确"
  39. if len(TalentsName)>100 or len(TalentsName)=0 then
  40.   FindErr(0)=true
  41. end if  
  42. if not IsDate(BirthDate) then
  43.   FindErr(1)=true
  44. end if  
  45. if not IsNumeric(Stature) then
  46.   FindErr(2)=true
  47. end if  
  48. if len(RegResidence)>100 or len(RegResidence)=0 then
  49.   FindErr(3)=true
  50. end if  
  51. if len(EduResume)=0 then
  52.   FindErr(4)=true
  53. end if  
  54. if len(JobResume)=0 then
  55.   FindErr(5)=true
  56. end if  
  57. if len(Linkman)>50 or len(Linkman)=0 then
  58.   FindErr(6)=true
  59. end if
  60. if len(Address)>100 or len(Address)<8 then
  61.   FindErr(7)=true
  62. end if
  63. if len(ZipCode)>20 or len(ZipCode)<6 then
  64.   FindErr(8)=true
  65. end if
  66. if len(Telephone)>50 then
  67.   FindErr(9)=true
  68. end if
  69. if len(Mobile)>50 or len(Mobile)<11 then
  70.   FindErr(10)=true
  71. end if
  72. if not IsValidEmail(Email) then
  73.   FindErr(11)=true
  74. end if
  75. for i = 0 to UBound(FindErr)
  76.   if FindErr(i)=true then
  77.     ErrMessage=ErrMessage+ErrMsg(i)+"<br>"
  78.   end if
  79. next
  80. if not (ErrMessage="" or isnull(ErrMessage)) then
  81.   WriteMsg(ErrMessage)
  82.   response.end
  83. end if
  84. set rs = server.createobject("adodb.recordset")
  85. sql="select * from sk_Talents"
  86. rs.open sql,conn,1,3
  87. rs.addnew
  88. rs("JobID")=JobID
  89. rs("TalentsName")=StrReplace(TalentsName)
  90. rs("BirthDate")=BirthDate
  91. rs("Stature")=Stature
  92. rs("Marriage")=Marriage
  93. rs("RegResidence")=StrReplace(RegResidence)
  94. rs("EduResume")=StrReplace(EduResume)
  95. rs("JobResume")=StrReplace(JobResume)
  96. rs("MemID")=MemID
  97. rs("Linkman")=StrReplace(Linkman)
  98. rs("Sex")=Sex
  99. rs("Address")=StrReplace(Address)
  100. rs("ZipCode")=StrReplace(ZipCode)
  101. rs("Telephone")=StrReplace(Telephone)
  102. rs("Mobile")=StrReplace(Mobile)
  103. rs("Email")=Email
  104. rs("AddTime")=now()
  105. rs.update
  106. rs.close
  107. set rs=nothing
  108. conn.execute "UPDATE sk_Jobs SET TalentsNumber = TalentsNumber+1 WHERE ID="&JobID
  109. WriteMsg("·提交简历成功,点击返回<a href='../JobsList.asp'><font color='red'>[人才招聘]</font></a>。")
  110. %>