<!--#include file="../fy.Function.asp"-->
<!--#include file="../include/fy.F.asp"-->
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>评论管理</title>
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/content.css">
<SCRIPT language=javascript>
function SelectAll(){
			  for(var i=0;i<document.myform.ClassID.length;i++){
				document.myform.ClassID.options[i].selected=true;}
			}
			function UnSelectAll(){
			  for(var i=0;i<document.myform.ClassID.length;i++){
				document.myform.ClassID.options[i].selected=false;}
			}				
</SCRIPT><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/lhg/lhgdialog.min.js'></script>
</head>
<body>
<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>
		<a href="fy.Setclass.asp" class="btn btn_primary">栏目批量设置</a>
    </div>
<% 
		Dim Action,ModeID,ID
		ModeID = ChkNumeric(Request("ModeID"))
		if ModeID=0 or ModeID="" Then ModeID=1
			If Not fycms.fycms_QXYZ(ModeID,"","") Then   Call fycms.Alert("对不起，您没有"&fycms.ACT_C(ModeID,1)&"系该项操作权限！","")

		ID=Trim(Request("ID"))
		Action = Request("Action")
		ConnectionDatabase
		Select Case Action
			Case "saveset"
				Call saveset
			Case Else
				Call MainArticle()
		End Select
	function Classmake(Cname)
		 Dim FolderRS
		 Set FolderRS = Conn.Execute("Select * from Class_fy where rootid=0   Order by Orderid desc,ID desc")
		 IF FolderRS.Bof And FolderRS.Eof Then
		 echo("还没有添加任何栏目!")
		 End IF
		 do while Not FolderRS.Eof
			Classmake=Classmake&"<option value="&FolderRS("ClassID")&" "&Cname&"="&FolderRS("ClassID")&">"& FolderRS("ClassName") & "</option>"
			 Classmake=Classmake&(GetChildClassList(FolderRS("ClassID"),"",Cname))
		  FolderRS.MoveNext
		  loop
	 end function
	 Function GetChildClassList(ClassID,Str,Cname)
	       Dim Sql,RsTempObj,TempImageStr,ImageStr,CheckStr
	        TempImageStr = "&nbsp;└"
	        Sql = "Select * from Class_fy where rootid=" & ClassID & "  "
	        ImageStr = Str & "&nbsp;└"
	        Set RsTempObj = Conn.Execute(Sql)
	            do while Not RsTempObj.Eof
					   GetChildClassList = GetChildClassList  & "<option value="&RsTempObj("ClassID")&" "&Cname&"="&RsTempObj("ClassID")&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"
					  GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr,Cname)
		         RsTempObj.MoveNext
	           loop
	       Set RsTempObj = Nothing
	 End Function 
	 function saveset()
	 dim id,idarr,rs,k

	 IDArr=Split(Replace(Request.form("ClassID")," ",""),",")
 		   	 For K=0 To Ubound(IDArr)
					  Set RS=Server.CreateObject("ADODB.RECORDSET")
  
  				  RS.Open "Select * From class_fy  Where  classid=" & ChkNumeric(IDArr(K)) & "", conn, 1, 3
   			  If Not RS.EOF Then
			   
 				  If ChkNumeric(Request.form("ACT_labelfor"))=1  Then RS("labelfor") = ChkNumeric(Request.form("labelfor"))
				   RS("ClassPicUrl") = Request.form("ClassPicUrl")
				  If ChkNumeric(Request.form("ACT_FolderTemplate"))=1  Then RS("FolderTemplate") = Request.form("FolderTemplate")
				  If ChkNumeric(Request.form("ACT_ConTentTemplate"))=1  Then RS("ConTentTemplate") = Request.form("ConTentTemplate")
				  If ChkNumeric(Request.form("ACT_FilePathName"))=1  Then RS("FilePathName") = Request.form("FilePathName")
				  If ChkNumeric(Request.form("ACT_OrderID"))=1  Then RS("OrderID") = ChkNumeric(Request.form("OrderID"))
				  If ChkNumeric(Request.form("fy_ModeID"))=1  Then RS("ModeID") = ChkNumeric(Request.form("ModeID"))
				  If ChkNumeric(Request.form("ACT_ismenu"))=1  Then RS("ismenu") = ChkNumeric(Request.form("ismenu"))
				  If ChkNumeric(Request.form("ACT_classmake"))=1  Then RS("classmake") = ChkNumeric(Request.form("classmake"))
				  If ChkNumeric(Request.form("ACT_fyLink"))=1  Then RS("ActLink") = ChkNumeric(Request.form("ActLink"))
				  If ChkNumeric(Request.form("ACT_Extension"))=1  Then RS("Extension") = Request.form("Extension")
				  If ChkNumeric(Request.form("ACT_tg"))=1  Then RS("tg") = Request.form("tg")
				  If ChkNumeric(Request.form("ACT_TGGroupID"))=1  Then RS("TGGroupID") = Request.form("TGGroupID")
				  If ChkNumeric(Request.form("ACT_ClassPurview"))=1  Then RS("ClassPurview") = Request.form("ClassPurview"):RS("ClassArrGroupID") =Request.form("ClassArrGroupID"):RS("ClassReadPoint") =Request.form("ClassReadPoint")
				  If ChkNumeric(Request.form("ACT_ClassChargeType"))=1  Then RS("ClassChargeType") = Request.form("ClassChargeType"):RS("ClassDividePercent") =Request.form("ClassDividePercent")
				   RS.Update
				 	 
			 End If
			  RS.Close
			   Next 
		   Set RS = Nothing
		   conn.Close:Set conn = Nothing
		   Call fycms.ActErr("批量设置成功","","")
 			response.end
		 End Function
 Function  MainArticle()%>

 <TABLE class="table" style="MARGIN-TOP: 10px" cellSpacing=1 width="98%" align=center border=0>
  <FORM name=myform action=?Action=saveset&ModeID=<%=ModeID%> method=post>
    <TBODY>
    
    <TBODY>
      <TR class=tdbg id=choose2 <%if ID<>"" then echo " style='display:none'"%>>
        <TD vAlign=top width=200 rowSpan=101><FONT color=red>提示：</FONT>可以按住“Shift”<BR>
          或“Ctrl”键进行多个栏目的选择<BR>
          <SELECT style="WIDTH: 200px; HEIGHT: 380px" multiple size=2 name=ClassID>
            <% 	 echo Classmake("ClassID")
		%>
          </SELECT>
          <DIV align=center>
            <INPUT class="btn" onclick=SelectAll() type=button value=选定所有栏目 name=Submit>
            <BR>
            <INPUT class="btn" onclick=UnSelectAll() type=button value=取消选定栏目 name=Submit>
          </DIV></TD>
      </TR>
   
      <tr>
	  <TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ClassPicUrl></TD>
      <td height="25" align="right"  class="tl"><strong>栏目缩略图：</strong></td>
      <td height="25"  class="tl"><input name="ClassPicUrl" id="ClassPicUrl" type="text" class="Ainput"  value="" size="35">
   <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="点击上传图片">

 
	   </td>
    </tr>



 

    <tr>
	<TD  align=middle height=25><INPUT  name=ACT_FolderTemplate type=checkbox id="ACT_FolderTemplate" value=1></TD>
      <td align="right" class="tl"><strong>栏目模板地址：</strong></td>
      <td class="tl">
	  <input  name="FolderTemplate" id="FolderTemplate"  type="text" class="Ainput"  size="35"  value="栏目首页.html" />
 		  <input id="PicUrls34" class="btn" onClick="javascript:stemp('<%=fycms.actsys&fycms.adminurl%>/include/TempLate/Select.asp?ShowPath=<%=fycms.ThisTheme%>&iname=FolderTemplate');" name="button" type="button"   value="选择模板">
	  </td>
    </tr>
    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ConTentTemplate></TD>
      <td align="right" class="tl"><strong>内容页预设模板地址：</strong></td>
      <td class="tl"><input name="ConTentTemplate" id="ConTentTemplate" type="text" class="Ainput"  size="35" value="内容详细页.html" />
 		  <input id="PicUrls34" class="btn" onClick="javascript:stemp('<%=fycms.actsys&fycms.adminurl%>/include/TempLate/Select.asp?ShowPath=<%=fycms.ThisTheme%>&iname=ConTentTemplate');" name="button" type="button"   value="选择模板">
		 </td>
    </tr>

    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_FilePathName></TD>
       <td height="25" align="right" class="tl" ><strong>内容生成规则：</strong></td>
      <td height="25"  class="tl"><input name="FilePathName" type="text" class="Ainput"  id="FilePathName" value="{enname}/{id}" size="50">
	 
	  全部小写</td>
    </tr>

    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_OrderID></TD>
      <td align="right" class="tl"><strong>排列权重：</strong></td>
      <td class="tl"><input name="OrderID" type="text" class="Ainput"  value="10" />
	  </td>
    </tr>

 



    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=fy_ModeID></TD>
      <td align="right" class="tl"><strong>内容模型：</strong></td>
      <td class="tl">
	  <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');">
	  
	  </td>
    </tr>
	
	
    <tr><TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ismenu></TD>
      <td align="right" class="tl"><strong>在导航栏显示：</strong></td>
      <td class="tl">
        <label for=ismenu1>
        <input  type=radio  value=1 Checked  name=ismenu id=ismenu1>
        &nbsp;&nbsp;是&nbsp;&nbsp;</label>
        <label for=ismenu2>
        <input type=radio   value=0 name=ismenu id=ismenu2>
        &nbsp;&nbsp;否&nbsp;&nbsp;</label>   
		 </td>
    </tr>

    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_classmake></TD>
      <td align="right" class="tl"><strong>栏目是否生成：</strong></td>
      <td class="tl">
        <label for=classmake1>
        <input  type=radio  value=1  name=classmake id=classmake1>
        静态</label>
        <label for=classmake2>
        <input type=radio   value=2 name=classmake id=classmake2>
        伪静态</label>   
        <label for=classmake3>
        <input type=radio  Checked  value=3 name=classmake id=classmake3>
       动态</label>   
		 </td>
    </tr>





    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_labelfor></TD>
      <td align="right" class="tl"><strong><font color=red>是否在循环栏目标签中显示：</font></strong></td>
      <td class="tl">
        <label for=labelfor1>
        <input  type=radio  value=1 Checked  name=labelfor id=labelfor1>
        &nbsp;&nbsp;是&nbsp;&nbsp;</label>
        <label for=labelfor2>
        <input type=radio   value=0 name=labelfor id=labelfor2>
        &nbsp;&nbsp;否&nbsp;&nbsp;</label>   
		 </td>
    </tr>

    <tr>
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_fyLink></TD>
      <td align="right" class="tl"><strong>栏目类型：</strong></td>
      <td class="tl">
        <label for=ChangesLink1>
        <input onClick=ClassSetting(1) type=radio   Checked   value=1 name=ActLink id=ChangesLink1>
        &nbsp;&nbsp;系统栏目&nbsp;&nbsp;</label>
        <label for=ChangesLink2>
        <input onClick=ClassSetting(2) type=radio    value=2 name=ActLink id=ChangesLink2>
        &nbsp;&nbsp;外部链接&nbsp;&nbsp;</label> 
        
         <label for=ChangesLink3>
        <input onClick=ClassSetting(3) type=radio     value=3 name=ActLink id=ChangesLink3>
        &nbsp;&nbsp;单页面&nbsp;&nbsp;</label> 
 </td>
    </tr>
    <tr >
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_Extension></TD>
      <td align="right" class="tl"><strong>栏目首页文件：</strong></td>
      <td class="tl"><input name="Extension" type="text" class="Ainput"  id="Extension" value="index.html" size="10"> 
             <select name="select" onChange="document.Article.Extension.value=this.value">
			 <option value='index.html'>index.html</option>

			 
            </select>
       
		   (只能选择index.html或者为空,默认不填写,路径后面不带文件名  如 www.fycms.com/anli/)</td>
    </tr>

    <tr id=ClassSetting4  >
	<TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_tg></TD>
      <td align="right" class="tl"><strong>栏目是否允许投稿：</strong></td>
      <td class="tl">
        <label for=tg1>
        <input type=radio  value=0 name=tg id=tg1 >
        &nbsp;&nbsp;否&nbsp;&nbsp;</label>
        <label for=tg2>
        <input type=radio  value=1 name=tg id=tg2 Checked>
        &nbsp;&nbsp;是&nbsp;&nbsp;</label>  
	 	</td>
    </tr>

   <tr id=ClassSetting7>
   <TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_TGGroupID></TD>
      <td align="right" class="tl"><STRONG>允许此栏目下投稿的会员组：</STRONG></td>
      <td class="tl"><table width="100%" align="center" border="0"><TR><TD class="tl" WIDTH="20%"><input id=TGGroupID1 type="checkbox" name="TGGroupID" value="1"><label for=TGGroupID1>邮件验证会员</label>&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD class="tl" WIDTH="20%"><input id=TGGroupID2 type="checkbox" name="TGGroupID" value="2"><label for=TGGroupID2>后台验证会员</label>&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD class="tl" WIDTH="20%"><input id=TGGroupID3 type="checkbox" name="TGGroupID" value="3"><label for=TGGroupID3>注册会员</label>&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>
	  </td>
    </tr>
    
    
    



  
    


    
  <tr  >
  <TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ClassPurview></TD>
    <td align='right'    class="tl">权限设置：
	 </td>
    <td height='30'  class="tl">
    <label for="ClassPurview1">
    <input name='ClassPurview' id='ClassPurview1' type='radio' checked="checked" value='0'  />
      开放栏目（任何人（包括游客）可以浏览和查看此栏目下的信息）</label><br />
      <label for="ClassPurview2"><input name='ClassPurview' id='ClassPurview2'   type='radio' value='1' />
      半开放栏目 （任何人（包括游客）都可以浏览。游客不可查看，其他会员根据会员组的栏目权限设置决定是否可以查看,<font color="green">在下面设置相应的会员组权限</font>）</label><br />
     <label for="ClassPurview3"> <input name='ClassPurview' id='ClassPurview3'   type='radio' value='2' />
      认证栏目  游客不能浏览和查看，其他会员根据会员组的栏目权限设置决定是否可以浏览和查看,<font color="green">在下面设置相应的会员组权限</font>）</label><br />
      <table border='0' width='90%'>
        <tr>
          <td><table width="100%" align="center" border="0"><TR><TD class="tl" WIDTH="20%"><input id=ClassArrGroupID1 type="checkbox" name="ClassArrGroupID" value="1"><label for=ClassArrGroupID1>邮件验证会员</label>&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD class="tl" WIDTH="20%"><input id=ClassArrGroupID2 type="checkbox" name="ClassArrGroupID" value="2"><label for=ClassArrGroupID2>后台验证会员</label>&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD class="tl" WIDTH="20%"><input id=ClassArrGroupID3 type="checkbox" name="ClassArrGroupID" value="3"><label for=ClassArrGroupID3>注册会员</label>&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE></td>
        </tr>
      </table></td>
  </tr>
  <tr  >
  <TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ClassReadPoint></TD>
    <td align='right'   height="30" class="tl"><strong>阅读点数： </strong></td>
    <td height='30'  class="tl">&nbsp;
        <input  name='ClassReadPoint' type='text' id='ClassReadPoint'  value='0' size='6' class='Ainput' />
      免费阅读请设为 &quot;<font color="red">0</font>&quot;，否则有权限的会员阅读此文章时将消耗相应点数，游客将无法阅读此文章 </td>
  </tr>
  <tr >
  <TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ClassChargeType></TD>
    <td align='right'    height="30" class="tl"><strong>重复收费：</strong><br>
