<%@ page language="VB" autoeventwireup="false" inherits="qiye_admin_admin_add_cp_lei, App_Web_admin_add_changpin_lei.aspx.25f04327" %>
<head>
<title>商品分类</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script language="JavaScript" src="js/tanbox.js"></script>
<script src="js/intjs.js" type="text/javascript"></script>
<link href="css/css.css" rel="stylesheet" type="text/css">
<link href="css/body.css" rel="stylesheet" type="text/css">
<link href="css/text.css" rel="stylesheet" type="text/css">
<link href="css/button.css" rel="stylesheet" type="text/css" />
<script language="javascrip"t type="text/javascript">

function CheckAll(form) //传一个表单作参数
{ 
for (var i=0;i<form.elements.length;i++) //对这个表单里的元素进行循环
{ 
var e = form.elements[i]; //一个一个元素判断
if (e.Name != "the_checkbox"&&e.disabled!=true) //如果该元素的name属性为chkAll并且disabled!=true.即:该控件可用时.
e.checked = form.chkAll.checked; //控元素的checked与当前选中的控件checked保持一致.即:全选/全不选.
} 
} 
    function img_mappath(img_val, input_val) {
	var arr = showModalDialog("admin_select_img.aspx?&temp="+ Math.random , "", "dialogWidth:963px; dialogHeight:600px; status:0; help:0");
        if (arr != null) {
            document.getElementById(input_val).value = arr;
        }
    }

		document.oncontextmenu=new Function('event.returnValue=false;'); 
        </script>
    </head>
    <body>
<form id="form1" runat="server">
    <table width="100%" border="0" cellspacing="3" cellpadding="0">
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td bgcolor="#E7E7E7"><table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td bgcolor="#FFFFFF"><table width="100%" height="29" border="0" cellpadding="0" cellspacing="5">
                  <tr>
                    <td height="19" bgcolor="#EBEBEB"><table width="100%" border="0" cellspacing="8" cellpadding="0">
                        <tr>
                          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="3" cellpadding="0">
                              <tr>
                                <td width="15%" height="25" align="center" class="wuse16"><strong class="16huise">管理中心</strong></td>
                                <td valign="bottom" class="huise12">商品分类 </td>
                                <td width="70%" valign="bottom" class="huise12">本部分功能需要模板中含有[!--UserControlJ--][!--UserControlU--]标签</td>
                              </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            </tr>
            
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<fieldset style="margin:10px 5px 5px 5px; padding:0px 5px 5px 5px;"><legend class="wuse12"><strong>添加新分类</strong></legend>
<table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#E7E7E7" style="margin-top:5px;">
<tr>
                 <td width="17%" height="30" align="center" bgcolor="#F6F6F6" class="hongse12">分类名称：</td>
