<%@ Page Language="C#"  MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsCategory" Codebehind="KS.CosCategory.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
  <%if (KSCMS.S("action") != "moveClass")
      { %>
 <div id="manage_top" class="menu_top_fixed">
         <ul class="titleTab">
            <%if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx0", true))
                { %>
          <li><a href="KS.CosConfig.aspx">系统设置</a></li>
             <%}
                 if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx1", true))
                 { %>
          <div onmouseover="jQuery('#topcd').show();" onmouseout="jQuery('#topcd').hide();" class="liwrap">
                   <li class="curr"><a href="KS.CosCategory.aspx?type=0">分类设置</a></li>
                   <div id="topcd" class="topcd" style="display:none">
                      <a href="KS.CosCategory.aspx?type=0">网授分类</a>
                      <a href="KS.CosCategory.aspx?type=1">面授分类</a>
                   </div>
           </div>
            <%}
                if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx2", true))
                { %>
          <li><a href="KS.CosLiveConfig.aspx">直播道具</a></li>
             <%}
                 if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx3", true))
                 { %>
          <li><a href="KS.CosFaceType.aspx">面授班型</a></li>
              <%}
                  if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx4", true))
                  { %>
          <div onmouseover="jQuery('#topvideo').show();" onmouseout="jQuery('#topvideo').hide();" class="liwrap">
                   <li><a href="KS.CosAPIConfg.aspx">视频接口</a></li>
                   <div id="topvideo" class="topcd" style="display:none">
                      <a href="KS.CosAPIConfg.aspx">点播接口</a>
                      <a href="KS.CosLiveAPIConfig.aspx">直播接口</a>
                   </div>
              </div>
              <%} %>
            <li><a href="KS.CosVideoAdvertiseManage.aspx">设置视频广告</a></li>
       </ul>
 </div>  
<div class="menu_top_fixed_height"></div> 
<%} %>
<asp:Panel ID="ClassList" runat="server" Width="100%">
<script type="text/javascript">
    function ExtSub(ID,event) {//阻止冒泡调用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.CosCategory.aspx",
                    data: "parentid="+ID+"&action=ExtSub",
                    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("移动栏目", "Course/KS.CosCategory.aspx?action=moveClass&classid=" + id, true, 600, 250);
    }
