<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true" CodeBehind="Billboard.aspx.cs" Inherits="Amr.SuperSiteGroup.Web.Management.Billboard" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="right" style="text-align: center; margin-top: 10px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit" colspan="2">
                    <h1 style="float: left">
                        风云榜信息</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main" valign="top">
                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                        <tr class="tr1">
                            <td colspan="2">
                                <asp:Label ID="lbBoardType" runat="server" Text="添加风云榜"></asp:Label><br />
                                风云榜关键字将以埋码的方式工作，请您将<asp:Label ID="laBillboardReplace" runat="server" ForeColor="Red"></asp:Label>作为替换符放置在您想放置的网页位置，可通过节点规则，替换规则等实现埋码。<br />
                                <asp:Label ID="errorInfo" runat="server" ForeColor="Red"></asp:Label>
                                <asp:Label ID="successInfo" runat="server" ForeColor="Green"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    名称<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbName" runat="server" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    网址<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbUrl" runat="server" Wrap="False" Width="80%" /></td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    数据类型：</div>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlDataType" runat="server">
                                    <asp:ListItem Value="0">RSS</asp:ListItem>
                                    <asp:ListItem Value="1">Html</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    是否激活：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="IsEnable" runat="server" RepeatDirection="Horizontal" CssClass="checkbox">
                                    <asp:ListItem Value="0">停用</asp:ListItem>
                                    <asp:ListItem Value="1" Selected="True">激活</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:LinkButton ID="lbSubmit" runat="server" Text="【提交】" OnClick="lbSubmit_Click"
                                    OnClientClick="return validateForm()" />&nbsp; <asp:LinkButton ID="lbCancel" runat="server"
                                        Text="【取消】" OnClick="lbCancel_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="edit_main" style="width: 50%;">
                    <asp:Panel ID="panelRuleList" runat="server" Visible="False">
                      <div style="width: 100%; height: 400px; overflow-y: auto; overflow-x: hidden;">
                                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                        <tr>
                            <td colspan="2" class="style1">

                                <asp:Label ID="lbRuleType" runat="server" Text="添加提取规则"></asp:Label>
                                <br />
                                <asp:Label ID="errorInfoRule" runat="server" ForeColor="Red"></asp:Label>
                                <asp:Label ID="successInfoRule" runat="server" ForeColor="Green"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    名称<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbRuleName" runat="server" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    提取表达式<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbRule" runat="server" Wrap="False" Width="80%" /></td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    提取关键字个数<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbKeywordCount" runat="server" Wrap="False">3</asp:TextBox>
                            </td>
                        </tr>
                                        <tr>
                                            <td>
                                                <div align="right">
                                                    是否激活：</div>
                                            </td>
                                            <td align="left">
                                                <asp:RadioButtonList ID="ruleEnable" runat="server" CssClass="checkbox" 
                                                    RepeatDirection="Horizontal">
                                                    <asp:ListItem Value="0">停用</asp:ListItem>
                                                    <asp:ListItem Selected="True" Value="1">激活</asp:ListItem>
                                                </asp:RadioButtonList>
                                            </td>
                                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:LinkButton ID="lbSubmitRule" runat="server" Text="【提交】" OnClick="lbSubmitRule_Click"
                                    OnClientClick="return validateForm()" />&nbsp; 
                                <asp:LinkButton ID="lbCancelRule" runat="server"
                                        Text="【取消】" OnClick="lbCancelRule_Click" />
                            </td>
                        </tr>
                    </table>
                        <br />
                        <asp:GridView ID="gvRuleList" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
                            Width="100%" CellPadding="2" GridLines="None" CssClass="table_list"
                            CellSpacing="1">
                            <AlternatingRowStyle />
                            <Columns>
                                <asp:TemplateField HeaderText="编辑">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbEditRule" runat="server" 
                                            CommandArgument='<%# Bind("RuleId") %>' onclick="lbEditRule_Click">编辑</asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="lbDeleteRule" runat="server" 
                                            CommandArgument='<%# Bind("RuleId") %>' 
                                            OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}" 
                                            onclick="lbDeleteRule_Click">删除</asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="RuleId" HeaderText="编号"></asp:BoundField>
                                <asp:BoundField DataField="RuleName" HeaderText="规则名称"></asp:BoundField>
                                <asp:TemplateField HeaderText="提取表达式">
                                    <ItemTemplate>
                                        <asp:TextBox ID="tbExperssion" runat="server" TextMode="MultiLine" Width="200px" Text='<%# Bind("ExtractionRule") %>' ReadOnly="true"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="KeywordCount" HeaderText="关键字个数"></asp:BoundField>
                                <asp:BoundField DataField="IsEnable" HeaderText="是否激活"></asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="dg_page" />
                            <HeaderStyle CssClass="tr1" />
                            <RowStyle CssClass="tr_a" />
                            <AlternatingRowStyle CssClass="tr_b" />
                            <EditRowStyle CssClass="tr_a" />
                            <FooterStyle CssClass="dg_header" />
                            <SelectedRowStyle CssClass="tr_a" />
                        </asp:GridView>
                    </div>
                    </asp:Panel>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left; width: 84px;">
                        风云榜列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main" width="100%">
                    <asp:GridView ID="gvBillboardList" runat="server" GridLines="None" CssClass="table_list"
                        Width="100%" EnableModelValidation="True" AutoGenerateColumns="False">
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <Columns>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                        <asp:LinkButton ID="lbEditBillboard" runat="server" 
                                            CommandArgument='<%# Bind("BillboardId") %>' onclick="lbEditBillboard_Click">编辑</asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="lbDeleteBillboard" runat="server" 
                                            CommandArgument='<%# Bind("BillboardId") %>' onclick="lbDeleteBillboard_Click" OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}">删除</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="BillBoardId" HeaderText="编号" SortExpression="BillBoardId" />
                            <asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name" />
                            <asp:TemplateField HeaderText="网址">
                                <ItemTemplate>
                                    <asp:TextBox ID="tbBoardUrl" runat="server" TextMode="MultiLine" ReadOnly="true" Text='<%# Bind("Url") %>' Width="400"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="IsEnable" HeaderText="是否激活" SortExpression="IsEnable" />
                            <asp:BoundField DataField="CreatedOn" HeaderText="创建时间" SortExpression="CreatedOn" />
                            <asp:BoundField DataField="UpdatedOn" HeaderText="上次修改时间" SortExpression="UpdatedOn" />
                        </Columns>
                        <FooterStyle CssClass="dg_header" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
    </div>
</asp:Content>
