<!--#include file="../fy.Function.asp"-->
<!--#include file="../include/fy.F.asp"-->
<!--#include file="../Mode/fy.class.M.ASP"-->
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>fycms后台管理系统</title>
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/content.css">
<script type='text/javascript' src='../js/main.js'></script>
<script type="text/javascript" src="../../fy_inc/js/jquery.js"></script>
<script type="text/javascript" src="../../fy_inc/js/swfobject.js"></script>
<SCRIPT LANGUAGE='JavaScript'>
var fyuser="<%=fycms.strToAsc(RSQL(Trim(Request.Cookies(fycmsN)("AdminName"))))%>";
var fypass="<%=fycms.strToAsc(RSQL(Trim(Request.Cookies(fycmsN)("AdminPassword"))))%>";
</SCRIPT>
<!--#include file="../../editor/index.asp"-->
<%=writejs("../../")%>
<script type='text/javascript' src='../../fy_inc/js/lhg/lhgdialog.min.js'></script>
</head>
<body>
<%
Dim ClassName,EnName,ActLink,ismenu,tg,rootid,CMS_Extension,disabled,content,makehtmlname
Dim ClassID,ClassKeywords,ClassDescription,Getrootid,ConTentTemplate,FolderTemplate,FilePathName,addrootid
Dim GroupIDClass,TGGroupID,OrderID,TiesDomain,ModeName,ModeID,classnames,fycms_DIY,moresite,sitepath,siteurl
Dim ClassPurview,ClassArrGroupID,ClassReadPoint,ClassChargeType ,ClassPitchTime,ClassReadTimes,ClassDividePercent
Dim SEOtitle,ClassPicUrl,labelfor,classmake,ID,Action
ClassID = ChkNumeric(request("ClassID"))
Action = request("Action")

ModeID = ChkNumeric(Request("ModeID"))
if ModeID=0 or ModeID="" Then ModeID=1
ModeName= fycms.ACT_C(ModeID,1) 
If Not fycms.fycms_QXYZ(ModeID,"","") Then   Call fycms.Alert("对不起，您没有"&fycms.ACT_C(ModeID,1)&"系该项操作权限！","")
If Action = "add" Then
	fycms_DIY=Split(AF.fycms_DIY_F(ModeID,1,""),"§") 
	ClassPurview=0
 	ClassReadPoint=0
	ClassChargeType =0
	ClassPitchTime=0
	ClassReadTimes=0
	ClassDividePercent=0
	labelfor=1
	ismenu=1:tg=1:CMS_Extension="index.html":OrderID=10:moresite=0:	ActLink=1:FilePathName="{enname}/{id}"
	classmake=3
 	if ClassID <>"0" then
		Getrootid =  ClassID
		FolderTemplate=fycms_DIY(23)
	Else
		Getrootid = "0"
		FolderTemplate=fycms_DIY(22)
	End if
	IF ClassID <> "0" Then 
		Dim Rs,ShowErr
		Set Rs=server.CreateObject("adodb.recordset") 
		Rs.OPen "Select ActLink from Class_fy where ClassID="& ClassID &"  order by id desc",Conn,1,1
		If Not  Rs.Eof Then '判断是否为转向链接
			 if Rs("ActLink")="2" then 
 				 Call fycms.ActErr("转向链接不能添加子类","","1")
			 Else 
				classnames =fycms.ACT_L(ClassID,2)
				EnName=fycms.ACT_L(ClassID,3) 
				addrootid=fycms.ACT_L(ClassID,11) 
			 End if 
	   End If
		
	Else
		classnames ="根栏目"
	End If
	ConTentTemplate=fycms_DIY(24)