</script>
      <div class="content-area"> 
      		<div class="myTitle" style="display:none;">
              <%=sType==0?"网授":"面授" %>课程分类设置</div>
           	<div class="tabs_header">
                <span class="fr headOperation">
                 	<%if (KSCMS.S("Type") == "1")
                     { %><li><asp:LinkButton ID="LinkButton3" runat="server" OnClick="lbtaddmodel1_Click" CssClass="button button_on">添加面授分类</asp:LinkButton></li>
                  	<%}
                    else
                    { %><li><asp:LinkButton ID="addbutton" runat="server" OnClick="lbtaddmodel_Click" CssClass="button button_on">添加网授分类</asp:LinkButton></li>
                  	<%} %><li><a href="?action=OrderOne&type=<%=sType %>" class="button">分类排序</a></li>
                 	<li><asp:LinkButton ToolTip="修正栏目排序" ID="LinkButton6" runat="server" OnClick="LinkButton6_Click" CssClass="button">修正排序</asp:LinkButton></li>
              	</span>
                <ul class="tabs">
                     <li <%=Utils.StrToInt(KSCMS.S("Type"))==0?" class='active'":string.Empty %>><a href="KS.CosCategory.aspx?Type=0"><span>网授类别</span></a></li>
                     <li <%=KSCMS.S("Type")=="1"?" class='active'":string.Empty %>><a href="KS.CosCategory.aspx?Type=1"><span>面授类别</span></a></li>
                </ul>
           	 </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="600" style="text-align:left">名称(<a class="tips" style="font-weight:normal" href="KS.CosCategory.aspx?action=showall&Type=<%=KSCMS.S("Type")%>">展开</a>)</th>
                   <th scope="col">序号</th>
                  <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);' style='text-decoration:none'><%# getClassName(Convert.ToInt32(Eval("ClassID")),Eval("Classname", "{0}"), Convert.ToInt16(Eval("child")), Convert.ToInt16(Eval("NextID")), Convert.ToInt16(Eval("depth", "{0}")), 1)%></a><%}
                   else
                   { %><%# getClassName(Convert.ToInt32(Eval("ClassID")),Eval("Classname", "{0}"), Convert.ToInt16(Eval("child")), Convert.ToInt16(Eval("NextID")), Convert.ToInt16(Eval("depth", "{0}")), 1)%><%} %>
                   
                   <span id='a<%# Eval("classid") %>' style="display:none;padding-left:20px">
                    <a style="color:#999" href="KS.CosCategory.aspx?action=add&parentid=<%# Eval("classid") %>&type=<%#Eval("type") %>">添加子分类</a>
                    <a href="javascript:;" onclick="moveClass(<%# Eval("ClassID") %>)"  style="color:#999">移动</a>
                    <a href="<%# Kesion.HtmlTags.BasicField.GetCourseListUrl("courselist_new",Convert.ToString(Eval("classename")),Utils.StrToInt(Eval("classid"))) %>" target="_blank">预览</a>
                   </span>
    
                   </td>
           
                 <td class="Ctd" align="center" style="width:35px;"><%# Container.ItemIndex + 1 + (CurrPage - 1) * PageSize%></td>
                 <td class="Ctd" align="center">
                  <a href="KS.CosCategory.aspx?action=edit&classid=<%# Eval("classid") %>&type=<%#Eval("type") %>" class="edit">编辑</a>
                 
                 </td>
                   <td class="Ctd" align="center">
                        <a href="KS.CosCategory.aspx?Action=del&Ids=<%# Eval("classid") %>&type=<%#Eval("type") %>" onclick="return(confirm('删除分类，同时删除该分类下的问答，此操作不可逆，确定删除分类吗?'));"  class="delete">删除</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("#AddMore").show();
                    } else {
                        jQuery("#AddOne").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">    
            <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"></label>
                             <div id="AddMore" style="display: none">
                                 <font color="red">一行代表一个分类</font>
                                 <br />
                                 <asp:TextBox Text="分类名称1" ID="TxtMoreClassName" runat="server" CssClass="textbox" TextMode="MultiLine" Width="250px" Height="150px"></asp:TextBox>
                             </div>
                         </td>
                     </tr>
                     <tr>
                         <td class="lefttd" height="30" align="right"><strong>英文名称：</strong></td>
                         <td class="righttd">
                             <span id="AddOne">
                                 <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>
                         <td height="30" class="lefttd" align="right">
                             <strong>是否隐藏：</strong></td>
                         <td class="righttd">
                             <asp:RadioButtonList ID="IsHide" runat="server" RepeatDirection="horizontal">
                                 <asp:ListItem Value="0">是</asp:ListItem>
                                 <asp:ListItem Value="1" Selected>否</asp:ListItem>
                             </asp:RadioButtonList>
                         </td>
                     </tr>
                     <tr<%=CommonJsonCache.CheckYunAPPHasAllow("plus.ask")?"":" 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>
                     <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>
                     <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">    
            <div class="myTitle" style="display:none;"><span class="fr">
            
        </span>一级<%=sType==0?"网授":"面授" %>分类排序</div>
            <div class="tabs_header">
                <a href="KS.CosCategory.aspx" class="fr button">返回</a>
                <ul class="tabs">
                     <li class='active'><a href="KS.CosCategory.aspx?action=OrderOne&type=<%=sType %>"><span>一级排序</span></a></li>
                     <li><a href="KS.CosCategory.aspx?action=OrderN&type=<%=sType %>"><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">    
            <div class="myTitle" style=" display:none"><span class="fr">
            
        </span>N级<%=sType==0?"网授":"面授" %>分类排序</div>
            <div class="tabs_header">
                <a href="KS.CosCategory.aspx" class="fr button">返回</a>
                <ul class="tabs">
                     <li><a href="KS.CosCategory.aspx?action=OrderOne&type=<%=sType %>"><span>一级排序</span></a></li>
                     <li class='active'><a href="KS.CosCategory.aspx?action=OrderN&type=<%=sType %>"><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-->















  </div>



</asp:Content>

