<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_Chanel, QianboCMS" EnableEventValidation="false" %>
<%@ Import Namespace="Qianbo.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 href="../Css/layout.css" type="text/css" rel="stylesheet">
    <script src="../../Js/Common.js"></script>
    <script>
        var menuHit = 0;
        function ShowModelList() {
            if (menuHit == 0) {
                modelMenuList.style.display = "";
                menuHit = menuHit + 1;
            }
            else {
                modelMenuList.style.display = "none";
                menuHit = menuHit - 1;
            }
        }
        function showMenu() {
            modelMenuList.style.display = "";
            menuHit = 1;
        }
		/*
        function SetChannelType(val)
        {
            var c = WinOpen("SetChannelType.aspx?ChId="+val,"setChType",250,50);
            c.focus();
        }
        */
    </script>
</head>

<body>
    <form id="form1" runat="server">
        <table cellspacing="1" cellpadding="0" class="wzdh" align="center">
            <tr>
                <td style="padding-left: 10px;">
                    <img src="../Images/Skin/Default/you.gif" align="absmiddle" />
                    您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; 频道管理
				</td>
            </tr>
        </table>
        <table cellspacing="1" cellpadding="0" class="border" align="center">
            <tr>
                <td class="wzlist">
                    <div style="background: url(../Images/Skin/Default/sitelist.png) no-repeat; width: 100px; line-height: 26px; padding-left: 20px; font-weight: bold;" runat="server" id="spanAddChannel"><a href="SetChannel.aspx">添加频道</a></div>
                    <asp:Literal runat="server" ID="litAddChannel"></asp:Literal>
				</td>
            </tr>
        </table>
        <table cellspacing="1" cellpadding="0" class="border" align="center">
            <tr>
                <td class="wzlist"><a href="../Create/CreateNews.aspx?modelId=1">生成管理</a> | <a href="SinglePageList.aspx">单页管理</a> | <a href="RecycleChannel.aspx">回收站管理</a> | <a href="MoveExpireArticle.aspx">归档管理</a></td>
            </tr>
        </table>
        <table align="center" class="border" cellspacing="1" cellpadding="0">
            <asp:Repeater ID="repChannel" runat="server" OnItemCommand="repChannel_ItemCommand">
                <HeaderTemplate>
                    <tr class="title">
                        <td width="60px"><strong>编号</strong></td>
                        <td><strong>频道名称</strong></td>
                        <td width="120px"><strong>所属模型</strong></td>
                        <td width="120px"><strong>站点目录</strong></td>
                        <td width="120px"><strong>项目名称</strong></td>
                        <td width="60px"><strong>生成方式</strong></td>
                        <td width="60px"><strong>站点状态</strong></td>
                        <td width="60px"><strong>是否认证</strong></td>
                        <td width="180px"><strong>操作</strong></td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tdbg" onmouseover="this.className='tdbgmouseover'" onmouseout="this.className='tdbg'">
                        <td><asp:Label ID="ChId" runat="server" Text='<%# Eval("ChId") %>'></asp:Label></td>
                        <td align="left" style="padding-left: 5px;"><a href="ColumnList.aspx?ChId=<%#Eval("ChId") %>"><%#Eval("ChName") %></a></td>
                        <td><%#Eval("ModelName")%></td>
                        <td><%# Eval("DirName") %></td>
                        <td><%# Eval("TypeName") %></td>
                        <td><%# GetIsStaticType(Eval("IsStaticType")) %></td>
                        <td><%# GetIsDisabled(Eval("IsDisabled"))%></td>
                        <td><%# (bool)Eval("IsOpened")?"开放":"认证"%></td>
                        <td>
							<a href="../Preview/PreChannel.aspx?ChId=<%#Eval("ChId") %>" target="_blank">预览</a> | <a href="SetChannel.aspx?ChId=<%#Eval("ChId") %>&ChType=<%#Eval("ChType") %>">修改</a> |
							<asp:LinkButton ID="btnDisabled" runat="server" Text='<%# GetBtnText(Eval("IsDisabled")) %>' CommandName="state" /> | <asp:LinkButton ID="btnDelete" runat="server" Text="删除" CommandName="delete" OnClientClick="return confirm('是否确定将该频道删除到回收站？\r\n注意：该频道所属相关栏目、内容也将同时删除。')" />
						</td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        <table cellpadding="0" cellspacing="1" class="border" align="center">
            <tr>
                <td class="wzlist">
                    <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页" OnPageChanging="Pager_PageChanging" PageSize="20" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Never" ShowNavigationToolTip="True" Width="99%" LayoutType="Table" CustomInfoSectionWidth="10%" CustomInfoHTML="当前第<font color='red'><strong>%currentPageIndex%</strong></font>/%PageCount%页 每页<font color='red'><strong>%PageSize%</strong></font>条记录"></webdiyer:AspNetPager>
				</td>
            </tr>
        </table>
        </div>
    </form>
    <br />
</body>
</html>