<%@ Page Language="C#"  MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Admin_CsCategory" Codebehind="KS.Category.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<asp:Panel ID="ClassList" runat="server" Width="100%">
<script type="text/javascript">
    function ExtSub(ID,event,active) {//阻止冒泡调用parent
        var e = (event) ? event : window.event;
        if (window.event) {//IE
            e.cancelBubble = true;
        } else { //FF
            e.stopPropagation();
        }
        if (jQuery('#C'+ID).attr('class')=="tree_Close")
        {       
            jQuery('#C'+ID).attr('class','tree_Open');
            if ($(".CTable").find("tr[attr*=',"+ID+",']").length>0){
                $(".CTable").find("tr[attr*=',"+ID+",']").show();
            }else{
                jQuery('#ajaxmsg',window.parent.document).toggle();
                jQuery.ajax({
                    type: "POST",
                    url: "KS.Category.aspx",
                    data: "parentid="+ID+"&action=ExtSub"+"&active="+active,
                    success: function (data) {
                        jQuery('#ajaxmsg',window.parent.document).toggle();
                        jQuery("#sub"+ID).after(data);
                        //jQuery("#sub"+ID).html(data);
                    }
                });
            }
        }
        else{
            $(".CTable").find("tr[attr*=',"+ID+",']").hide();
            jQuery('#C'+ID).attr('class','tree_Close');
        }
    }
    function moveClass(id){
        top.openWin("移动栏目", "System/KS.Category.aspx?action=moveClass&classid=" + id, true, 600, 250);
    }
