<!--#include file="Access.asp"  -->
<!-- #include file="inc/functions.asp" -->
<!-- #include file="../func/rand.asp" -->
<!-- #include file="x_to_html/recruit_content_to_html.asp" -->
<% '添加数据到数据表
page=request.querystring("page")
act=request.querystring("act")
keywords=request.querystring("keywords")
article_id=cint(request.querystring("id"))


act1=Request("act1")
If act1="save" Then 
a_id=cint(request.form("j_id"))
j_firm=trim(request.form("j_firm"))
j_depart=trim(request.form("j_depart"))
j_name=trim(request.form("j_name"))
j_salary=trim(request.form("j_salary"))
j_sum=trim(request.form("j_sum"))
j_sex=trim(request.form("j_sex"))
j_age=trim(request.form("j_age"))
j_edu=trim(request.form("j_edu"))
j_exp=trim(request.form("j_exp"))
j_date=trim(request.form("j_date"))
j_demand=trim(request.form("j_demand"))
j_view_yes=trim(request.form("j_view_yes"))
j_index_push=trim(request.form("j_index_push"))

set rs=server.createobject("adodb.recordset")
sql="select author from web_com where id="&j_firm&""
rs.open(sql),cn,1,1
if not rs.eof then
author_id=rs("author")
end if
rs.close
set rs=nothing

set rs=server.createobject("adodb.recordset")
sql="select * from web_job where id="&a_id&""
rs.open(sql),cn,1,3

rs("j_firm")=j_firm
rs("j_depart")=j_depart
rs("j_name")=j_name
if j_salary<>"" then
rs("j_salary")=j_salary
else
rs("j_salary")="面议"
end if
if j_sum<>"" then
rs("j_sum")=j_sum
else
rs("j_sum")="不限"
end if
rs("j_sex")=j_sex
rs("j_age")=j_age
rs("j_edu")=j_edu
rs("j_exp")=j_exp
rs("j_date")=j_date
rs("j_demand")=j_demand
rs("j_view_yes")=j_view_yes
rs("j_index_push")=j_index_push

if author_id<>"" then
rs("author_id")=author_id
end if
rs.update
rs.close
set rs=nothing
%>

<% '生成html
call recruit_content_to_html(a_id,filepath)
%>

<%
response.Write "<script language='javascript'>alert('修改成功！');location.href='job_list.asp?page="&page&"&act="&act&"&keywords="&keywords&"';</script>"
end if 
 %>
 

	<%
Call header()

%>
<% set rs=server.createobject("adodb.recordset")
sql="select * from web_job where id="&article_id&""
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then%>

  <form id="form1" name="form1" method="post" action="?act1=save&page=<%=page%>&act=<%=act%>&keywords=<%=keywords%>">
         <script language='javascript'>
function checksignup1() {
if ( document.form1.j_firm.value == '' ) {
window.alert('请输入招聘公司^_^');
document.form1.j_firm.focus();
return false;}

if ( document.form1.j_name.value == '' ) {
window.alert('请输入招聘职位^_^');
document.form1.j_name.focus();
return false;}

if(document.form1.j_salary.value.search(/^([0-9]*)([.]?)([0-9]*)$/)   ==   -1)   
      {   
  window.alert("工资待遇只能是数字^_^");   
document.form1.j_salary.focus();
return false;}

if(document.form1.j_sum.value.search(/^([0-9]*)([.]?)([0-9]*)$/)   ==   -1)   
      {   
  window.alert("招聘人数只能是数字^_^");   
document.form1.j_sum.focus();
return false;}

return true;}
</script>
	<table cellpadding='3' cellspacing='1' border='0' class='tableBorder' align=center>
	<tr>
	  <th class='tableHeaderText' colspan=2 height=25>修改招聘信息</th>
	<tr>
	  <td height=23 class='forumRowHighLight'>招聘公司 (必填) </td>
	  <td class='forumRowHighLight'><select name="j_firm" id="j_firm">
