<!--#include file="../checkLogin.asp"-->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<script src="../laydate/laydate.js"></script>
<title>发布公告</title>
    
<link rel="stylesheet" href="../kindeditor3/themes/default/default.css" />
<script charset="utf-8" src="../kindeditor3/kindeditor.js"></script>
<script charset="utf-8" src="../kindeditor3/lang/zh_CN.js"></script>
<script>
		
			KindEditor.ready(function(K) {
			var editor = K.create('textarea[name="content"]', {
				cssPath : '../kindeditor3/plugins/code/prettify.css',
				uploadJson : '../kindeditor3/asp/upload_json.asp',
				fileManagerJson : '../kindeditor3/asp/file_manager_json.asp',
				allowFileManager : true,
				
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
		});
	</script>
 
<script language="javascript"> 
function divshow(n) 
{


  
  var filePath=document.getElementById("file1").value; //取文件域中本地文件路径
  var thisFileName=""
  if(filePath!=""){
     getFileName=filePath.split("\\");                     //在window系统中，本地文件夹用“\”号分隔
  len=getFileName.length
  thisFileName=getFileName[len-1].split(".")[0]        //取文件名，并过滤掉后缀
  }
  if(thisFileName!=""){
    if(document.form3.title.value.length<1){ 
    document.form3.title.value=thisFileName =thisFileName  //把文件名赋值给指定文本框document.getElementById("title").value
  }}
  
  document.getElementById(n).style.display="block";

}
</script>


 

<script Language="JavaScript">
function right(mainStr,lngLen) {
// alert(mainStr.length)
if (mainStr.length-lngLen>=0 && mainStr.length>=0 && mainStr.length-lngLen<=mainStr.length) {
return mainStr.substring(mainStr.length-lngLen,mainStr.length)}
else{return null}
}


function form_check(){
var fso,f;  
if(document.form3.sendto.value.length<1){window.alert("请选择部门");document.form3.sendto.focus();return (false);}
if(document.form3.title.value.length<1){window.alert("请输入标题");document.form3.title.focus();return (false);}

document.getElementById('good').style.display = "block";   
  
}

//-->  
</script>

<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	width:297px;
	height:172px;
	z-index:1;
	left: 445px;
	top: 199px;
}
-->
</style>
</head>
<body topmargin="3" leftmargin="5">


  
<table  border="1" align="center" cellpadding="8" cellspacing="0" bgcolor="#F7FCFF" style="border-collapse:collapse">
		<tr>
		<td height="295" valign="top"> 
		 <div id="good" style="display:none;">   <div align="center">
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td><div align="right"><img src="../images/img/GongGao/dengdai.gif" width="100" height="100"></div></td>
       <td>正在上传，请等待……</td>
     </tr>
   </table>
   </div></div> </div>
		<form method="post" ENCTYPE="multipart/form-data" name="form3" action="savefile.asp" onSubmit="return form_check();">
		
		  <%
	 strftype=request("ftype")
	 tname=request.cookies("tname")
	 '检查权限
       Set MyOAASPObj = Server.CreateObject("YFSchoolOApro.YFSchoolDll")
           if MyOAASPObj.QuanXian(tname,"信息管理")=0 then 
		    response.redirect  "../NoPower.asp"
           end if 
		   set MyOAASPObj=nothing
'检查权限结束
	 
	 
	     	Set MyOAASPObj = Server.CreateObject("YFSchoolOApro.YFSchoolDll")
           call  MyOAASPObj.GongGaoAddFile(Tname,strftype)
		    set MyOAASPObj=nothing
	 
	 
	 %>	
	 
</form>
	 </td>
		</tr>
</table>
</body>  
  
</html>  


