<%@ page language="C#" autoeventwireup="true" inherits="admin_label_selectExportLabel, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Import Namespace="D.BLL" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />

    <script src="../../js/Common.js" type="text/javascript"></script>

    <script src="../../js/<%=B_Lang.getLang() %>/SelectCheckBox.js" type="text/javascript"></script>

    <script type="text/javascript">
        var api = frameElement.api, W = api.opener;
        function Sel(Id) {
            var ControlId = 'txtLabelId';
            var value = W.DianCMS_$(ControlId).value;

            if (value.length == 0) {
                W.DianCMS_$(ControlId).value = Id;
            }
            else {
                var _value = "," + value + ",";
                if (_value.indexOf("," + Id + ",") != -1) {
                    alert("该标签已经存在");
                    return false;
                }
                W.DianCMS_$(ControlId).value = value + "," + Id;
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="selectExportLabel.aspx">标签列表</a>
                <asp:Literal ID="LitStyleClass" runat="server"></asp:Literal>
            </td>
        </tr>
    </table>
    <table align="center" cellpadding="2" cellspacing="1" width="99%" class="border">
        <tr class="title">
            <td class="t1">
                选择
            </td>
            <td width="100">
                标签编号
            </td>
            <td>
                标签名称
            </td>
            <td>
                操作
            </td>
        </tr>
        <asp:Repeater ID="RepLabelClass" runat="server">
            <ItemTemplate>
                <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                    <td class="t1">
                    </td>
                    <td align="center">
                        <img src="../images/folder.gif" />
                    </td>
                    <td align="center">
                        <a href='selectExportLabel.aspx?ParentId=<%#Eval("Id") %>'>
                            <%#Eval("Name") %></a>
                    </td>
                    <td align="center">
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <asp:Repeater ID="RepLabel" runat="server">
            <ItemTemplate>
                <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                    <td align="center" class="t1">
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </td>
                    <td align="center">
                        <asp:Literal ID="Literal1" runat="server" Text='<%#Eval("LabelId") %>'></asp:Literal>
                    </td>
                    <td align="center">
                        <%#Eval("Name") %>
                    </td>
                    <td align="center">
                        <a href="javascript:" onclick="Sel('<%#Eval("LabelId")%>')">选择</a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <table cellpadding="0" cellspacing="1" class="dh2" align="center">
        <tr>
            <td>
                <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" FirstPageText="首页"
                    LastPageText="尾页" NextPageText="下一页" PageSize="20" HorizontalAlign="Right" PrevPageText="上一页"
                    showinputbox="Never" UrlPageIndexName="p" UrlPaging="True" ShowCustomInfoSection="Left"
                    Width="99%">
                </webdiyer:AspNetPager>
            </td>
        </tr>
    </table>
    <table cellpadding="0" cellspacing="1" class="dh2" align="center">
        <tr>
            <td height="30">
                <input id="checkDel" onclick="CheckDelBox(this)" type="checkbox"><span id="ShowA">选择全部</span>
                <asp:Button ID="ButExport" runat="server" Text=" 导出选中标签 " CssClass="btn" Style="margin-left: 10px"
                    OnClick="ButExport_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