Else
	Set Rs = server.CreateObject("adodb.recordset")
	Rs.open "select * From  Class_fy where ClassID="& ClassID &"",Conn,1,3
	if Not   Rs.eof then
		ismenu = Rs("ismenu"):tg = Rs("tg")
		ClassName = Rs("ClassName")
		EnName = Rs("ClasseName") 
		CMS_Extension = Rs("Extension")
		ClassDescription = Rs("ClassDescription")
		ClassKeywords = Rs("ClassKeywords")
		ActLink = Rs("ActLink")
		TGGroupID = Rs("TGGroupID")
		ConTentTemplate=Rs("ConTentTemplate")
		OrderID=Rs("OrderID")
		GroupIDClass=Rs("GroupIDClass")
		ModeID=Rs("ModeID")
		moresite=Rs("moresite")
		sitepath=Rs("sitepath")
		siteurl=Rs("siteurl")
		FilePathName=Rs("FilePathName")
		If RS("Content") <> "" Then Content=fycms.Htmljapan(RS("Content"))
	    makehtmlname=Rs("makehtmlname")
		FolderTemplate=Rs("FolderTemplate")
  		ClassPurview=Rs("ClassPurview")
		ClassReadPoint=Rs("ClassReadPoint")
		ClassChargeType =Rs("ClassChargeType")
		ClassPitchTime=Rs("ClassPitchTime")
		ClassReadTimes=Rs("ClassReadTimes")
		ClassDividePercent=Rs("ClassDividePercent")
		ClassArrGroupID=Rs("ClassArrGroupID")
		SEOtitle=rs("SEOtitle")
		ClassPicUrl=rs("ClassPicUrl")
		ACTlink=rs("ACTlink")
		labelfor=rs("labelfor")
		classmake=rs("classmake")
		ID=rs("ID")
		Dim classdiy
		If fycms.ACT_L(classid,12)="3" Then 
			classdiy="<a href=""fy.ClassAdd.asp?ClassID="&classid&"&Action=edit"" class=""btn "">切换全部页面</a> <a href=""fy.diyname.ClassAdd.asp?ClassID="&classid&"&Action=edit"" class=""btn btn_primary"">切换单页页面</a>"
		End If 
   		Dim Rs1
		Set Rs1=fycms.actexe("Select ClassName From Class_fy Where ClassID=" &Rs("rootid")&" ")
		If Not Rs1.EOF Then classnames=Rs1("ClassName") Else classnames ="根栏目"
		disabled="disabled=true "
	End If
End If
     %>
<div class="content"> 
	<div class="breadnav">当前位置：<a href="#">后台首页</a> >> 日志管理</div>
    <div class="opers">
		<a href="fy.Class.asp" class="btn">管理首页</a>
		<a href="fy.ClassAdd.asp?Action=add" class="btn">添加根栏目</a>
		<a href="fy.ClassAddall.asp?Action=add" class="btn">批量添加栏目</a>
		<a href="fy.Classfy.asp?Action=one" class="btn">栏目排序</a>
		<a href="fy.m.asp"  class="btn">栏目自定义字段</a>
		<%=classdiy%>

