<%@ Page Language="C#" AutoEventWireup="true"
    Inherits="MyITJob.Admin_Advertise_AddZone_Manage" Codebehind="Advertise_AddZone_Manage.aspx.cs" %>

<!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>
    <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
    <link href="../images/Admin_Style.css" rel="stylesheet" type="text/css" />

    <script language='javascript' type="text/javascript">

function CheckAll(form){
  for (var i=0;i<form.elements.length;i++){
    var e = form.elements[i];
    if (e.name != 'chkAll' && e.disabled == false && e.type == 'checkbox') {
      e.checked = form.chkAll.checked;
      if (e.checked)
        hL(e);
      else
        dL(e);
    }
  }
}

function hL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg2';
}
function dL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg';
}
    </script>

</head>
<body>
    <form id="myform" runat="server">
        <div>
            <table align="center" border="0" cellpadding="2" cellspacing="1" class="border" width="100%">
                <tr class="topbg">
                    <td colspan="10" height="22">
                        <table width="100%">
                            <tr class="topbg">
                                <td align="center">
                                    <b>网 站 广 告 管 理</b></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td height="30" width="70">
                        <strong>管理导航：</strong></td>
                    <td>
                        <a href="Advertise_AddZone_Manage.aspx">广告版位管理</a> |&nbsp; <a href="Advertise_AddZone.aspx">
                            添加新版位</a> |&nbsp; <a href="Advertise_AddAD_Manage.aspx">网站广告管理</a>
                        |&nbsp; <a href="Advertise_AddAD.aspx">添加新广告</a> |</td>
                </tr>
            </table>
            <br />
            <asp:Panel ID="ManageZone" runat="server">
            <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
                <tr class='topbg' height='22'>
                    <td width='30' align='center'>
                        <strong>选中</strong></td>
                    <td width='30' align='center'>
                        <strong>ID</strong></td>
                    <td align='center'>
                        <strong>版位名称</strong></td>
                    <td width='65' align='center'>
                        <strong>版位类型</strong></td>
                    <td width='35' align='center'>
                        <strong>显示</strong></td>
                    <td width='65' align='center'>
                        <strong>版位尺寸</strong></td>
                    <td width='30' align='center'>
                        <strong>活动</strong></td>
                    <td width='120' align='center'>
                        <strong>操作</strong></td>
                    <td width='80' align='center'>
                        <strong>版位JS</strong></td>
                </tr>
                <asp:Repeater ID="RP1" runat="server">
                    <ItemTemplate>
                        <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
                            <td width='30' align='center'>
                                <asp:CheckBox ID="CheckBox1" runat="server" ToolTip='<%#Eval("id") %>' /></td>
                            <td width='30' align='center'>
                                <%#Eval("id") %>
                            </td>
                            <td>
                                <a href='Advertise_AddAd_Manage.aspx?Action=ADList&ZoneID=<%#Eval("id") %>'>
                                    <%#Eval("ZoneName") %>
                                </a>
                            </td>
                            <td width='65' align='center'>
                                <%#Eval("ZoneTypeText")%>
                            </td>
                            <td width='35' align='center'>
                                <%#Eval("ShowTypeText") %>
                            </td>
                            <td width='65' align='center'>
                                <%#Eval("ZoneWidth") %>
                                x
                                <%#Eval("ZoneHeight") %>
                            </td>
                            <td width='30' align='center'>
                                <b>
                                    <%#Eval("ZoneAction") %>
                                </b>
                            </td>
                            <td width='120' align='center'>
                                <a href='Advertise_AddAD.aspx?Action=AddAD&ZoneID=<%#Eval("id") %>'>添加</a>&nbsp;
                                <a href='Advertise_AddZone.aspx?Action=ModifyZone&ZoneID=<%#Eval("id") %>'>修改</a>&nbsp;
                                <a href='?Action=DelZone&ZoneID=<%#Eval("id") %>' onclick="return confirm('确定要删除此版位吗？删除后原来的属于此版位的广告将也被删除。');">
                                    删除</a>
                                <br />
                                <a href='?Action=ClearZone&ZoneID=<%#Eval("id") %>' onclick="return confirm('确定要清空此版位吗？清空后原来的属于此版位的广告将被删除。');">
                                    清空</a>&nbsp; <a href='?Action=SetZoneActive&ZoneID=<%#Eval("id") %>'>活动/暂停</a>
                            </td>
                            <td width='80' align='center'>
                                 <a href='Advertise_PreviewZone.aspx?Action=PreviewZone&ZoneID=<%#Eval("id") %>'>预览</a>  <a href='?Action=ZoneJSCode&ZoneID=<%#Eval("id") %>'>JS调用</a>
                                <br />
                                <a href='?Action=CreateJSZone&ZoneID=<%#Eval("id") %>'>刷新JS版位</a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            <input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox'/>
            <asp:Button ID="Button1" runat="server" Text="删除选定版位" OnClick="Button1_Click" />
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="669" height="18">
                        共<b>
                            <asp:Label ID="LbRecord" runat="server" ForeColor="Red"></asp:Label>
                        </b>条记录 页数:
                        <asp:Label ID="CurrentPage" runat="server" ForeColor="Red"></asp:Label>
                        /
                        <asp:Label ID="TotalPage" runat="server" ForeColor="Red"></asp:Label>
                        页 <b>
                            <asp:Label ID="LbPageRecord" runat="server"></asp:Label>
                        </b>篇文章/页
                        <asp:HyperLink ID="Linkhead" runat="server">首页</asp:HyperLink>
                        <asp:HyperLink ID="LinkPrev" runat="server">上一页</asp:HyperLink>
                        <asp:HyperLink ID="LinkNext" runat="server">下一页</asp:HyperLink>
                        <asp:HyperLink ID="LinkFoot" runat="server">尾页</asp:HyperLink></td>
                </tr>
            </table>
            </asp:Panel>
            <asp:Panel ID="ZoneJSCode" runat="server" Visible="false">
                <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
                    <tr class='title'>
                        <td height='22' colspan='2' align='center'>
                            <strong>版位JS调用代码----文字代码</strong></td>
                    </tr>
                    <tr class='tdbg2'>
                        <td height='25' align='center'>
                            调用方法：将下面的代码插入到网页中预定的广告位置</td>
                    </tr>
                    <tr class='tdbg'>
                        <td height='100' align='center'>
                            <asp:TextBox ID="ZoneJsCodeText" runat="server" ForeColor="RoyalBlue" Height="90px"
                                TextMode="MultiLine" Width="690px"></asp:TextBox></td>
                    </tr>
                    <tr class='tdbg'>
                        <td height='25' align='center'>
                            <a href='Advertise_AddZone_Manage.aspx'>返回</a></td>
                    </tr>
                </table>
            </asp:Panel>
            <br />
            <table width="100%" border="0" cellspacing="1" cellpadding="3">
                <tr>
                    <td class="topbg">
                        <div align="center">
                            Copyright 2009-2019  <%=Application["PageTitle"] %> All Rights Reserved.</div>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