<td height="30"><asp:TextBox ID="add_cp_lei_bt" runat="server" 
                                        CssClass="text_autox22_cccccc" Width="250px" MaxLength="50"></asp:TextBox>
                     <span class="hongse12">* 不能使用特殊符号</span></td>
               </tr>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">分类图标背景：</td>
                 <td height="30"><asp:TextBox ID="add_cp_lei_photo" runat="server" 
                                        CssClass="text_autox22_cccccc" Width="420px" MaxLength="255"></asp:TextBox>
                   <a href="javascript:img_mappath(this,'add_cp_lei_photo');" class="wuse12"> 打开图象库</a></td>
               </tr>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">分类图片广告：</td>
               <td height="30"><asp:TextBox ID="add_cp_lei_guanggao" runat="server" 
                                        CssClass="text_autox22_cccccc" Width="320px" MaxLength="255"></asp:TextBox>
                     <a href="javascript:img_mappath(this,'add_cp_lei_guanggao');" class="wuse12"> 打开图象库</a> <span class="hongse12">广告图片尺寸应为 220*343</span></td>
               </tr>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">图片显示位置：</td>
               <td height="30"><asp:RadioButtonList ID="add_cp_lei_gg_img_showmap" runat="server" 
                                                  RepeatDirection="Horizontal">
                     <asp:ListItem Selected="True">left</asp:ListItem>
                     <asp:ListItem>right</asp:ListItem>
                 </asp:RadioButtonList></td>
               </tr>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">分类文字广告：</td>
                 <td height="30"><asp:TextBox ID="add_cp_lei_guanggao_text" runat="server" 
                                        CssClass="text_autox22_cccccc" Width="500px" MaxLength="255"></asp:TextBox></td>
               </tr>
               <% If ubb.xml_tables("red_parrot.xml", "parrot_form") = "True" Then%>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">附加表单：</td>
                 <td height="30"><span style="word-break: break-all">
                   <asp:DropDownList ID="add_cp_lei_annex" runat="server" 
                                                  appenddatabounditems="True">
                     <asp:ListItem Value="False">不附加表单</asp:ListItem>
                   </asp:DropDownList>
                 </span></td>
               </tr>
                <%End If %>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">排序：</td>
               <td height="30"><table border="0" cellspacing="0" cellpadding="0">
                     <tr>
                       <td><asp:TextBox ID="add_cp_lei_px" runat="server" 
                                        CssClass="text_autox22_cccccc" Text='0' onkeydown="intjs()" Width="50px" MaxLength="10"></asp:TextBox></td>
                       <td><span class="hongse12">* 数值越小越靠前</span></td>
                       <td width="60" align="right"><span class="lanse12">约显码：</span></td>
                       <td><asp:TextBox ID="add_cp_lei_jsnumber" runat="server" 
                                        CssClass="text_autox22_cccccc" onkeydown="intjs()" Width="50px" MaxLength="10"></asp:TextBox></td>
                       <td width="75" align="right" class="lanse12">显示归类：</td>
                       <td><asp:TextBox ID="add_cp_lei_category" runat="server" 
                                        CssClass="text_autox22_cccccc" onkeydown="intjs()" Width="50px" MaxLength="10">0</asp:TextBox></td>
                     </tr>
                 </table></td>
               </tr>
               <%If ubb.xml_tables("red_parrot.xml", "parrot_leinavcontrol") = "True" Then%>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="wuse12">隶属导航：</td>
               <td height="30"><table border="0" cellspacing="0" cellpadding="0">
                     <tr>
                       <td><asp:DropDownList ID="add_cp_lei_navcatgory" runat="server" 
                                                  CssClass="lvsetext200x22"> </asp:DropDownList></td>
                       <td width="65" align="right" class="lanse12">导航排序：</td>
                       <td><asp:TextBox ID="add_navcatgory_px" runat="server" 
                                        CssClass="text_autox22_cccccc" Text='0' onkeydown="intjs()" Width="50px"></asp:TextBox></td>
                     </tr>
                 </table></td>
               </tr>
               <%End If%>
               <tr>
                 <td height="30" align="center" bgcolor="#F6F6F6" class="lanse12"><a href="?">新建</a></td>
                <td height="30"><asp:Button ID="add_cp_lei_ok" runat="server" CssClass="btn_2k3" 
                                                  Text=" 添加分类 " Enabled="False" /> 
                     <asp:Button ID="up_cp_lei_ok" runat="server" CssClass="btn1_mouseout" 
                                                  Text=" 修改分类 " Enabled="False" />   
                     <span class="hongse12">
                     <asp:Label ID="add_cp_lei_ts" runat="server"></asp:Label>
                   </span></td>
               </tr>
           </table>
</fieldset>
                                    <fieldset style="margin:10px 5px 5px 5px; padding:0px 5px 5px 5px;"><legend class="wuse12"><strong>已建立的分类项</strong></legend>
                                     <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                       <tr>
                                         <td width="0%" align="right"><strong class="wuse12"> <a href="?">刷新列表</a> </strong></td>
                                       </tr>
                                     </table>
                                     <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                   <tr>
                                                     <td><%
                                                            Dim i, j As Integer
                                                            For i = 0 To CInt(cp_lei_tb.Rows.Count - 1)%>
                                                       <script language="javascript">
function open_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>(){
  shop_zlei_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>.style.display=''; 
   page_gif_0900_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>_s.style.display='none';
  page_gif_0900_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>.style.display='';
}

