TalentSave.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:4k
- <% response.charset="utf-8" %>
- <!--#include file="../skweb/Const.asp" -->
- <!--#include file="../skweb/ConnSiteData.asp" -->
- <!--#include file="../skweb/Function.asp"-->
- <%
- dim rs,sql
- dim JobID,TalentsName,BirthDate,Stature,Marriage,RegResidence,EduResume,JobResume
- dim MemID,Linkman,Sex,Company,Address,ZipCode,Telephone,Mobile,Email,VerifyCode
- 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"))
- MemID=request.QueryString("MemberID")
- Linkman=trim(request.form("Linkman"))
- Sex=trim(request.form("Sex"))
- Company=trim(request.form("Company"))
- Address=trim(request.form("Address"))
- ZipCode=trim(request.form("ZipCode"))
- Telephone=trim(request.form("Telephone"))
- Mobile=trim(request.form("Mobile"))
- Email=trim(request.form("Email"))
- dim ErrMessage,ErrMsg(12),FindErr(12),i
- ErrMsg(0)="·职位名称必填,长度不能超过100个字符"
- ErrMsg(1)="·出生日期格式不正确"
- ErrMsg(2)="·身高栏请填写数字"
- ErrMsg(3)="·户口所在地必填,长度为不得多于100个字符"
- ErrMsg(4)="·教育经历必填"
- ErrMsg(5)="·工作经历必填"
- ErrMsg(6)="·姓名必填,长度不得超过50个字符"
- ErrMsg(7)="·地址必填,长度不得超过100个字符"
- ErrMsg(8)="·邮编必填长度为6-20个字符"
- ErrMsg(9)="·电话长度不得超过50个字符"
- ErrMsg(10)="·移动电话必填,长度为11-50个字符"
- ErrMsg(11)="·电子邮箱格式不正确"
- 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) 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(Linkman)>50 or len(Linkman)=0 then
- FindErr(6)=true
- end if
- if len(Address)>100 or len(Address)<8 then
- FindErr(7)=true
- end if
- if len(ZipCode)>20 or len(ZipCode)<6 then
- FindErr(8)=true
- end if
- if len(Telephone)>50 then
- FindErr(9)=true
- end if
- if len(Mobile)>50 or len(Mobile)<11 then
- FindErr(10)=true
- end if
- if not IsValidEmail(Email) then
- FindErr(11)=true
- end if
- for i = 0 to UBound(FindErr)
- if FindErr(i)=true then
- ErrMessage=ErrMessage+ErrMsg(i)+"<br>"
- 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 sk_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")=MemID
- rs("Linkman")=StrReplace(Linkman)
- rs("Sex")=Sex
- rs("Address")=StrReplace(Address)
- rs("ZipCode")=StrReplace(ZipCode)
- rs("Telephone")=StrReplace(Telephone)
- rs("Mobile")=StrReplace(Mobile)
- rs("Email")=Email
- rs("AddTime")=now()
- rs.update
- rs.close
- set rs=nothing
- conn.execute "UPDATE sk_Jobs SET TalentsNumber = TalentsNumber+1 WHERE ID="&JobID
- WriteMsg("·提交简历成功,点击返回<a href='../JobsList.asp'><font color='red'>[人才招聘]</font></a>。")
- %>