<%@ Page Title="管理 代码广告" Language="C#" MasterPageFile="~/Manager/Manger.Master" EnableEventValidation="true" ValidateRequest="false" AutoEventWireup="true" CodeBehind="MAdCode.aspx.cs" Inherits="Stat.web.Manerger.MAdCode" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpTop" runat="server">
<div style="margin-top: 5px;">
   当前位置：网站广告 &gt; 代码广告
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpMSG" runat="server">
 <span class="M_b14">小贴士：</span> 你可以管理 代码广告。如果 “编辑器”无法展开，请按 “F5” 。
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cpMain" runat="server">
<br />
      <table align="left" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top" align="center">
                    <asp:Panel ID="pnWebList" runat="server" BackColor="White" Width="100%" >
                        <asp:GridView ID="gvWebList" runat="server" AutoGenerateColumns="False" EmptyDataText="没有找到，请添加"
                            GridLines="None" Width="100%" BorderColor="#CEDFEF" BorderWidth="1px" 
                            onrowdatabound="gvWebList_RowDataBound" onrowdeleting="gvWebList_RowDeleting" 
                            onrowediting="gvWebList_RowEditing" CssClass="tableBorder">
                            <Columns>
                                <asp:BoundField DataField="id" HeaderText="ID" SortExpression="WebId">
                                    <HeaderStyle Height="25px" />
                                    <ItemStyle Width="50px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="title" HeaderText="广告标记" SortExpression="WebUrl" >
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="广告位置">
                                      <ItemTemplate >
                                        <asp:Label ID="Label1" runat="server" Text='<%# IsPosit(Eval("Posit")) %>'></asp:Label>                                      
                                    </ItemTemplate>
                                    <ItemStyle Width="145px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="状态" >
                                    <ItemTemplate >
                                        <asp:Label ID="Label1" runat="server" Text='<%# IsState(Eval("State")) %>'></asp:Label>                                      
                                    </ItemTemplate>
                                    <ItemStyle Width="70px" CssClass="forumRow" />
                                </asp:TemplateField>
                                <asp:ButtonField CommandName="Edit" Text="编辑">
                                    <ItemStyle Width="40px" />
                                </asp:ButtonField>
                                <asp:CommandField ShowDeleteButton="True">
                                    <ItemStyle Width="40px" />
                                </asp:CommandField>
                            </Columns>                            
                            <HeaderStyle BackColor="#E9F1FA" Height="20px" />
                        </asp:GridView>
                       </asp:Panel>
                    <asp:Panel ID="pnEditWeb" runat="server" BackColor="White" Visible="false"
                        Width="100%">
                        <table bgcolor="#cedfef" border="0" cellpadding="0" cellspacing="1" class="padding" width="100%">
                            <tr>
                                <td  colspan="2" style="height: 26px" bgcolor="#e9f1fa" height="25">
                                    <strong><span style="font-size: 12pt">
                                    添加/修改广告</span></strong></td>
                            </tr>
                            <tr>
                                <td style="width: 165px; height: 25px; text-align: right" bgcolor="#FFFFFF">
                                    广告标记：</td>
                                <td style="width: 512px; height: 25px; text-align: left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtName" runat="server" Width="250px"></asp:TextBox>
                                    </td>
                            </tr>    
                            <tr>
                                <td bgcolor="#FFFFFF" style="width: 165px;text-align: right">
                                    广告代码：</td>
                                <td bgcolor="#FFFFFF" style="text-align: left">
                                    <asp:TextBox ID="txtCode" runat="server" Height="114px" 
                                        TextMode="MultiLine" Width="384px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr style="color: #000000">
                                <td bgcolor="#ffffff" style="width: 165px; height: 26px; text-align: right">
                                    广告位置：</td>
                                <td bgcolor="#ffffff" style="width: 512px; height: 26px; text-align: left">
                                    <asp:DropDownList ID="dpdPosition" runat="server">
                                        <asp:ListItem Value="0">统计底部</asp:ListItem>
                                        <asp:ListItem Value="3">统计顶部</asp:ListItem>
                                        <asp:ListItem Value="1">统计“当前位置”右侧</asp:ListItem>
                                        <asp:ListItem Value="2">站点列表 中间</asp:ListItem>                     
                                        <asp:ListItem Value="4">站点列表 底部（通栏）</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr style="color: #000000">
                                <td bgcolor="#ffffff" style="width: 165px; height: 26px; text-align: right">
                                    是否启用：</td>
                                <td bgcolor="#ffffff" style="width: 512px; height: 26px; text-align: left">
                                    <asp:RadioButtonList ID="rBtnState" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True" Value="1">启用</asp:ListItem>
                                        <asp:ListItem Value="0">禁止</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td bgcolor="#FFFFFF" colspan="2" style="height: 26px">
                                    &nbsp;<asp:Button ID="btnEditSave" runat="server" OnClick="btnEditSave_Click" 
                                        Text="保存数据" />
                                    <asp:HiddenField ID="hdfAdId" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
  
        </table> 
</asp:Content>