function close_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>(){
  shop_zlei_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>.style.display='none'; 
  page_gif_0900_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>_s.style.display='';
  page_gif_0900_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>.style.display='none';
}
                                       </script>
                                                         <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                           <tr>
                                                             <td><table width="100%" border="0" cellpadding="0" cellspacing="3" onMouseOver="this.bgColor='#DBDBDB';" onMouseOut="this.bgColor='#D7F7FF';" bgcolor="#D7F7FF">
                                                                 <tr>
                                                                   <td width="1%" align="center"><a id="page_gif_0900_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>_s" href="javascript:open_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>();" title="点击展开子类列表" style="display: none;"><img src="image/gif-0900_2.gif" width="12" height="17" border="0"/></a> <a id="page_gif_0900_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" href="javascript:close_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>();" title="点击隐藏子类列表" ><img src="image/gif-0900.gif" width="12" height="17" border="0" onClick="close_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>();"/></a> </td>
                                                                   <td><table width="0" border="0" cellspacing="0" cellpadding="0" class="wuse12">
                                                                       <tr>
                                                                         <td><input name="the_checkbox" type="checkbox" id="the_checkbox" value="<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" /></td>
                                                                         <td><%=cp_lei_tb.Rows(i).Item("cp_lei_bt")%><span class="hongse12">[ <%=cp_lei_tb.Rows(i).Item("cp_lei_px")%>]</span>　<span class="huise12">[约显码：<%=cp_lei_tb.Rows(i).Item("cp_lei_jsnumber")%>]</span><a name="nameid<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" id="nameid<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>"></a></td>
                                                                       </tr>
                                                                   </table></td>
                                                                   <td width="16%" align="center" class="wuse12"><%If cp_lei_tb.Rows(i).Item("cp_lei_index") = "True" Then%>
                                                                       <a href="?index=False&index_id=<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" title="是否关闭首页推荐显示本类">关闭首页推荐</a>
                                                                       <%Else%>
                                                                       <a href="?index=True&index_id=<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" title="是否开启首页推荐显示本类，本功能需要首页模板中包含[!--UserControlJ--]标签">开启首页推荐</a>
                                                                       <%End If%>
                                                                   </td>
                                                                   <td width="12%" align="center" class="wuse12"><a href="javascript:ShowHtmlString(570,255,'admin_cp_lei.aspx?admin_url=add&fleiid=<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>','添加二级分类');" >添加二级分类</a></td>
                                                                   <td width="20%" align="right" class="wuse12"><%=cp_lei_tb.Rows(i).Item("cp_lei_verify")%>　|　<a href="?admin_url=uplei&leiid=<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>">修改</a>　|　<a href="?admin_url=lei_delete&leiid=<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" onClick="javascrip:return confirm('删除顶级分类,顶级分类下的所有子分类也会一起被删除,请问你确认要删除此顶级分类吗?');">删除</a> </td>
                                                                 </tr>
                                                                 <tr>
                                                                   <td colspan="5" bgcolor="#CCCCCC"><img src="image/bj/gli.gif" width="22" height="1" /></td>
                                                                 </tr>
                                                               </table>
                                                                 <div id="shop_zlei_table_<%=cp_lei_tb.Rows(i).Item("cp_lei_id")%>" ">
                                                                   <% 
                                                  Dim lei_dt As New Data.DataTable
                                                  lei_dt = ubb.tables("select cp_lei_px,cp_lei_bt,cp_lei_id,cp_lei_verify,cp_lei_jsnumber from wn_cp_lei where cp_lei_fid=" & cp_lei_tb.Rows(i).Item("cp_lei_id") & " order by cp_lei_px asc")
                                                  For j = 0 To lei_dt.Rows.Count - 1
                          %>
                                                                   <table width="100%" border="0" cellpadding="0" cellspacing="3" onMouseOver="this.bgColor='#DBDBDB';" onMouseOut="this.bgColor='#F7F7F7';" bgcolor="#F7F7F7" >
                                                                     <tr>
                                                                       <td width="5%" align="right" ><input name="the_checkbox2" type="checkbox" id="the_checkbox" value="<%=lei_dt.Rows(j).Item("cp_lei_id")%>" /></td>
                                                                       <td class="wuse12"><%=lei_dt.Rows(j).Item("cp_lei_bt")%>　<span class="chense12">[ <%=lei_dt.Rows(j).Item("cp_lei_px")%>]</span><span class="huise12">[约显码：<%=lei_dt.Rows(j).Item("cp_lei_jsnumber")%>]</span></td>
                                                                       <td width="20%" align="right" class="wuse12"><%=lei_dt.Rows(j).Item("cp_lei_verify")%>　|　 <a href="javascript:ShowHtmlString(570,255,'admin_cp_lei.aspx?admin_url=upzlei&zleiid=<%=lei_dt.Rows(j).Item("cp_lei_id")%>','修改二级分类');" > 修改</a>　|　<a href="?admin_url=lei_delete&leiid=<%=lei_dt.Rows(j).Item("cp_lei_id")%>" onClick="javascrip:return confirm('你确认要删除此分类吗？');">删除</a></td>
                                                                     </tr>
                                                                     <tr>
                                                                       <td colspan="4" bgcolor="#CCCCCC"><img src="image/bj/gli.gif" width="22" height="1" /></td>
                                                                     </tr>
                                                                   </table>
                                                                   <%Next %>
                                                               </div></td>
                                                           </tr>
                                                         </table>
                                                       <%Next%>
                                                     </td>
                                                   </tr>
                                                 </table>
                                                 
                                     <table border="0" cellpadding="0" cellspacing="0">
                                       <tr>
                                         <td width="25" height="30"><input name="chkAll" type="checkbox" id="chkAll" onClick="CheckAll(this.form)" value="checkbox" style="border:0" /></td>
                                         <td width="60" class="wuse12">全选/反选</td>
                                         <td width="85"><asp:Button CssClass="btn" ID="cp_lei_quantity_show_true" runat="server" Text="批量显示"/></td>
                                         <td width="85"><asp:Button CssClass="btn" ID="cp_lei_quantity_show_false" runat="server" Text="批量隐藏"/></td>
                                       </tr>
                                     </table>
                                    </fieldset>
    </form>
    </body>