<!--#include file="../common/conn.asp"-->
<%
'检查用户权限
call checkuser(GetQueryString("WindowName"))
%>

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>
BODY {
	FONT-SIZE: 9pt
}
TABLE {
	FONT-SIZE: 9pt
}
TH {
	FONT-WEIGHT: 500; FONT-SIZE: 9pt
}
A:link {
	COLOR: #dd006f; TEXT-DECORATION: none
}
A:visited {
	TEXT-DECORATION: none
}
A:active {
	TEXT-DECORATION: none
}
A:hover {
	COLOR: #9933ff; TEXT-DECORATION: underline
}

</STYLE>
 <%

 tmpid=GetVariable("id")
  
 if tmpid="" then
	 title=""
	 content=""

 else
 	'取指定ID的新闻出来编辑
	strSQL="select * from web_job where ID=" & tmpid
	 
	 set rs=server.CreateObject ("ADODB.Recordset")
	 rs.open strSQL,conn,1,1
	 tmpid=trim(rs("ID"))
	 
	 strTitle=trim(rs("j_title"))
	 strContent=Server.HTMLEncode(trim(rs("j_detail")))
	 strAddr=trim(rs("j_addr"))
	 strPay=trim(rs("j_pay"))
	 strCount=trim(rs("j_count"))
	 strExpires=trim(rs("j_expires"))
	 
	 rs.close
	 
	HtmlEditContent = strContent
	EditorHeight = "90%"
	
 end if

%>
<script language="JavaScript" src="../../common/JS_CheckForm.js"></script>
<script language="JavaScript">

function CheckForm(form){
	if(form.title.value==""){
		alert("请填写招聘标题！　")
		return false;
	}
		
	if(document.frames.editor!=null){
		//获取编辑器内容
		form.content.value=document.frames.editor.frames.edit1.textEdit.document.body.innerHTML;
		if(form.content.value.length<10){
			alert("请在编辑招聘的详细要求！　")
			return false;
		}
	}

		
}


</script>

<title>发表<%=GetQueryString("WindowName")%></title></head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
<form action="save.asp?mnid=<%=GetQueryString("mnid")%>&WindowName=<%=GetQueryString("WindowName")%>" method="post" name="newform" target="BackFrame" id="newform" onSubmit="return CheckForm(this)">
  <table width="100%" height="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#336600">
    <tr> 
      <td height="26" colspan="2" bgcolor="#669900"> <font color="#FFFFFF">::发表<%=GetQueryString("WindowName")%></font></td>
    </tr>
    <tr bgcolor="#eeeeee"> 
      <td width="16%" height="26" align="right">招聘标题：</td>
      <td width="84%" height="26"> <input name="title" type="text" class=bginput id="title" value="<%=strTitle%>" size="30" maxlength="100">
        (必填，如：急聘软件工程师) 
        <input name="id" type="hidden" id="id" value="<%=tmpid%>" ></td>
    </tr>
					<%
					'读取招聘的属性，以确定显示那个字段
					strCurrMenu=GetVariable("mnid")
					showAddress=GetKey("Address",WebUserID,"job_" & strCurrMenu )
					showCount=GetKey("Count",WebUserID,"job_" & strCurrMenu )
					showExpires=GetKey("Expires",WebUserID,"job_" & strCurrMenu )
					showPay=GetKey("Pay",WebUserID,"job_" & strCurrMenu )
					showDetail=GetKey("Detail",WebUserID,"job_" & strCurrMenu )
					%>
	<%if showAddress<>"none" then%>
    <tr bgcolor="#F9F9F9"> 
      <td height="26" align="right">工作地点：</td>
      <td height="26"> <input name="addr" type="text" class=bginput id="addr" value="<%=strAddr%>" size="30" maxlength="50"></td>
    </tr>
	<%end if%>
	<%if showExpires<>"none" then%>
    <tr bgcolor="#eeeeee"> 
      <td height="26" align="right">招聘期限：</td>
      <td height="26"> <input name="expires" type="text" class=bginput id="expires" value="<%=strExpires%>" size="30" maxlength="50"></td>
    </tr>
	<%end if%>
	<%if showCount<>"none" then%>
    <tr bgcolor="#F9F9F9"> 
      <td height="26" align="right">人　数：</td>
      <td height="26"> <input name="count" type="text" class=bginput id="count" value="<%=strCount%>" size="10" maxlength="10"></td>
    </tr>
	<%end if%>
	<%if showPay<>"none" then%>
    <tr bgcolor="#F9F9F9"> 
      <td height="26" align="right">职位工资：</td>
      <td height="26"> <input name="pay" type="text" class=bginput id="pay" value="<%=strPay%>" size="10" maxlength="10"></td>
    </tr>
	<%end if%>
	<%if showDetail<>"none" then%>
    <tr align="center" bgcolor="#D4D0C8"> 
      <td height="100%" colspan="2" valign="middle"> 
        <table width="100%" height="100%" border=1 cellpadding="0" cellspacing="0"  bordercolor=gray >
          <tr> 
            <td align=center> 
			 <textarea name="content" style="display:none"><%=HtmlEditContent%></textarea><input type="hidden" name="content1">
                    <iframe ID="eWebEditor1" src="../editor/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="100%" HEIGHT="100%">
                    </iframe>
            </td>
          </tr>
        </table>
      </td>
    </tr>
	<%end if%>
    <tr align="center" bgcolor="#eeeeee"> 
      <td height="40" colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr> 
            <td align="center"> <input name="submit" type=submit class=button value="　保　存　" >
              　 
              <input name="YL" type=button class=button value="　关　闭　" onClick="window.close()"></td>
          </tr>
        </table></td>
    </tr>
  </table>
  
</form>
<iframe name="BackFrame" width="0" height="0" src="about:blank"></iframe>
</body>
</html>