</script>
     <div class="content-area mt20">
           	<div class="myTitle">
                    <div class="fr headOperation">
                     <li class="fl"><asp:LinkButton ID="LinkButton3" runat="server" OnClick="lbtaddmodel_Click" CssClass="button button_on">添加分类</asp:LinkButton></li>
                     <li class="fl"><a href="?action=OrderOne" class="button">分类排序</a></li>
                 	 <li class="fl"><asp:LinkButton ToolTip="修正栏目排序" ID="LinkButton6" runat="server" OnClick="LinkButton6_Click" CssClass="button">修正排序</asp:LinkButton></li>
                     <li class="fl"><a href="KS.CategoryMerge.aspx" class="button">分类合并</a></li>
                     <li class="fl"><a href="KS.CatagoryBacth.aspx" class="button">批量设置</a></li>
                    </div>
                   <div class="tabs_header tabs_header-width longTabs">
                <ul class="tabs">
                    <li <%=active==""?"class='active'":"" %>  ><a href="KS.Category.aspx?action=<%=KSCMS.S("action") %>"><span>全部分类</span></a></li>
                    <% if (BaseFun.CheckModulePower("edu")) {%>
                    <li <%=active=="1"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=1&action=<%=KSCMS.S("action") %>"><span>点播</span></a></li>
                    <li <%=active=="2"?"class='active'":"" %> ><a href="KS.Category.aspx?active=2&action=<%=KSCMS.S("action") %>"><span>直播</span></a></li>
                    <li <%=active=="3"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=3&action=<%=KSCMS.S("action") %>"><span>面授</span></a></li>
                    <li <%=active=="4"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=4&action=<%=KSCMS.S("action") %>"><span>专栏</span></a></li>
                    <% } %>
                     <% if (BaseFun.CheckModulePower("classroom")) {%><li <%=active=="5"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=5&action=<%=KSCMS.S("action") %>"><span>班级</span></a></li><% } %>
                     <% if (BaseFun.CheckModulePower("exam")) {%><li <%=active=="6"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=6&action=<%=KSCMS.S("action") %>"><span>考试</span></a></li><% } %>
                     <% if (BaseFun.CheckModulePower("checkpackage")) {%> <li <%=active=="7"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=7&action=<%=KSCMS.S("action") %>"><span>练习营</span></a></li><% } %>
                     <% if (BaseFun.CheckModulePower("activity")) {%> <li <%=active=="8"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=8&action=<%=KSCMS.S("action") %>"><span>活动</span></a></li><% } %>
                     <% if (BaseFun.CheckModulePower("teacher")) {%> <li <%=active=="9"?"class='active'":"" %>  ><a href="KS.Category.aspx?active=9&action=<%=KSCMS.S("action") %>"><span>名师</span></a></li><% } %>
                  
                </ul>
             </div> 
           	 </div>
    
          <asp:Repeater ID="list" runat="server">
              <HeaderTemplate>
               <table width="99%" cellpadding="0" cellspacing="0" class="CTable">
               <tr class="CTitle">
                   <th scope="col" width="30"><input type="checkbox" name="chkall" onclick="CheckBox(this.checked);" for="chkall"/></th>
    
                     <th width="35">栏目ID</th>
                   <th scope="col" width="300px" style="text-align:left">名称(<a class="tips" style="font-weight:normal" href="KS.Category.aspx?action=showall&active=<%=KSCMS.S("active") %>">展开</a>)</th>
                   <th scope="col" width="300px">是否前台显示</th>
                   <th scope="col">序号</th>
                  <th scope="col" width="35">编辑</th>
                   <th scope="col" width="35">删除</th>
                   <%if (KSCMS.S("active") == "6"){ %>
                    <th scope="col" width="35">查看订单</th>
                    <th scope="col" width="35">查看权限</th>
                   <%} %>
                </tr>
              </HeaderTemplate>
              <ItemTemplate>
              <tr id='sub<%#Eval("classid") %>'  onmouseover="jQuery('#a<%# Eval("classid") %>').show();this.className='CtrMouseOver'" onmouseout="jQuery('#a<%# Eval("classid") %>').hide();this.className='CtrMouseOut'" onclick="chk(this)">
                 <td class="Ctd" style="text-align:center;width:35px;"><input type="checkbox" name="ids" value='<%#Eval("classID")%>' /></td>
                   <td class="Ctd" style="height:30px;text-align:center;"><%# Eval("classid") %></td>
                  <td class="Ctd" style="height:30px;width:550px;">
                 <%if (KSCMS.S("Action") != "showall")
                   { %>
                 <a href="javascript:void(0)" onclick='ExtSub("<%# Eval("ClassID") %>",event,<%=KSCMS.S("active") %>);' style='text-decoration:none'><%# getClassName(Utils.StrToInt(Eval("ClassID")),Eval("Classname", "{0}"), Utils.StrToInt(Eval("child")), Utils.StrToInt(Eval("NextID")), Utils.StrToInt(Eval("depth", "{0}")), 1)%></a><%}
                   else
                   { %><%# getClassName(Utils.StrToInt(Eval("ClassID")),Eval("Classname", "{0}"), Utils.StrToInt(Eval("child")), Utils.StrToInt(Eval("NextID")), Utils.StrToInt(Eval("depth", "{0}")), 1)%><%} %>
                   
                   <span id='a<%# Eval("classid") %>' style="display:none;padding-left:20px">

                    <a style="color:#999" href="KS.Category.aspx?action=add&parentid=<%# Eval("classid") %>">添加子分类</a>
                    <a href="javascript:;" onclick="moveClass(<%# Eval("ClassID") %>)"  style="color:#999">移动</a>
                    <a href="<%# GetCategoryViewUrl(Convert.ToString(Eval("classename")),Utils.StrToInt(Eval("classid"))) %>" target="_blank">预览</a>
                   </span>
    
                   </td>
                  <td class="Ctd" align="center"><%# Eval("IsHide").ToString()=="1"?"是":"否"  %></td>
                 <td class="Ctd" align="center" style="width:35px;"><%# Container.ItemIndex + 1 + (CurrPage - 1) * PageSize%></td>
                 <td class="Ctd" align="center">
                  <a href="KS.Category.aspx?action=edit&classid=<%# Eval("classid") %>" class="edit">编辑</a>
                 
                 </td>
                   <td class="Ctd" align="center">
                        <a href="KS.Category.aspx?Action=del&Ids=<%# Eval("classid") %>" onclick="return(confirm('删除分类，同时删除该分类下的问答，此操作不可逆，确定删除分类吗?'));"  class="delete">删除</a>        
                   </td>
                   <%if (KSCMS.S("active") == "6"){ %>
                     <td class="Ctd" align="center">
                        <a href="KS.Category.aspx?Action=Orderdetails&active=<%=KSCMS.S("active")%>&classid=<%# Eval("classid") %>"   class="plicon" title="查看订单详情"></a>        
                   </td>
                      <td class="Ctd" align="center">
                        <a href="KS.Category.aspx?Action=Jurisdiction&active=<%=KSCMS.S("active")%>&classid=<%# Eval("classid") %>"   class="plicon" title="查看权限详情"></a>        
                   </td>
                   <%} %>
                </tr>        
              </ItemTemplate>
              <FooterTemplate>
                   <tr style="display:<%# bool.Parse((list.Items.Count==0).ToString())?"":"none"%>">
                    <td class="Ctd" style="text-align:center" colspan="5">
                     <asp:LinkButton ID="LinkButton1" runat="server" OnClick="lbtaddmodel_Click"> 还没有添加任何分类，点此添加分类&raquo;</asp:LinkButton>
                    </td>
                   </tr> 
              </table>
              </FooterTemplate>
             </asp:Repeater>
           <div class="listedit">
      	     <!-- <input type='checkbox' name='chkall' id='chkall' onClick='CheckAll(this.form);'/><label for="chkall">全部选中</label>-->
             &nbsp; &nbsp; &nbsp; <asp:LinkButton ID="LinkButton2" CssClass="button" runat="server" OnClick="BtnDelete_Click" OnClientClick="if (GetIDS('del')){return true}else{return false}"><b></b>删除</asp:LinkButton>
          </div>
          <KS:Page ID="Page1" runat="server" />
        </asp:Panel> 
            
            <asp:Panel ID="ClassAdd" runat="server" Width="100%">
            <script>
                function setFileFileds(num){    
                    for(var i=1,str="";i<=20;i++){
                        jQuery("#define" + i).css("display","none");
                    }
                    for(var i=1,str="";i<=num;i++){	jQuery("#define" + i).css("display","");
                    }
                }
    
                function CheckAddMode() {
                    if (jQuery("#AddType")[0].checked == true) {
                        jQuery("#AddOne").hide();
                        jQuery("#AddEOne").hide();
                        jQuery("#AddMore").show();
                    } else {
                        jQuery("#AddOne").show();
                        jQuery("#AddEOne").show();
                        jQuery("#AddMore").hide();
                    }
                }
    
                function CheckForm() {
                    if (jQuery('#<%=this.ClassName.ClientID %>').val() == '' && jQuery("#AddType")[0].checked == false) {
                        KesionJS.Alert('请输入分类名称！', "jQuery('#<%=this.ClassName.ClientID %>').focus()");
                        return false;
                    } else if (jQuery("#AddType")[0].checked == true && jQuery('#<%=this.TxtMoreClassName.ClientID %>').val() == '') {
                        KesionJS.Alert('请按格式输入分类名称,一行表示一个分类！', "jQuery('#<%=this.TxtMoreClassName.ClientID %>').focus()");
                        return false;
                    }
                }
             function ConvertPinYin(){
              var className=jQuery('#<%=this.ClassName.ClientID %>').val();
              jQuery.get("../../plus/ajaxs.ashx",{a:"convertclassname",classname:className},function(v){
                  jQuery('#<%=this.TxtClassEname.ClientID %>').val(unescape(v));
              });
            }
            </script>
      </div>      
      
        <div class="content-area mt20">    
            <div class="myTitle" style="display:none;"><%=Utils.StrToInt(KSCMS.S("classid"))>0?"修改":"添加"%>网校分类</div>
            <div class="tab-page" id="CsCategoryPanel">
             <script type="text/javascript">
                 var tabPane1 = new WebFXTabPane(document.getElementById("CsCategoryPanel"), 1)
             </script>
                 
             <div class="tab-page" id="tab0">
              <h2 class="tab">基本信息</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage( document.getElementById( "tab0" ) );
                </script>
                
                 <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
                     <tr>
                         <td align="right" class="lefttd" style="width: 145px; height: 37px;"><strong>所属分类：</strong><br>
                         </td>
                         <td class="righttd" style="height: 37px">
                             <asp:DropDownList ID="ParentID" runat="server">
                                 <asp:ListItem Value="0">-无（作为一级分类）-</asp:ListItem>
                             </asp:DropDownList>&nbsp;
                                 <span id="ParentIDMessage" runat="server"></span>
                         </td>
                     </tr>
                     <tr>
                         <td class="lefttd" height="30" align="right"><strong>分类名称：</strong></td>
                         <td class="righttd">
                             <span id="AddOne">
                                 <asp:TextBox CssClass="textbox" ID="ClassName" runat="server"></asp:TextBox>
                                 <span class="redFont">*请输入分类名称 </span>
                             </span>
                             <label style="<%=KSCMS.S("action")=="edit"?"display:none;":"" %>font-weight:bold;color:Green"><input onclick="CheckAddMode()" type="checkbox" name="AddType" id="AddType" value="1" />切换到批量添加模式</label>
                             <div id="AddMore" style="display: none">
                                 <font color="red">录入格式:分类中文名称|分类英文名称,说明每行一个分类</font>
                                 <br />
                                 <asp:TextBox Text="分类名称中文名称1|英文名称1" ID="TxtMoreClassName" runat="server" CssClass="textbox" TextMode="MultiLine" Width="250px" Height="150px"></asp:TextBox>
                             </div>
                         </td>
                     </tr>
                     <tr id="AddEOne">
                         <td class="lefttd" height="30" align="right"><strong>英文名称：</strong></td>
                         <td class="righttd">
                             <span>
                                 <asp:TextBox CssClass="textbox" ID="TxtClassEname" runat="server" onblur="CheckEnglishStr(this,'分类的英文名称')"></asp:TextBox>
                                 <span class="redFont">*只能填写英文和数字的组合,不能带\/：*？“ &lt; &gt; | 等特殊符号</span>
                             </span>

                         </td>
                     </tr>
                     <tr id="IntroArea">
                         <td align="right" class="lefttd" style="height: 50px;">
                             <strong>分类介绍：</strong><br />
                         </td>
                         <td class="righttd" style="height: 50px">
                             <asp:TextBox CssClass="textbox" ID="ClassIntro" runat="server" Rows="2" TextMode="MultiLine" Width="475px" Height="80px"></asp:TextBox>
                             <a class="textarea_min" href="javascript:zoomtextarea(-2,'<%=this.ClassIntro.ClientID %>');"></a>
                             <a class="textarea_max" href="javascript:zoomtextarea(2,'<%=this.ClassIntro.ClientID %>');"></a>
                             <br />
                             <font class='tips'>用于在分类页的介绍信息，支持HTML</font>
                         </td>
                     </tr>
                     <tr>
                         <td height="30" class="lefttd" align="right">
                             <strong>分类图片：</strong></td>
                         <td class="righttd">
                             <asp:TextBox CssClass="textbox" ID="ClassImg" runat="server" Width="480px"></asp:TextBox>&nbsp;<input type="button" class="button" onclick="SelectFiles('<%=this.ClassImg.ClientID %>    ',101);" value="选择图片">
                             <br />
                             <font class='tips'>用于在分类页显示指定的图片</font>
                         </td>
                     </tr>
                    
                       <tr<%=((Utils.GetBusinessVersion().ToLower().IndexOf("exam") != -1)?" style='display:none'":"") %>>
                         <td height="30" class="lefttd" align="right">
                             <strong>应用模块：</strong></td>
                           <td class="righttd">
                               <asp:CheckBoxList ID="ChBoxModuleSwitch" runat="server" RepeatDirection="Horizontal" RepeatColumns="10" RepeatLayout="Flow">
                                   <asp:ListItem Value="1" Selected>点播</asp:ListItem>
                                   <asp:ListItem Value="1" Selected>直播</asp:ListItem>
                                   <asp:ListItem Value="1" Selected>面授 </asp:ListItem>
                                   <asp:ListItem Value="1" Selected>专栏 </asp:ListItem>
                                   <asp:ListItem Value="1" Selected> 班级</asp:ListItem>
                                   <asp:ListItem Value="1" Selected> 考试</asp:ListItem>
                                   <asp:ListItem Value="1" Selected> 训练营</asp:ListItem>
                                   <asp:ListItem Value="1" Selected> 活动</asp:ListItem>
                                   <asp:ListItem Value="1" Selected> 名师</asp:ListItem>
                               </asp:CheckBoxList>
                               <br />
                               <font class='tips'>只有父栏目也启用时，此处设置才有效。</font>
                           </td>
                     </tr>
                     <tr<%=CommonJsonCache.CheckYunAPPHasAllow("plus.ask")?" style='display:none'":" style='display:none'"%>>
                         <td height="30" class="lefttd" align="right"><strong>问答分类：</strong></td>
                         <td class="righttd">
                             <asp:DropDownList ID="DrpClassID" runat="server">
                                 <asp:ListItem Value="0">--选择问题分类--</asp:ListItem>
                             </asp:DropDownList><span class="tips">建议选择最终级分类</span> </td>
                     </tr>
                    <tbody <%=((Utils.GetBusinessVersion().ToLower().IndexOf("edu") == -1)?" style='display:none'":"") %>>
                     <tr>
                         <td align="right" class="lefttd"><strong>WEB版课程分类模板：</strong></td>
                         <td class="righttd" style="height: 30px">
                             <asp:TextBox ID="Template" runat="server" CssClass="textbox" Width="480px"></asp:TextBox>
                             <input type="button" class="button" onmouseover="this.className='button_on';" onmouseout="this.className='button';" value="选择模板..." onclick="SelectTemplate('<%=this.Template.ClientID %>',0);" />
                         </td>
                     </tr>
                     <tr>
                         <td align="right" class="lefttd"><strong>手机版课程分类模板：</strong></td>
                         <td class="righttd" style="height: 30px">
                             <asp:TextBox ID="Template3G" runat="server" CssClass="textbox" Width="480px"></asp:TextBox>
                             <input type="button" class="button" onmouseover="this.className='button_on';" onmouseout="this.className='button';" value="选择模板..." onclick="SelectTemplate('<%=this.Template3G.ClientID %>',1);" />
                         </td>
                     </tr>
                    </tbody>
                     <tr>
                   
                         
                             <td align="right" class="lefttd" height="30" >
                            <strong>是否隐藏：</strong></td>
                        <td class="righttd">
                           <asp:RadioButtonList ID="RdbVerifys" runat="server" Width="150px" RepeatDirection="Horizontal" Height="24px">
                                    <asp:ListItem Value="1" Selected="True">显示</asp:ListItem>
                                    <asp:ListItem Value="0">隐藏</asp:ListItem>
                                </asp:RadioButtonList>
                        </td>
                    
                    </tr>
                     <tr>
                         <td align="right" class="lefttd"></td>
                         <td align="left">
                             <div class="tips">模板为空表示使用系统自带的模板信息，不为空读取自定义模板信息</div>
                         </td>
                     </tr>
              </table>	
            </div>
          
            
            <div class="tab-page" id="seooption">
              <h2 class="tab">SEO选项</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage(document.getElementById("seooption"));
                </script>
                
                 <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
                     <tr>
                         <td height="30" align="right" class="lefttd">
                             <strong>分类Title关键词</strong>：<br />
                             <span class="redFont">针对搜索引擎设置的标题关键词</span></td>
                         <td class="righttd">
                             <asp:TextBox CssClass="textbox" ID="MetaTitle" runat="server" Rows="6"  Width="478px"></asp:TextBox>
                             <div class="tips">TIPS:模板里可以用标签“{$GetSeoTitle}”调用。</div>
                         </td>
                     </tr>
                     <tr>
                         <td height="30" align="right" class="lefttd">
                             <strong>分类META关键词</strong>：<br />
                             <span class="redFont">针对搜索引擎设置的关键词</span></td>
                         <td class="righttd">
                             <asp:TextBox CssClass="textbox" ID="MetaKeyWord" runat="server" Rows="6" TextMode="MultiLine" Width="478px"></asp:TextBox>
                             <a class="textarea_min" href="javascript:zoomtextarea(-2,'<%=this.MetaKeyWord.ClientID %>');"></a>
                             <a class="textarea_max" href="javascript:zoomtextarea(2,'<%=this.MetaKeyWord.ClientID %>');"></a>
                             <div class="tips">TIPS:模板里可以用标签“{$GetClassMetaKeyWords}”调用。</div>
                         </td>
                     </tr>
                     <tr>
                         <td align="right" class="lefttd" style="height: 76px;">
                             <strong>分类META网页描述</strong>：<br />
                             <span class="redFont">针对搜索引擎设置的网页描述</span></td>
                         <td class="righttd" style="height: 76px">
                             <asp:TextBox CssClass="textbox" ID="MetaDescript" runat="server" Rows="6" TextMode="MultiLine" Width="476px"></asp:TextBox>
                             <a class="textarea_min" href="javascript:zoomtextarea(-2,'<%=this.MetaDescript.ClientID %>');"></a>
                             <a class="textarea_max" href="javascript:zoomtextarea(2,'<%=this.MetaDescript.ClientID %>');"></a>
                             <div class="tips">TIPS:模板里可以用标签“{$GetClassMetaDescript}”调用。</div>
                         </td>
                     </tr>
                       </table>
     </div>
            
            
             <div class="tab-page" id="tab1">
              <h2 class="tab">自设内容</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage( document.getElementById( "tab1" ) );
                </script>
                
     		<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
             <tr>           
                 <td height='30' align='right' width='210' class='lefttd'><strong>自设内容数：</strong></td>
               <td height='28' class="righttd">
                  &nbsp;<select name="ClassDefine_Num" id="ClassDefine_Num" onChange="setFileFileds(this.value)"><option value="1" selected>1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option> </select>             </td>
             </tr>
             
             <%for (int i = 1; i <= 20; i++)
               {
               %>
               <tbody id="define<%=i %>" style="display:none">
             <tr>           
              <td height='30' align='right' width='210' class='lefttd'><strong>自设内容<%=i %>：</strong><br> <font class=redFont>在分类模板页插入{$GetClassDefineContent<%=i %>} 调用</font>
                 </td>
                 <td class="righttd">&nbsp;<textarea class="textbox" cols="10" Name='ClassDefineContent<%=i %>' style='width:500px;height:100px'><% try
                    {
                        Response.Write(param[i - 1].ToString());
                    }
                   catch{}%></textarea> 
                 </td>
             </tr>
             </tbody>
             <%} %>
             </table>			
                
            </div>
       </div>
    <KS:Foot ID="Foot1" runat="server" OnSubmit="SaveButton_Click" />
  </asp:Panel>
          
 <asp:Panel ID="PanMoveClass" runat="server" Width="100%" Visible="false">
     <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
				   <tr>
                       <td align="right" class="lefttd" style="width: 200px; height: 37px;"><strong>
                          将分类移动到：</strong>
                         </td>
                         <td  class="righttd" style="height: 37px">
                             <asp:DropDownList ID="DrpToClassID" runat="server">
                             <asp:ListItem Value="0">-无（作为一级栏目）-</asp:ListItem>
                             </asp:DropDownList>&nbsp;
                       </td>
                     </tr>
     </table>
     <div style="text-align:center">
         <asp:Button ID="BtnMoveSave" runat="server" Text="确认移动" CssClass="button" OnClick="BtnMoveSave_Click" />
     </div>
     <div class="message">
     注意事项：<br />
      本操作不可逆，请慎重操作！！！<br />
      不能在同一个栏目内进行操作，不能将一个栏目移动到其下属栏目中；<br />
      移动后您所指定的栏目（或者包括其下属栏目）将转移到目标栏目中。<br />
     </div>
 </asp:Panel>









    <!--- 一级分类排序  begin---->
   <asp:Panel ID="PanelOrderOne" runat="server" Visible="false">
        <div class="content-area mt20">
            <div class="myTitle" style="display:none;"><span class="fr">
            
        </span>一级分类排序</div>
            <div class="tabs_header">
                <a href="KS.Category.aspx" class="fr button">返回</a>
                <ul class="tabs">
                     <li class='active'><a href="KS.Category.aspx?action=OrderOne"><span>一级排序</span></a></li>
                     <li><a href="KS.Category.aspx?action=OrderN"><span>N级排序</span></a></li>
                </ul>
            </div>
       <KS:KSGV ID="OrderOneList" runat="server" CssClass="CTable" AutoGenerateColumns="False" EmptyDataText="还没有添加分类!" GridLines="None" OnRowDataBound="OrderOneList_RowDataBound" PagerType="CustomNumeric" Width="99%" OnDataBound="OrderOneList_DataBound" OnRowCommand="OrderOneList_RowCommand">
        <EmptyDataRowStyle CssClass="emptycss" />
        <Columns>
            <asp:BoundField DataField="classid" HeaderText="分类ID" >
                <itemstyle horizontalalign="Center" width="50px" />
            </asp:BoundField>
            <asp:BoundField DataField="classname" HeaderText="分类名称" />
            <asp:BoundField DataField="root" HeaderText="序号" >
                <itemstyle horizontalalign="Center"/>
            </asp:BoundField>
            <asp:TemplateField HeaderText="一级分类排序操作">
            <itemstyle horizontalalign="Center" width="400px" />
            <itemtemplate>
             <table border="0" cellpadding="0" cellspacing="0" align="center">
                <tr>
                <td style="width: 49%" nowrap>
                       <asp:DropDownList ID="DropUpOrder" runat="server" AutoPostBack="False">
                          <asp:ListItem Selected="True" Value="0">↑向上移动</asp:ListItem>
                         </asp:DropDownList>
                        &nbsp;<asp:Button runat="server" ID="UpButton" onmouseover="this.className='button_on';" onmouseout="this.className='button';" class="button" Text="修改" commandname="uporder" commandargument=<%#Eval("root") %>></asp:Button>
              </td>
              <td>&nbsp;</td>
              <td style="width: 49%" nowrap>
               <asp:DropDownList ID="DropDownOrder" runat="server" AutoPostBack="False">
                  <asp:ListItem Selected="True" Value="0">↓向下移动</asp:ListItem>
               </asp:DropDownList>&nbsp;<asp:Button ID="DownButton" onmouseover="this.className='button_on';" onmouseout="this.className='button';" class="button" Text="修改" commandname="downorder" commandargument=<%#Eval("root") %> runat="server" />
            </td>
            </table>
</itemtemplate>
            
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
    </KS:KSGV>
      <KS:Page ID="OrderOnePage" runat="server" />
     </div>
   </asp:Panel>
  <!--- 一级分类排序  end-->











 <!--- N级分类排序  begin---->
   <asp:Panel ID="PanelOrderN" runat="server" Visible="false">
        <div class="content-area mt20">
            <div class="myTitle" style=" display:none"><span class="fr"></span>N级分类排序</div>
            <div class="tabs_header">
                <a href="KS.Category.aspx" class="fr button">返回</a>
                <ul class="tabs">
                     <li><a href="KS.Category.aspx?action=OrderOne"><span>一级排序</span></a></li>
                     <li class='active'><a href="KS.Category.aspx?action=OrderN"><span>N级排序</span></a></li>
                </ul>
            </div>
      
             <KS:KSGV ID="OrderNList" cssclass="CTable" runat="server" AutoGenerateColumns="False" EmptyDataText="没有添加任何网校分类!" GridLines="None" OnRowDataBound="OrderNList_RowDataBound" PagerType="CustomNumeric" Width="100%" OnRowCommand="OrderNList_RowCommand">
        <EmptyDataRowStyle CssClass="emptycss" />
        <Columns>
            <asp:BoundField DataField="ClassID" HeaderText="分类ID" >
                <itemstyle horizontalalign="Center" width="50px" />
            </asp:BoundField>
            <asp:BoundField DataField="parentid" HeaderText="父ID" >
                <itemstyle horizontalalign="Center" width="50px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="分类名称">
                <itemtemplate>
        <%# getClassListName(Eval("Classname", "{0}"), Convert.ToInt16(Eval("child")), Convert.ToInt16(Eval("NextID")), Convert.ToInt16(Eval("depth", "{0}")), Convert.ToInt16(Eval("Type", "{0}")))%>
            </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="OrderID" HeaderText="序号" >
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="N级栏目排序">
                <itemstyle horizontalalign="Center" width="400px" />
                <itemtemplate>
                <table border="0" cellpadding="0" cellspacing="0" align="center">
                <tr>
                <td style="width: 49%" nowrap>
                       <asp:DropDownList ID="DropUpOrder" runat="server" AutoPostBack="False">
                          <asp:ListItem Selected="True" Value="0">↑向上移动</asp:ListItem>
                         </asp:DropDownList>
                        &nbsp;<asp:Button runat="server" ID="UpButton" onmouseover="this.className='button_on';" onmouseout="this.className='button';" class="button" Text="修改" commandname="upordern" commandargument=<%#Eval("root") %>></asp:Button>

              </td>
              <td>&nbsp;</td>
              <td style="width: 49%" nowrap>
               <asp:DropDownList ID="DropDownOrder" runat="server" AutoPostBack="False">
                  <asp:ListItem Selected="True" Value="0">↓向下移动</asp:ListItem>
               </asp:DropDownList>&nbsp;<asp:Button ID="DownButton" onmouseover="this.className='button_on';" onmouseout="this.className='button';" class="button" Text="修改" commandname="downordern" commandargument=<%#Eval("root") %> runat="server" />
            </td>
            </table>
        </itemtemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
    </KS:KSGV>
     <KS:Page ID="OrderNPage" runat="server" />

     </div>
   </asp:Panel>
  <!--- N级分类排序  end-->

     <asp:Panel ID="InsetPanel" runat="server" Visible="false">
         <div class="content-area mt20">
               <div class="myTitle">
               试卷购买详情
                    <a href="KS.Category.aspx?active=6"  class="fr button">返回</a>
            </div>
            <asp:Panel ID="Panel1" runat="server" Width="100%">
                <div class="courseList">
                    <asp:Repeater ID="ChatlistRepeater" runat="server">
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="CTable">
                                <tr class="CTitle">
                                    <td>序号</td>
                                    <td>分类名称</td>
                                    <td>试卷名称</td>
                                    <td>用户名</td>
                                    <td>消费金额</td>
                                    <td>消费时间</td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr onmouseover="this.className=&#39;CtrMouseOver&#39;" onmouseout="this.className=&#39;CtrMouseOut&#39;" onclick="chk(this)">
                                <td class="Ctd" style="text-align: center"><%#this.ChatlistRepeater.Items.Count + 1%></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("ClassName") %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("title") %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("UserName")%></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("Score") %></td>
                                 <td class="Ctd" style="text-align: center"><%#Eval("AddDate") %></td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr style="display: <%#bool.Parse((ChatlistRepeater.Items.Count==0).ToString())?"":"none"%>">
                                <td align="center" colspan="10">
                                    <div class="empty">
                                        没有查询到记录
                                    </div>
                                </td>
                            </tr>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
                <div class="listedit">

                    <div class="floatLeft allCheck">
                        <label>
                            <input name="" type="checkbox" value="" id="selectAll" />全选</label>
                    </div>

                    <ul class="fl">
                         <li>
                            <a  href="javascript:;" onmousedown="return(GetIDS());" onclick="GetDuo()" class="button">多课程营销</a>
                        </li>
                    </ul>
                </div>
                <div class="h20"></div>
                <asp:Label ID="LabPage" runat="server"></asp:Label>
            </asp:Panel>
        </div>
     </asp:Panel>
     <asp:Panel ID="JurisdictionPanel" runat="server" Visible="false">
 
    <div class="content-area">
           <div class="myTitle">
               试卷权限详情
                    <a href="KS.Category.aspx?active=6"  class="fr button">返回</a>
            </div>
        <script>

            function SelectAll() {
                jQuery("#ClassID option").each(function () {
                    jQuery(this).attr("selected", true);
                });
            }
            function UnSelectAll() {
                jQuery("#ClassID option:selected").each(function () {
                    jQuery(this).attr("selected", false);
                });
            }
            jQuery(document).ready(function () {
                SetDaily();
                SetIsfree();
                 });
            function SetDaily() {
                var a = jQuery("#<%=this.isopen_Daily.ClientID %> :radio[checked]").val();
                if (a == "0") {
                    $("#daily").hide();
                }
                else {
                    $("#daily").show();
                }
            }
            function SetIsfree() {
                 var a = jQuery("#<%=this.isfree.ClientID %> :radio[checked]").val();
                if (a == "0") {
                    $("#setfree").hide();
                }
                else {
                    $("#setfree").show();
                }
            }
        </script>

        <table cellspacing="1" cellpadding="2" width="99%" align="center" border="0">
            <tr class="tdbg">
                <td valign="top">
                    <div class="tab-page" id="ClassAttributePanel">
                        <script type="text/javascript">
                            var tabPane1 = new WebFXTabPane(document.getElementById("ClassAttributePanel"), 1)
                        </script>

                        <div class="tab-page" id="tab0">
                            <h2 class="tab">基本信息</h2>
                            <script type="text/javascript">
                                tabPane1.addTabPage(document.getElementById("tab0"));
                            </script>
                            <table id="tbs0" width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="CTable no-borderTable">

                                <tr style="display:none">
                                    <td align="center" class="lefttd" style="width: 52px">                                 
                                    <td align="right" class="lefttd" height="30" >
                                        <strong><span style="color: #666666">是否开启所属省份及多省：</span></strong>
                                    </td>
                                    <td class="righttd" height="28">
                                        <asp:RadioButtonList ID="isopen_Province" runat="server" RepeatDirection="horizontal">
                                        <asp:ListItem Value="0" >不启用</asp:ListItem>
                                        <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                    </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr style="display:none">
                                    <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                    
                                    <td align='right' class='lefttd' style="height: 30px;"><strong>是否启用年份：</strong> </td>
                                    <td class="righttd" style="height: 30px">
                                        <asp:RadioButtonList ID="isopen_Year" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0" >不启用</asp:ListItem>
                                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>

                                <tr>
                                    <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                     
                                    <td align='right' class='lefttd' style="width: 150px; height: 30px;"><strong>是否启用试卷类别：</strong> </td>
                                    <td class="righttd" style="height: 30px">
                                        <asp:RadioButtonList ID="isopen_Papertype" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0">不启用</asp:ListItem>
                                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr style="display:none">
                                    <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                      
                                    <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>是否启用自定义题型：</strong> </td>
                                    <td class="righttd" style="height: 30px">
                                        <asp:RadioButtonList ID="isopen_Customtktype" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0" >不启用</asp:ListItem>
                                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr>
                                    <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                       
                                    <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>是否启用知识点：</strong> </td>
                                    <td class="righttd" style="height: 30px">
                                        <asp:RadioButtonList ID="isopen_Knowledge" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0">不启用</asp:ListItem>
                                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr>
                                    <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                      
                                    <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>是否章节练习：</strong> </td>
                                    <td class="righttd" style="height: 30px">
                                        <asp:RadioButtonList ID="isopen_Chaper" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0">不启用</asp:ListItem>
                                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr>
                                    <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                      
                                    <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>是否启用每日一练：</strong> </td>
                                    <td class="righttd" style="height: 30px">
                                        <asp:RadioButtonList ID="isopen_Daily" runat="server" RepeatDirection="horizontal" onclick="SetDaily()">
                                            <asp:ListItem Value="0">不启用</asp:ListItem>
                                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tbody id="daily" style="display: none">
                                    <tr>
                                        <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                        
                                        <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>每日一练显示多少天：</strong> </td>
                                        <td class="righttd" style="height: 30px">
                                            <asp:TextBox ID="set_Dailydaynum" CssClass="textbox" runat="server" Style="width: 60px; text-align: center" Text="7"></asp:TextBox>
                                            <span class="tips">如：15  后面不能加:天</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                       
                                        <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>每日一练抽题数：</strong> </td>
                                        <td class="righttd" style="height: 30px">
                                            <asp:TextBox ID="set_Dailytknum" CssClass="textbox" runat="server" Style="width: 60px; text-align: center" Text="10"></asp:TextBox>
                                            <span class="tips">如：10  后面不加:题</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align='center' class='lefttd' style="width: 52px; height: 30px;">
                                          
                                        <td align='right' class='lefttd' style="width: 105px; height: 30px;"><strong>每日一练答题时间：</strong> </td>
                                        <td class="righttd" style="height: 30px">
                                            <asp:TextBox ID="set_Dailytime" CssClass="textbox" runat="server" Style="width: 60px; text-align: center" Text="20"></asp:TextBox>
                                            <span class="tips">如：120  后面不加:分</span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="tab-page" id="tab1">
                            <h2 class="tab">收费选项</h2>
                            <script type="text/javascript">
                                tabPane1.addTabPage(document.getElementById("tab1"));
                            </script>
                            <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
                                <tr style="display: none">
                                    <td align='center' class='lefttd' style="width: 50px;">
                                      
                                    <td class='lefttd' align="right" style="width: 181px">
                                        <strong>是否设置收费：<br />
                                        </strong><font color="#ff0000"></font></td>
                                    <td class='righttd'>
                                        <asp:RadioButtonList ID="isfree" runat="server" RepeatDirection="horizontal" onclick="SetIsfree()">
                                            <asp:ListItem Value="0">不设置直接继承父分类</asp:ListItem>
                                            <asp:ListItem Value="1" Selected="True">单独设置收费</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                 <tbody id="setfree" >
                                <tr>
                                    <td align='center' class='lefttd' style="width: 50px;">
                                     
                                    <td class='lefttd' align="right" style="width: 181px">
                                        <strong>试卷是否收费：<br />
                                        </strong></td>
                                    <td class='righttd'>
                                        <asp:RadioButtonList ID="paper_Ischarge" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0">以每份试卷为准</asp:ListItem>
                                            <asp:ListItem Value="1" Selected="True">收费</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr>
                                    <td align='center' class='lefttd' style="width: 50px;">
                                      
                                    <td class='lefttd' align="right" style="width: 181px">
                                        <strong>练习是否收费：<br />
                                        </strong></td>
                                    <td class='righttd'>
                                        <asp:RadioButtonList ID="practice_Ischarge" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0">免费</asp:ListItem>
                                            <asp:ListItem Value="1" Selected="True">收费</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                <tr>
                                    <td align='center' class='lefttd' style="width: 50px;">
                                      
                                    <td class='lefttd' align="right" style="width: 181px">
                                        <strong>查看题库解析是否收费：<br />
                                        </strong></td>
                                    <td class='righttd'>
                                        <asp:RadioButtonList ID="look_Tkanalysis" runat="server" RepeatDirection="horizontal">
                                            <asp:ListItem Value="0">免费</asp:ListItem>
                                            <asp:ListItem Value="1" Selected="True">收费</asp:ListItem>
                                        </asp:RadioButtonList>

                                    </td>
                                </tr>
                                 </tbody>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
     </asp:Panel>
  </div>



</asp:Content>

