<!--#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="../../css/style.css" />
<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>

<script type="text/javascript" charset="utf-8" src="../../kindeditor3/kindeditor.js"></script><!--免费编辑器引用-->
  <script type="text/javascript">
    KE.show({
        id : 'content1',
        cssPath : './index.css',
     	imageUploadJson : '../../asp/upload_json.asp', 
        fileManagerJson : '../../asp/file_manager_json.asp'

    });
  </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="98%" height="499" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="33"><table width="100%" height="33" border="0" cellpadding="0" cellspacing="0">
      <tr>
      <td width="100" class="Nemuselect" ><div align="center"><a href="addfile.asp" target="_self">发布</a><a href="manage.asp" target="_self">网站</a><a href="addfile.asp" target="_self">文章</a></div></td>
       <td width="100" class="NemuNot" ><div align="center"><a href="manage.asp" target="_self">管理网站文章</a></div></td>
       <td width="100" class="NemuNot" ><div align="center"><a href="TiXing.asp" target="_self">发布文章提醒</a></div></td>
       <td    class="NemuLine">&nbsp;</td>
      </tr>
    </table></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="694" border="0" align="center">
		<tr>
		<td width="86" 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="163" 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="333" 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 ></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>
