<%@ Language=VBScript%>
<%
Response.Buffer=false
Response.Expires=0
%>
<!-- #include file="./dsnroot.asp" -->
<!-- #include file="./links.asp" -->
<%
set cn=Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")
set rs1=Server.CreateObject("ADODB.Recordset")
set rs2=Server.CreateObject("ADODB.Recordset")
cn.Open mycnstr
menu="00000010"
id=Request.QueryString ("id")
jobid=Request.QueryString ("jobid")
sendok=Request.QueryString ("sendok")
if id="" then
		id=0
	else
		id=cint(id)
end if
if jobid="" then
		jobid=0
	else
		jobid=cint(jobid)
end if
if jobid<>0 then
sqltext="select * from engage where state=1 and keyno="&jobid
rs.Open sqltext,cn,1,1
if not rs.EOF then
		title=rs("title")
		content=checkstr(rs("content"),2)
		dept=rs("dept")
		city=rs("city")
		yxq=rs("yxq")
		email=rs("email")
end if		
rs.Close 
end if
engageno=jobid
titletxt="在线应聘"
htmlname="careers_detail.asp?jobid="&jobid&"&id="&id
if Request.ServerVariables("REQUEST_METHOD")="POST" then
	bz=0
	username=Lcase(Request.Form("username"))
	address=Request.Form("address")
	zip=Request.Form("zip")
	phone=Request.Form("phone")
	gender=Request.Form("gender")
	nd=Request.Form("nd")
	yf=Request.Form("yf")
	dd=Request.Form("dd")
	educode=Request.Form("educode")
	city=Request.Form("city")
	certcode=Request.Form("certcode")
	email=Request.Form("email")
	intro=Request.Form("intro")
	education=Request.Form("education")
	workexp=Request.Form("workexp")
	skill=Request.Form("skill")
	salary=Request.Form("salary")
	wantpay=Request.Form("wantpay")
	corpview=Request.Form("corpview")
	english=Request.Form("english")
	
		if userkeyno="" or userkeyno=0 then
			sqltext="select top 1 keyno from engage_user order by keyno desc"
			rs.Open sqltext,cn,1,1
			if rs.EOF then
				userkeyno=1
			else
				userkeyno=rs(0)+1
			end if
			rs.Close
			rs.Open "engage_user",cn,3,3
			rs.AddNew
			rs("keyno")=userkeyno
			rs("creadate")=Now()
			rs("engageno")=engageno
		else	
			rs.Open "select * from engage_user where keyno="&userkeyno,cn,3,3
		end if	
		rs("username")=username
		rs("address")=address
		rs("zip")=zip
		rs("phone")=phone
		rs("gender")=gender
		rs("educode")=educode
		rs("city")=city
		rs("certcode")=certcode
		rs("email")=email
		birthday=nd+"-"+yf+"-"+dd
		if IsDate(birthday) then
			rs("birthday")=cdate(birthday)			
		end if
		rs("intro")=intro
		rs("workexp")=workexp
		rs("skill")=skill
		rs("education")=education
		rs("english")=english
		rs("corpview")=corpview
		if isnumeric(salary) then
			rs("salary")=salary
		end if
		if isnumeric(wantpay) then
			rs("wantpay")=wantpay
		end if
		
		rs.Update
		rs.Close 
		Response.Redirect htmlname&"&sendok=1"
		