<option value="">请选择</option>
<% set rsp=server.createobject("adodb.recordset")
		   sql="select id,name from web_com"
		   rsp.open(sql),cn,1,1
		   if not rsp.eof and not rsp.bof then
		   do while not rsp.eof 
		   %> <option value="<%=rsp("id")%>" <%if rsp("id")=cint(rs("j_firm")) then
		response.write "selected"
		end if%>>[<%=rsp("id")%>] <%=rsp("name")%></option>
            <%
			rsp.movenext
			loop
			end if
			rsp.close
			set rsp=nothing%></select>
	  <input name='j_id' type='hidden' id='j_id' value="<%=rs("id")%>" size='70'></td>
	  </tr>
	<tr>
	  <td height=23 class='forumRow'>招聘部门</td>
	  <td class='forumRow'><input name='j_depart' type='text' id='j_depart'  value="<%=rs("j_depart")%>" size='50'></td>
	  </tr>
	<tr>
	<td width="15%" height=23 class='forumRowHighLight'>招聘职位 (必填) </td>
	<td class='forumRowHighLight'><input name='j_name' type='text' id='j_name'  value="<%=rs("j_name")%>" size='50'>
	  &nbsp;</td>
	</tr>
	<tr>
	<td class='forumRow' height=23>工资待遇</td>
    <td class='forumRow'><span class="forumRow">
      <input name='j_salary' type='text' id='j_salary'  value="<%if rs("j_salary")<>"面议" then
	  response.write rs("j_salary")
	  end if%>" size='20'>
      元，不填则表示&quot;工资面议&quot;</span></td>
	</tr>
	  <tr>
	    <td class='forumRowHighLight' height=23>招聘人数 </td>
	    <td class='forumRowHighLight'><input name='j_sum' type='text' id='j_sum'  value="<%if rs("j_sum")<>"不限" then
	  response.write rs("j_sum")
	  end if%>"  size='20'> 不填则表示&quot;人数不限&quot;</td>
      </tr>
	  <tr>
	    <td class='forumRow' height=35>高级选项</td>
	    <td width="85%" class='forumRow'>性别
	      <label>
	      <select name="j_sex" id="j_sex">
	        <option value="不限" <% if rs("j_sex")="不限" then response.write "selected" end if%>>不限</option>
	        <option value="男" <% if rs("j_sex")="男" then response.write "selected" end if%>>男</option>
	        <option value="女" <% if rs("j_sex")="女" then response.write "selected" end if%>>女</option>
          </select>