<a href="javascript:void(0);" class="btn">文章回收站</a>
    </div>

    <form id="Article" name="Article" method="post" action="fy.diyclassname.ClassSave.asp?ClassID=<%=ClassID%>">
    <div class="divtable"> 
    
       <dl class="merger" >
            <dt>添加/修改<%=ModeName%>栏目</dt> <dd></dd>
          </dl>
 
        <dl>
            <dt>SEO标题：</dt>
            <dd>
               <input name="SEOtitle" type="text" class="Ainput"  value="<%= SEOtitle %>" size="35">
             </dd>
         </dl>
 

     <% 	 '
		If Request("Action")="edit" Then 
			echo M.ACT_MXEdit(888,ID) 

		Else 
		   echo   M.ACT_NoRormMXList(888)
		End If 
   %> 



        <dl>
            <dt>栏目缩略图：</dt>
            <dd>
               <input name="ClassPicUrl"  id="ClassPicUrl" type="text" class="Ainput"  value="<%= ClassPicUrl %>" size="50">
   <input id="PicUrls" class="btn" onClick="javascript:tdialog(888,'<%=fycms.actsys&fycms.adminurl%>/include/Upload_Admin.asp?A=add&instr=0&ModeID=888&instrname=ClassPicUrl');" name="button" type="button"   value="点击上传图片">

             </dd>
         </dl>
		<input type="hidden" name="moresite" id="moresite" value="0">
 
        
        <dl>
            <dt>在导航栏显示：</dt>
            <dd>
                <label for=ismenu1>
        <input  type=radio  value=1 <%If ismenu = 1 then echo("Checked ")  %> name=ismenu id=ismenu1>
        &nbsp;&nbsp;是&nbsp;&nbsp;</label>
        <label for=ismenu2>
        <input type=radio  <%If ismenu = 0 then echo("Checked ")  %> value=0 name=ismenu id=ismenu2>
        &nbsp;&nbsp;否&nbsp;&nbsp;</label>  
             </dd>
         </dl>
 
       
     
 



   <dl>
            <dt>栏目META关键字：</dt>
            <dd>
               <textarea name="ClassKeywords" cols="50"  rows="5" id="ClassKeywords"><%= ClassKeywords %></textarea> 
             </dd>
         </dl>
 
        <dl >
            <dt>栏目META描述：</dt>
            <dd>
               <textarea name="ClassDescription" cols="50" rows="5" id="ClassDescription"><%= ClassDescription %></textarea>
             </dd>
         </dl>

       

        <dl>
            <dt>单页文件名：</dt>
            <dd>
               <input name="makehtmlname" type="text" class="Ainput" value="<%= makehtmlname %>" size=45>如 about.html,intro.html,help.html等
             </dd>
         </dl>
 
 
 
        <dl  id=ClassSetting10 >
            <dt>单页内容：使用标签{info:content}在模板里调用：</dt>
            <dd>
               <%=writeeditor(0,"Content","Content","basic",Content)%>
             </dd>
         </dl>
 
        
       
            <dl>
            <dt class="vhid">提交：</dt>
            <dd>
                <a class="btn btn_primary" href="javascript:void(0);" onclick="CheckForm()">保存</a>
                <input class="btn" type="reset" name="Submit2" value="  重置  ">
            </dd>
         </dl>
        
    </div>
    </form>


</div>

 

<script language = "JavaScript">
function ClassSetting(n){
	if (n == "3"){
		ClassSetting1.style.display='none';
  		ClassSetting10.style.display='';
		ClassSetting4.style.display='none';
		ClassSetting5.style.display='';
		ClassSetting6.style.display='';
		ClassSetting7.style.display='none';
 	}
	else if (n == "2"){
		ClassSetting1.style.display='';
  		ClassSetting4.style.display='none';
		ClassSetting5.style.display='none';
		ClassSetting6.style.display='none';
		ClassSetting7.style.display='none';
 		ClassSetting10.style.display='none';
	}
	else
	{
		ClassSetting1.style.display='none';
 		ClassSetting4.style.display='';
		ClassSetting5.style.display='';
		ClassSetting6.style.display='';
		ClassSetting7.style.display='';
  		ClassSetting10.style.display='none';
	
	}
}
<%=insertjs("Content")%>

function moresiteset(n){
	if (n == 0){
		moresite1.style.display='none';
		moresite2.style.display='none';
	}
	else{
		moresite1.style.display='';
		moresite2.style.display='';
	}
} 
function IFPinYins()
			{ if (document.Article.IFPinYin.checked==true)
			  {
			  document.Article.EnName.disabled=true;
			  document.Article.EnName.value="不能修改";
			  }
			  else
				{
				document.Article.EnName.checked=true;
				  document.Article.EnName.disabled=false;
				   document.Article.EnName.value="";
				 }
			}
function EditEnames()
			{ if (document.Article.EditEname.checked==false)
			  {
			  document.Article.EnName.disabled=true;
			  }
			  else
				{
				document.Article.EnName.checked=true;
				  document.Article.EnName.disabled=false;
				 }
			}


function CheckForm()
{ var form=document.Article;
   
			<%
 


echo checkeditpost(888,5)
 
  %>
 	    form.submit();
        return true;
}
 	</script>
</body>
</html>