end if	
%>
<!-- #include file="./func.inc" -->
<!-- #include file="./begin.asp" -->
      <table width="778" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="2" bgcolor="#FFFFFF" align="center" valign="top"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" height="36">
              <tr> 
                <td width="20" background="images/nav2_bg2.gif">&nbsp;</td>
                <td width="188" background="images/nav2_bg2.gif"><a href="default.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image81','','images/bt_home2.gif',1)"><img name="Image81" border="0" src="images/bt_home.gif" width="42" height="18"></a></td>
                <td background="images/nav2_bg2.gif" align="center">&nbsp; </td>
              </tr>
            </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="26">&nbsp;</td>
              </tr>
            </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="20" height="36"><img src="images/company/title_sign.gif" width="14" height="18"></td>
                <td class="font2"><font color="#996600"><b><%=titletxt%></b></font></td>
              </tr>
            </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td class="font1" height="10" colspan="2"></td>
              </tr>
              <tr> 
                <td class="font1" height="1" colspan="2" background="images/company/point_line.gif"></td>
              </tr>
              <tr> 
                <td class="font5ecb" height="20" colspan="2"><font color="#996600"><%=trim(title)%></font></td>
              </tr>
              <tr> 
                <td class="font1" height="1" colspan="2" valign="top" background="images/company/point_line.gif"></td>
              </tr>
              <tr> 
                <td class="font1" height="10" colspan="2" valign="top">&nbsp;</td>
              </tr>
              <tr> 
                <td class="font1" height="10" width="230" valign="top">岗位名称：<%=title%><br>
                  招聘部门：<%=dept%><br>
                  工作地点：<%=city%><br>
                  有效时限：<%=yxq%><br>
                  联系信箱：<a href="mailto:<%=email%>" class=a02><%=email%></a></td>
                <td class="font1" height="10" valign="top">岗位要求：<br><%=checkstr(content,2)%></td>
              </tr>
              <tr> 
                <td class="font1" height="15" colspan="2"></td>
              </tr>
            </table>
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
            <%if sendok=0 then%>
             <form action="<%=htmlname%>" method=post name=form1 onsubmit="javascript:return checkinput(form1)" autocomplete="off">
              <tr> 
                <td colspan=2 height=18><font class="font5ecb"><b>填写您的个人资料:</b></font></td>
              </tr>
              <tr> 
                <td colspan=2 height=18><font class="t1"></font></td>
              </tr>
              <tr height="22"> 
                <td class=td1 width=60>姓名</td>
                <td class=font1> 
                  <input type="text" name=username maxlength=20 size=20 class="input1">
                  <font color=red>*</font></td>
              </tr>
              <tr height="22"> 
                <td class=td1>性别</td>
                <td class=font1> 
                  <input type=radio name="gender" value="1" <%if gender="1" then Response.Write("checked") end if%>>
                  男 
                  <input type=radio name="gender" value="0" <%if gender="0" then Response.Write("checked") end if%>>
                  女 </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>出生日期</td>
                <td class=font1> 
                  <input type=text name=nd size=5 maxlength=4 class="input1">
                  年 
                  <input type=text name=yf size=3 maxlength=2 class="input1">
                  月 
                  <input type=text name=dd size=3 maxlength=2 class="input1">
                  日 </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>电话</td>
                <td class=font1> 
                  <input type="text" name=phone maxlength=30 size=40 class="input1">
                  <font color=red>*</font></td>
              </tr>
              <tr height="22"> 
                <td  class=td1>通讯地址</td>
                <td class=font1> 
                  <input type="text" name=address maxlength=60 size=50 class="input1">
                </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>邮政编码</td>
                <td class=font1> 
                  <input type="text" name=zip maxlength=6 size=10 class="input1">
                </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>Email</td>
                <td class=font1> 
                  <input type="text" name=email maxlength=60 size=50 class="input1"><font color=red>*</font>
                </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>教育程度</td>
                <td class=font1> 
                  <select name="educode" class="input1">
                    <option value=''>请选择... 
                    <%sqltext="select * from pub_education order by code"
					rs1.Open sqltext,cn,1,1
					do while not rs1.EOF
							Response.Write("<option value="+rs1("code"))
							if trim(rs1("code"))=educode then Response.Write(" selected")
							Response.Write(">"+rs1("bname"))
							rs1.MoveNext()
					loop				
					rs1.Close()
					%>
                  </select>
                </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>所在城市</td>
                <td class=font1> 
                  <input type="text" name=city maxlength=12 size=16 class="input1">
                </td>
              </tr>
              <tr height="22"> 
                <td  class=td1>证件号码</td>
                <td class=font1> 
                  <input type="text" name=certcode maxlength=20 size=30 class="input1">
                </td>
              </tr>

              <tr height="22"> 
                <td  class=td1>英语水平</td>
                <td class=font1> 
                  <input type="text" name=english maxlength=50 size=50 class="input1">
                </td>
              </tr>
              <tr> 
                <td class=td1>自我评价</td>
                <td class=font1> 
                  <textarea rows=6 cols=50 name=intro style="font-family:宋体" class="input1"></textarea>
                </td>
              </tr>
              <tr> 
                <td class=td1>教育背景</td>
                <td class=font1> 
                  <textarea rows=6 cols=50 name=education style="font-family:宋体" class="input1"></textarea>
                </td>
              </tr>
              <tr> 
                <td class=td1>工作经验</td>
                <td class=font1> 
                  <textarea rows=6 cols=50 name=workexp style="font-family:宋体" class="input1"></textarea>
                </td>
              </tr>
              <tr> 
                <td class=td1>技能特长</td>
                <td class=font1> 
                  <textarea rows=6 cols=50 name=skill style="font-family:宋体" class="input1"></textarea>
                </td>
              </tr>
              <tr> 
                <td colspan=2 height=20></td>
              </tr>
              </table>
			  <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td colspan=2 height=20><font class="font5ecb"><b>填写您的期望:</b></font></td>
              </tr>
              <tr> 
                <td bgcolor="#888888" height="1" colspan="2"></td>
              </tr>
              <tr> 
                <td colspan=2 height=20><font class=t1></font></td>
              </tr>
              <tr> 
                <td  class=td1>当前月薪</td>
                <td> 
                  <input type="text" name=salary maxlength=12 size=16 class="input1">
                  元 &nbsp;&nbsp;&nbsp;&nbsp;期望月薪&nbsp; 
                  <input type="text" name=wantpay maxlength=12 size=16 class="input1">
                  元 
              </tr>
              <tr> 
                <td class=td1>您对公司<br>
                  期望看法</td>
                <td class=font1> 
                  <textarea rows=6 cols=50 name=corpview style="font-family:宋体" class="input1"></textarea>
                </td>
              </tr>
              <%if engageno<>0 then %>
              <tr> 
                <td></td>
                <td align=left><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                  <input type="submit" border="0" name="s1" value="确认提交">
                  &nbsp;&nbsp;&nbsp; 
                  <input type="reset" border="0" name="b1" value="取消重填">
                </td>
              </tr>
            </table>  
              <%end if%>
            </form>
       <%else%>
				<tr><td class=font1 align=left><font color=red>系统已经接受了您的应聘资料<br>我们会认真阅读您的资料，如果符合条件，在适当的时候，我们会安排面试。<br>感谢您对我们的关注！</font></td></tr>     
            </table>
        <%end if%>                 
          </td>
          <td bgcolor="#cc9933" valign="top" align="center" width="170"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <div id="Layer3" style="position:absolute; width:10px; height:10; z-index:2"> 
                    <div id="Layer4" style="position:absolute; width:200px; height:115px; z-index:1; left: -15px; top: 80px"> 
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr> 
                          <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="307" height="60">
                              <param name=movie value="images/f_wanbao.swf">
                              <param name=quality value=high>
                              <param name="wmode" value="transparent">
                              <embed src="images/f_wanbao.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="307" height="60">
                              </embed> 
                            </object></td>
                        </tr>
                      </table>
                    </div>
                  </div>
                </td>
              </tr>
            </table>
            <table width="170" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="145">&nbsp;</td>
              </tr>
            </table>
            <table width="170" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td background="images/company/nav_over_green.gif"><a href="careers.asp" class="link1"><font color="#996600">职位招聘</font></a></td>
              </tr>
              <tr> 
                <td height="1"></td>
              </tr>
            </table>
            <table width="170" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td background="images/company/nav_out_green.gif"><a href="careers_txt.asp?id=31" class="link1">人才战略</a></td>
              </tr>
              <tr> 
                <td height="1"></td>
              </tr>
            </table>
            <!--table width="170" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td background="images/company/nav_out_green.gif"><a href="careers_txt.asp?id=33" class="link1">规章制度</a></td>
              </tr>
              <tr> 
                <td height="1"></td>
              </tr>
            </table-->
          </td>
          <td bgcolor="#FFF9E1" valign="top" align="center" width="137"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="250">&nbsp;</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td align="center" height="70"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"           codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="65" height="65" id=ShockwaveFlash2>
                    <param name=movie value="images/banner_service2.swf">
                    <param name=quality value=high>
                    <embed src="images/banner_service2.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="65" height="65">
                    </embed> 
                  </object></td>
              </tr>
              <tr> 
                <td align="center" height="70"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"           codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="65" height="65" id=ShockwaveFlash3>
                    <param name=movie value="images/banner_business2.swf">
                    <param name=quality value=high>
                    <embed src="images/banner_business2.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="65" height="65">
                    </embed> 
                  </object></td>
              </tr>
              <tr> 
                <td align="center" height="70"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"           codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="65" height="65" id=ShockwaveFlash4>
                    <param name=movie value="images/banner_careers2.swf">
                    <param name=quality value=high>
                    <embed src="images/banner_careers2.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="65" height="65">
                    </embed> 
                  </object></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td colspan="2" bgcolor="#FFFFFF" align="center" valign="top">
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td colspan="3">&nbsp;</td>
              </tr>
              <tr> 
                <td background="images/company/point_line.gif" height="1" colspan="3"></td>
              </tr>
              <tr> 
              	<td>
					<%if pageno>1 then%>
						&nbsp;<a href="careers_txt.asp?pageno=<%=pageno-1%>&id=<%=id%>" class="a02">上一页</a>
					<%end if%>
				    <%if pageno<zys then%>
						&nbsp;<a href="careers_txt.asp?pageno=<%=pageno+1%>&id=<%=id%>" class="a02">下一页</a>
					<%end if%>		
				</td>
                <td height="36" align="right"><img src="images/company/icon_top.gif" width="14" height="14"></td>
                <td height="36" width="30" align="center"><a href="#" class="a02">向上</a></td>
              </tr>
            </table>
          </td>
          <td bgcolor="#CC9933" valign="top" align="center" width="170">&nbsp;</td>
          <td bgcolor="#FFF9E1" valign="top" align="center" width="137">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#FFFFFF" align="center" valign="top" height="36">&nbsp;</td>
          <td bgcolor="#CC9933" valign="top" align="center" width="170">&nbsp;</td>
          <td bgcolor="#FFF9E1" valign="top" align="center" width="137">&nbsp;</td>
        </tr>
      </table>
