<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->

<html>
<head>
<title>发布公文</title>
<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>
<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  //把文件名赋值给指定文本框
  }}


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.shenpiren.value.length<1){window.alert("请选择审批人");document.form3.shenpiren.focus();return (false);}
if(document.form3.title.value.length<1){window.alert("请输入标题");document.form3.title.focus();return (false);}
if(document.form3.faburen.value.length<1){window.alert("请输入发布人");document.form3.faburen.focus();return (false);}
if(document.form3.faburiqi.value.length<1){window.alert("请输入发布日期");document.form3.faburiqi.focus();return (false);}

}

//-->  
</script>
<body>

<table width="100%" height="495" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="27">
	<div class="header">
	<div class="nav">
        <ul>
            <li class="on">上传公文</li>
            <li><a href="manage.asp" target="_self">公文管理</a></li>
          
        </ul>
    </div>	
	</td>
  </tr>

  <tr>
   <td height="470" valign="top"   class="NemuMainBox">
          
	<br>
 
<table  border="1" align="center" cellpadding="10" cellspacing="0" bgcolor="#F7FCFF" style="border-collapse:collapse">
		<tr>
		<td height="280" valign="top"> 
		
		<form method="post" ENCTYPE="multipart/form-data" name="form3" action="savefile.asp" onSubmit="return form_check();">
		  <%
	
	 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("YFSchoolOApro3.YFSchoolDll3")
  call    MyOAASPObj.GongWenAddFile(tname)
           set MyOAASPObj=nothing  
	 
	 
	 %>	
</form>
	 </td>
		</tr>
		</table>	     
  </td>
  </tr>
</table>
</body>
</html>
