<!--#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 "">切换单页页面</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 btn_primary">添加根栏目</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>
		<a href="fy.Setclass.asp" class="btn ">栏目批量设置</a>

     </div>

    <form id="Article" name="Article" method="post" action="fy.ClassSave.asp?action=<%= request("Action")%>">
    <div class="divtable"> 
    
       <dl class="merger" >
            <dt>添加/修改<%=ModeName%>栏目</dt> <dd></dd>
          </dl>

        <dl>
            <dt>所属分类：</dt>
            <dd>
               <%=classnames %>
             </dd>
         </dl>
 
        <dl>
            <dt>栏目名称：</dt>
            <dd>
                <input name="ClassName" id="ClassName" class="tinput"  type="text"   value="<%= fycms.HTMLCode(ClassName) %>" size="35" /> 
			    支持HTML语法
				<input name="ClassID" type="hidden" id="ClassID" value="<%= ClassID %>" readonly>
				<input name="rootid" type="hidden" id="rootid" value="<%= Getrootid %>" readonly> 
             </dd>
         </dl>
 

<% If Request("Action")="add" And ClassID<>"0" then %>
   
        <dl>
            <dt>上级栏目目录：</dt>
            <dd>

               <input name="onEnName" class="tinput"  type="text"  id="onEnName" value="<%= EnName %>" size="35" />
       <font color=red>注意:前面不能带 / 符号</font>
             </dd>
         </dl>
 <% end if %>
        <dl>
            <dt>栏目目录：</dt>
            <dd>
               <input name="EnName" class="Ainput"  type="text"  id="EnName" value="<%=EnName%>"  disabled size="35" />
 		<% If Request("Action")="add" then %><label for="IFPinYin">
        <input  id="IFPinYin" value="1" type="checkbox"  name="IFPinYin" checked="checked" onClick="IFPinYins()" />
          栏目拼音</label>
     <font color="red">英文名称必须是字母,数字,确认后不能修改</font>
	<%Else %>
	 

	 <label for="EditEname">
        <input  id="EditEname" value="1" type="checkbox"  name="EditEname" onClick="EditEnames()" />
          修改</label>
	 
	 <% end if %>
             </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>
                <input  name="FolderTemplate"  id="FolderTemplate" type="text" class="Ainput"  size="35"  value="<%= FolderTemplate %>" />
 <input id="PicUrls3" class="btn " onClick="javascript:stemp('<%=fycms.actsys&fycms.adminurl%>/include/TempLate/Select.asp?ShowPath=<%=fycms.ThisTheme%>&iname=FolderTemplate');" name="button" type="button"   value="选择模板">

             </dd>
         </dl>
 
        <dl>
            <dt>内容页预设模板地址：</dt>
            <dd>
               <input name="ConTentTemplate" id="ConTentTemplate" type="text" class="Ainput"  size="35" value="<%= ConTentTemplate %>" />
 <input id="PicUrls4" class="btn " onClick="javascript:stemp('<%=fycms.actsys&fycms.adminurl%>/include/TempLate/Select.asp?ShowPath=<%=fycms.ThisTheme%>&iname=ConTentTemplate');" name="button" type="button"   value="选择模板">
             </dd>
         </dl>
 
        <dl>
            <dt>内容生成规则：</dt>
            <dd>
               <input name="FilePathName" type="text" class="Ainput"  id="FilePathName" value="<%= FilePathName %>" size="50">
 <A   href="http://www.fycms.com/A7d6daec085090b2c22d25edb847b3ef3.html"  target=_blank>帮助</A>
             </dd>
         </dl>
 
        <dl>
            <dt>排列权重：</dt>
            <dd>
               <input name="OrderID" type="text" class="Ainput"  value="<%= OrderID %>" />
             </dd>
         </dl>
 
        <dl>
            <dt>内容模型：</dt>
            <dd>
               	  <select name="ModeID" id="ModeID">
          <%=AF.ACT_L_Mode(CInt(ModeID))%>
        </select>
	  <input type="button" name="Submit6" class="btn " value="管理系统模型" onClick="window.open('../Mode/fy.MX.asp');">
             </dd>
         </dl>
 
        <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>栏目是否生成：</dt>
            <dd>
                 <label for=classmake1>
        <input  type=radio  value=1 <%If classmake = 1 then echo("Checked ")  %> name=classmake id=classmake1>
        静态</label>
        <label for=classmake2>
        <input type=radio  <%If classmake = 2 then echo("Checked ")  %> value=2 name=classmake id=classmake2>
        伪静态</label>   
        <label for=classmake3>
        <input type=radio  <%If classmake = 3 then echo("Checked ")  %> value=3 name=classmake id=classmake3>
       动态</label>  
             </dd>
         </dl>
 
        <dl>
            <dt>是否在循环栏目标签中显示：</dt>
            <dd>
                 <label for=labelfor1>
        <input  type=radio  value=1 <%If labelfor = 1 then echo("Checked ")  %> name=labelfor id=labelfor1>
        &nbsp;&nbsp;是&nbsp;&nbsp;</label>
        <label for=labelfor2>
        <input type=radio  <%If labelfor = 0 then echo("Checked ")  %> value=0 name=labelfor id=labelfor2>
        &nbsp;&nbsp;否&nbsp;&nbsp;</label>   
             </dd>
         </dl>
 
        <dl>
            <dt>栏目类型：</dt>
            <dd>
               <label for=ChangesLink1>
        <input onClick=ClassSetting(1) type="radio"   <%If ActLink = "1" then echo("Checked ")  %>  value=1 name="ActLink" id=ChangesLink1>
        &nbsp;&nbsp;系统栏目&nbsp;&nbsp;</label>
        <label for=ChangesLink2>
        <input onClick=ClassSetting(2) type="radio"  <%If ActLink = "2"  then echo("Checked ")  %>  value=2 name="ActLink" id=ChangesLink2>
        &nbsp;&nbsp;外部链接&nbsp;&nbsp;</label> 
        
         <label for=ChangesLink3>
        <input onClick=ClassSetting(3) type="radio"   <%If ActLink = "3"  then echo("Checked ")  %>  value=3 name="ActLink" id=ChangesLink3>
        &nbsp;&nbsp;单页面&nbsp;&nbsp;</label> 
             </dd>
         </dl>
 
        <dl id=ClassSetting3>
            <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 id=ClassSetting1>
            <dt>转向链接URL：</dt>
            <dd>
               <input name="LinkUrl" type="text" class="Ainput" value="<%= makehtmlname %>"  size="45" />
             </dd>
         </dl>
 
        <dl>
            <dt>栏目首页文件：</dt>
            <dd>
               <input name="Extension" type="text" class="Ainput"  id="Extension" value="<%= CMS_Extension %>" size="10"> 
             <select name="select" onChange="document.Article.Extension.value=this.value">
			 <option value='index.html'>index.html</option>

			 <% IF Request("Action") = "edit" Then %>
			 <option value='<%= CMS_Extension %>' selected><%= CMS_Extension %></option>
			 <% end if  %>
            </select>
           
		   (只能选择index.html或者为空,默认不填写,路径后面不带文件名  如 www.fycms.com/anli/)
             </dd>
         </dl>
 
        <dl  id=ClassSetting4>
            <dt>栏目是否允许投稿：</dt>
            <dd>
                <label for=tg1>
        <input type=radio  value=0 name=tg id=tg1 <% if tg = 0 then echo("Checked") %>>
        &nbsp;&nbsp;否&nbsp;&nbsp;</label>
        <label for=tg2>
        <input type=radio  value=1 name=tg id=tg2 <% if tg = 1 then echo("Checked") %>>
        &nbsp;&nbsp;是&nbsp;&nbsp;</label> 
             </dd>
         </dl>
 
        <dl id=ClassSetting7>
            <dt>允许此栏目下投稿的会员组：</dt>
            <dd>
               <%= fycms.GetGroup_CheckBox("TGGroupID",TGGroupID,5)  %>
             </dd>
         </dl>
 
        <dl id=ClassSetting5>
            <dt>栏目META关键字：</dt>
            <dd>
               <textarea name="ClassKeywords" cols="50"  rows="5" id="ClassKeywords"><%= ClassKeywords %></textarea> 
             </dd>
         </dl>
 
        <dl  id=ClassSetting6>
            <dt>栏目META描述：</dt>
            <dd>
               <textarea name="ClassDescription" cols="50" rows="5" id="ClassDescription"><%= ClassDescription %></textarea>
             </dd>
         </dl>
 
        <dl>
            <dt>权限设置：</dt>
            <dd>

                <label for="ClassPurview1">
    <input name='ClassPurview' id='ClassPurview1' type='radio' <% if  ClassPurview="0" then response.Write "checked=""checked""" %> value='0'  />
      开放栏目（任何人（包括游客）可以浏览和查看此栏目下的信息）</label><br />
      <label for="ClassPurview2"><input name='ClassPurview' id='ClassPurview2' <% if  ClassPurview="1" then response.Write "checked=""checked""" %>  type='radio' value='1' />
      半开放栏目 （任何人（包括游客）都可以浏览。游客不可查看，其他会员根据会员组的栏目权限设置决定是否可以查看,<font color="green">在下面设置相应的会员组权限</font>）</label><br />
     <label for="ClassPurview3"> <input name='ClassPurview' id='ClassPurview3' <% if  ClassPurview="2" then response.Write "checked=""checked""" %>  type='radio' value='2' />
      认证栏目  游客不能浏览和查看，其他会员根据会员组的栏目权限设置决定是否可以浏览和查看,<font color="green">在下面设置相应的会员组权限</font>）</label><br />
      <table border='0' width='90%'>
        <tr>
          <td  class="tl"><%= fycms.GetGroup_CheckBox("ClassArrGroupID",ClassArrGroupID,5)  %></td>
        </tr>
      </table>

             </dd>
         </dl>
 
        <dl>
            <dt>阅读点数：</dt>
            <dd>

               <input  name='ClassReadPoint' type='text' id='ClassReadPoint'  value='<%=ClassReadPoint  %>' size='6' class='Ainput' />
      免费阅读请设为 &quot;<font color="red">0</font>&quot;，否则有权限的会员阅读此文章时将消耗相应点数，游客将无法阅读此文章 

   </dd>
         </dl>
  


 <dl>
            <dt>重复收费：</dt>
            <dd>
     <label for="ClassChargeType1">
     <input name='ClassChargeType'  id='ClassChargeType1' type='radio' value='0' <% if  ClassChargeType="0" then response.Write "checked=""checked""" %>  />
      不重复收费(如果需扣点数文章，建议使用)</label><br />
       <label for="ClassChargeType2"><input name='ClassChargeType' id='ClassChargeType2' <% if  ClassChargeType="1" then response.Write "checked=""checked""" %> type='radio' value='1' />
      距离上次收费时间
      <input name='ClassPitchTime' type='text' class='Ainput' value='<%= ClassPitchTime %>' size='8' maxlength='8'  />
      小时后重新收费</label><br />
 
    
      <label for="ClassChargeType6"><input name='ClassChargeType' type='radio' <% if  ClassChargeType="2" then response.Write "checked=""checked""" %>  id='ClassChargeType6'  value='2' />
      每阅读一页次就重复收费一次（建议不要使用,多页文章将扣多次点数）</label>



             </dd>
         </dl>
 
        <dl>
            <dt>分成比例：</dt>
            <dd>
               <input name='ClassDividePercent' type='text' id='ClassDividePercent'  value='<%= ClassDividePercent %>' size='6' class='Ainput' />
      % 　如果比例大于0，则将按比例把向阅读者收取的点数支付给投稿者 
             </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';
		ClassSetting3.style.display='';
		ClassSetting5.style.display='';
		ClassSetting6.style.display='';
		ClassSetting7.style.display='none';
 	}
	else if (n == "2"){
		ClassSetting1.style.display='';
  		ClassSetting3.style.display='none';
  		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';
		ClassSetting3.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;
   if (form.ClassName.value=='')
    { alert("请输入栏目的分类名称!");   
	  form.ClassName.focus();    
	   return false;
    }
	 
			<%
 


echo checkeditpost(888,5)
 
  %>
 	    form.submit();
        return true;
}
 	</script>
<script language="javascript">ClassSetting(<%=""""&ActLink&""""%>);</script>
	<% If Request("Action")="add" then %>
		<script language="javascript">IFPinYins();</script>
		<% End if%>
</body>
</html>