&nbsp;&nbsp; </label> 
        年龄
        <label>
        <select name="j_age" id="j_age">
          <option value="不限"  <% if rs("j_age")="不限" then response.write "selected" end if%>>不限</option>
          <option value="22岁以上"  <% if rs("j_age")="22岁以上" then response.write "selected" end if%>>22岁以上</option>
          <option value="22-28岁"  <% if rs("j_age")="22-28岁" then response.write "selected" end if%>>22-28岁</option>
          <option value="28-35岁"  <% if rs("j_age")="28-35岁" then response.write "selected" end if%>>28-35岁</option>
          <option value="35-42岁"  <% if rs("j_age")="35-42岁" then response.write "selected" end if%>>35-42岁</option>
          <option value="42-50岁"  <% if rs("j_age")="42-50岁" then response.write "selected" end if%>>42-50岁</option>
		  <option value="50岁以上"  <% if rs("j_age")="50岁以上" then response.write "selected" end if%>>50岁以上</option>
          <option value="22岁以下"  <% if rs("j_age")="22岁以下" then response.write "selected" end if%>>22岁以下</option>
          <option value="28岁以下"  <% if rs("j_age")="28岁以下" then response.write "selected" end if%>>28岁以下</option>
          <option value="35岁以下"  <% if rs("j_age")="35岁以下" then response.write "selected" end if%>>35岁以下</option>
          <option value="42岁以下"  <% if rs("j_age")="42岁以下" then response.write "selected" end if%>>42岁以下</option>
          <option value="50岁以下"  <% if rs("j_age")="50岁以下" then response.write "selected" end if%>>50岁以下</option>
        </select>
        </label> 
        &nbsp;&nbsp;&nbsp;学历 
        <label>
        <select name="j_edu" id="j_edu">
          <option value="不限" <% if rs("j_edu")="不限" then response.write "selected" end if%>>不限</option>
          <option value="小学以上" <% if rs("j_edu")="小学以上" then response.write "selected" end if%>>小学以上</option>
          <option value="初中以上" <% if rs("j_edu")="初中以上" then response.write "selected" end if%>>初中以上</option>
          <option value="高中以上" <% if rs("j_edu")="高中以上" then response.write "selected" end if%>>高中以上</option>
          <option value="中专以上" <% if rs("j_edu")="中专以上" then response.write "selected" end if%>>中专以上</option>
          <option value="大专以上" <% if rs("j_edu")="大专以上" then response.write "selected" end if%>>大专以上</option>
          <option value="本科以上" <% if rs("j_edu")="本科以上" then response.write "selected" end if%>>本科以上</option>
          <option value="研究生" <% if rs("j_edu")="研究生" then response.write "selected" end if%>>研究生</option>
          <option value="硕士" <% if rs("j_edu")="硕士" then response.write "selected" end if%>>硕士</option>
          <option value="博士" <% if rs("j_edu")="博士" then response.write "selected" end if%>>博士</option>
          <option value="博士后" <% if rs("j_edu")="博士后" then response.write "selected" end if%>>博士后</option>
                                </select>
        </label>
        &nbsp;&nbsp;&nbsp;工作年限
        <label>
        <select name="j_exp" id="j_exp">
          <option value="不限" <% if rs("j_exp")="不限" then response.write "selected" end if%>>不限</option>
          <option value="1年" <% if rs("j_exp")="1年" then response.write "selected" end if%>>1年</option>
          <option value="2年" <% if rs("j_exp")="2年" then response.write "selected" end if%>>2年</option>
          <option value="3年" <% if rs("j_exp")="3年" then response.write "selected" end if%>>3年</option>
          <option value="半年以上" <% if rs("j_exp")="半年以上" then response.write "selected" end if%>>半年以上</option>
          <option value="1年以上" <% if rs("j_exp")="1年以上" then response.write "selected" end if%>>1年以上</option>
          <option value="3年以上" <% if rs("j_exp")="3年以上" then response.write "selected" end if%>>3年以上</option>
          <option value="5年以上" <% if rs("j_exp")="5年以上" then response.write "selected" end if%>>5年以上</option>
          <option value="10年以上" <% if rs("j_exp")="10年以上" then response.write "selected" end if%>>10年以上</option>
          <option value="1-3年" <% if rs("j_exp")="1-3年" then response.write "selected" end if%>>1-3年</option>
          <option value="3-5年" <% if rs("j_exp")="3-5年" then response.write "selected" end if%>>3-5年</option>
          <option value="5-8年" <% if rs("j_exp")="5-8年" then response.write "selected" end if%>>5-8年</option>
          <option value="8-10年" <% if rs("j_exp")="8-10年" then response.write "selected" end if%>>8-10年</option>
                                        </select>
        </label></td>
	  </tr>
	  <tr>
	    <td  class='forumRowHighLight' height=35>截止日期</td>
	    <td  class='forumRowHighLight'><% rs_date=rs("j_date")%><!-- #include file="inc/date_time.asp" --></td>
      </tr><tr>
	  <td class='forumRow' height=11>具体要求</td>
	  <td class='forumRow'>
	  <textarea name='j_demand'  style='display:none' dataType='Require'  ><%=rs("j_demand")%></textarea>
	  <iframe ID='eWebEditor1' src='editor/ewebeditor.htm?id=j_demand&style=coolblue&originalfilename=d_originalfilename&savefilename=d_savefilename&savepathfilename=d_savepathfilename' frameborder='0' scrolling='no' width='100%' HEIGHT='350'></iframe></td>
	</tr>
	<tr>
	  <td class='forumRowHighLight' height=23>是否显示</td>
	  <td class='forumRowHighLight'><label>
	    <input type="radio" name="j_view_yes" value="1"<%
		if rs("j_view_yes")=1 then
		response.write "checked"
		end if%>>
      是
      &nbsp;
      <input name="j_view_yes" type="radio" value="0" <%if rs("j_view_yes")=0 then
		response.write "checked"
		end if%>>
      否</label></td>
	</tr>
	<tr>
	  <td class='forumRowHighLight' height=23>是否推荐</td>
	  <td class='forumRowHighLight'><label>
	    <input type="radio" name="j_index_push" value="1"<%
		if rs("j_index_push")=1 then
		response.write "checked"
		end if%>>
      是
      &nbsp;
      <input name="j_index_push" type="radio" value="0" <%if rs("j_index_push")=0 then
		response.write "checked"
		end if%>>
      否</label></td>
	</tr>	
	<tr><td height="50" colspan=2  class='forumRow'><div align="center">
	  <INPUT type=submit value='提交' onClick='javascript:return checksignup1()' name=Submit>
	  </div></td></tr>
	</table>
</form>
<%
else
response.write"未找到数据"
end if%>
<%
Call DbconnEnd()
 %>