只有当上述计费才有效</td>
    <td height='30' class="tl" >
     <label for="ClassChargeType1">
     <input name='ClassChargeType'  id='ClassChargeType1' type='radio' value='0' checked="checked"  />
      不重复收费(如果需扣点数文章，建议使用)</label><br />
       <label for="ClassChargeType2"><input name='ClassChargeType' id='ClassChargeType2'  type='radio' value='1' />
      距离上次收费时间
      <input name='ClassPitchTime' type='text' class='Ainput' value='0' size='8' maxlength='8'  />
      小时后重新收费</label><br />
 
    
      <label for="ClassChargeType6"><input name='ClassChargeType' type='radio'   id='ClassChargeType6'  value='2' />
      每阅读一页次就重复收费一次（建议不要使用,多页文章将扣多次点数）</label> </td>
  </tr>
  <tr >
  <TD  align=middle height=25><INPUT type=checkbox value=1  name=ACT_ClassDividePercent></TD>
    <td align='right'   height="30" class="tl"><strong>分成比例： </strong></td>
    <td height='30'  class="tl">&nbsp;
        <input name='ClassDividePercent' type='text' id='ClassDividePercent'  value='0' size='6' class='Ainput' />
      % 　如果比例大于0，则将按比例把向阅读者收取的点数支付给投稿者 </td>
  </tr>
     




























      <TR class=tdbg>
        <TD colSpan=3 height=30><INPUT class="btn btn_primary" type=submit value="  保存  " name=button1>
          &nbsp;
          <INPUT class="btn" type=reset  value="  重置  " name=button2>
        </TD>
      </TR>
  </FORM>
</TABLE>
<% End  Function %>
<script language="JavaScript" type="text/javascript">
		 	
		function SelectClass()
		{
			var ReturnValue='',TempArray=new Array();
			ReturnValue = OpenWindow('fy.ClassID.asp',400,300,window);
			if (ReturnValue.indexOf('***')!=-1)
			{
				TempArray = ReturnValue.split('***');
				//document.all.ClassIDs.value=TempArray[0]
				//document.all.ClassNames.value=TempArray[1]
			}
		}		
		 	
</script>
</div>
</BODY>
</HTML>