<!-- #include file="./end.asp" -->
<script language=Javascript>
	
	function checkinput(form)
	{
		var flag=false;
		if(form("username").value=="")
			{alert("请您的姓名!");form("username").focus();return false}else{flag=true}	
		if(form("phone").value=="" && form("email").value=="" )
			{alert("请输入联系电话或者E_mail地址!");form("phone").focus();return false}else{flag=true}
		
		if (flag==true) {flag=checkchar(form("username").value)} 
		if (flag==true) {flag=checkchar(form("address").value)} 
		if (flag==true) {flag=checkchar(form("email").value)} 
		if (flag==true) {flag=checkchar(form("city").value)} 
		if (flag==true) {flag=checkchar(form("intro").value)} 
		if (flag==true) {flag=checkchar(form("education").value)} 
		if (flag==true) {flag=checkchar(form("workexp").value)} 
		if (flag==true) {flag=checkchar(form("skill").value)} 
		if (flag==true) {flag=checkchar(form("corpview").value)}
		if (flag==true) {flag=checkchar(form("english").value)}
		if (flag==true) {flag=checkchar(form("certcode").value)}				
		
	}
	
	function checkchar(str)
	{
		str=str.toLowerCase()
		if (str.search("<"+"%")>0)  
		{
			window.alert("("+str+")中有非法字符,请检查!")
			return false;
		}
		if (str.search("<scrip"+"t")>0)
		{
			window.alert("("+str+")中有非法字符,请检查!")
			return false;
		}
		if (str.search("'")>0)
		{
			window.alert("("+str+")中有非法字符,请检查!")
			return false;
		}
		if (str.search('"')>0)
		{
			window.alert("("+str+")中有非法字符,请检查!")
			return false;
		}

		return true;
	}

</script>