<!--#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"/>
<STYLE TYPE="text/css">
    <!--
    BODY 	    {background-color: #FFFFFF; text-align: center; font-size: 12px; font-family: Verdana;}
   
    .blackBacking   {background-color: #000000;}
    .names 	    {background-color: #ff9900; font-size: 13px; color: #FFFFFF; text-decoration: none; text-align:  center;       font-family: Verdana; font-weight: bold;}
    .calendarBody   {background-color: #F2EBCB; font-size: 13px; color: #000000; text-decoration: none; text-align:  center; font-family: Verdana;}
    .calCurrentDay  {background-color: #FFCCCC; font-size: 13px; color: #FFFFFF;}
    .calOtherDay    {background-color: #E1F0FF; font-size: 16px; color: #000000;}
    .calNotDay	    {background-color: #EEF1F2; font-size: 18px; color: #000000;}
	.caltime	    {background-color: #EEF1F2; font-size: 15px; color: #990000;}
    .calFormMenu    {background-color: #AECE6A; font-size: 13px; color: #FFFFFF; text-decoration: none; text-align:  center; font-family: Verdana; font-weight: bold;}
.STYLE4 {font-size: 18}
    -->
  </STYLE>

<!--免费编辑器引用-->        
<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 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(){
if(right(document.form3.file1.value,3)=="exe"){window.alert("不能直接诶发送EXE文件，请压缩后在发送");document.form3.file1.focus();return (false);}
if(document.form3.vname1.value.length<1){window.alert("请选择类别");document.form3.vname1.focus();return (false);}
if(document.form3.vname2.value.length<1){window.alert("请选择二级类别");document.form3.vname2.focus();return (false);}
if(document.form3.title.value.length<1){window.alert("请输入网页文章标题");document.form3.title.focus();return (false);}

}

</script>

<body>
<!--//////////////////////////////////	 --> 

<%
'检查权限
       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

'检查权限结束
   %>
     




<script language="javascript" type="text/javascript">
 var classlist=new Array(); //定义js数组
<%
i=1
Set rs = Conn.Execute("SELECT   * from  varSet where  name='学校网站菜单设置'")
			While NOT rs.EOF %>
			//使用asp循环填充js数组,三维数组,分别保存栏目的父ID,栏目名称,栏目ID
			
 classlist[<%=i-1%>]=new Array(<%=rs("vid")%>,"<%=rs("vname2")%>","<%=rs("vname1")%>");

 
 <%  i=i+1
 
 rs.MoveNext 
   
			Wend
			rs.Close%>

//一级栏目选择变动触发函数

function getSmallClass()
{
 var parentid=document.all.vname1.value;  //获取父栏目的ID
 document.all.vname2.length=0;   //将二级栏目下拉清空
 document.all.vname2.options.add(new Option("","0"))  //添加一个自定义的下拉选项
 for(i=0;i<classlist.length;i++)   //遍历js数组
 {
  
  if(classlist[i][2]==parentid)   //js数组里的选项符合条件(父栏目ID来判断)
  {
     document.all.vname2.options.add(new Option(classlist[i][1],classlist[i][1]))  //添加到二级栏目的下拉选项里
  }
 }
}
</script>


<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>
            <li><a href="TiXing.asp" target="_self">发布文章提醒</a></li>
        </ul>
    </div>	
	</td>
  </tr>

  <tr>
   <td height="470" valign="top"   class="NemuMainBox">
   <br>
   
		<form method="post" ENCTYPE="multipart/form-data" name="form3" action="savefile.asp" onSubmit="return form_check();">
		
		
		<div align="center">
		<table width="767" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#F7FCFF" style="border-collapse:collapse">
		<tr>
		<td width="763"><br>
		<table width="726" border="0" align="center">
		<tr>
		<td width="104" height="28" class="STYLE1"><div align="center">类&nbsp;&nbsp;别</div></td>
		<td colspan="3" class="STYLE1">
		<select name="vname1" id="vname1" style= "width:130px " onChange="getSmallClass();">
		<option selected value=<%=bumen%>><%=bumen%></option>
		<%
		'一级栏目通过asp代码的方式加载
		Set RSsel = Conn.Execute("select avg(vid) as 序号, vname1 from  varset where name='学校网站菜单设置' group  by  vname1 order by 序号")
		While NOT RSsel.EOF %>
		<option value=<%=RSsel( "vname1" )%>><%=RSsel( "vname1" )%></option>
		<% RSsel.MoveNext
		Wend
		RSsel.Close%>
		</select></td>
		</tr>
		<tr>
		<td height="28" class="STYLE1"><div align="center">二级类别</div></td>
		<td colspan="3" class="STYLE1"><select name="vname2" id="vname2" style= "width:130px ">
		<option selected value=<%=ftype%>><%=ftype%></option>
		
		</select></td>
		</tr>
		<tr>
		<td height="28" class="STYLE1"><div align="center">发布者</div></td>
		<td width="142" class="STYLE1"><input name="tname" type="text" class="text" id="tname"  size="16"   value=<%=request.cookies("tname")%>></td>
		<td width="94" class="STYLE1"><div align="center">发布时间</div></td>
		<td width="368" class="STYLE1"><input
		name=dateandtime class="text" style="WIDTH:100px" onBlur='this.style.backgroundColor="#FFFFFF"' 
		onFocus='this.style.backgroundColor="#FFFADF"'  value=<%=date()%>>					  </td>
		</tr>
		<tr>
		<td height="28" class="STYLE1"><div align="center">标&nbsp;&nbsp;题</div></td>
		<td colspan="3" class="STYLE1"><input name="title" class="text" style="WIDTH: 96%" 
		onFocus='this.style.backgroundColor="#FFFADF"'  onBlur='this.style.backgroundColor="#FFFFFF"' maxlength="50">
		
		
		
		</td>
		</tr>
		<tr>
		<td height="58" class="STYLE1"><div align="center">网页内容</div></td>
		<td colspan="3" class="STYLE1"><label>
		<textarea id="content1" name="content" style="width:600px;height:250px;visibility:hidden;">
		<p>
		
		</p>
		</textarea>
		</label></td>
		</tr>
		<tr>
		<td height="27" class="STYLE1"><div align="center">附&nbsp;&nbsp;件</div></td>
		<td colspan="3" class="STYLE1"><input name="file1" type="file" class="text" size=50  style="WIDTH: 100%"></td>
		</tr>
		<tr>
		<td height="28" class="STYLE1"><div align="center"></div></td>
		<td colspan="3" class="STYLE1"><div align="center">
		<input name="submit" type="submit" class="topanniu" value="保存"  ></div>
		<div align="left"></div></td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</div>
		</form>

   
   
   
   </td>
  </tr>
</table>
</body>
</html>
