<%@ Page Language="c#" Inherits="TopWinCMS.WebUI.Admin.Admin_Ads_List" CodeBehind="Ads_List.aspx.cs" %>

<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<%@ Register Assembly="TopWinCMS.WebControls" Namespace="TopWinCMS.WebControls" TagPrefix="cc1" %>
<!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>
    <title>广告列表</title>
    <meta http-equiv="Pragma" content="No-cach" />
    <link href="../Style.css" type="text/css" rel="stylesheet" />

    <script language="javascript" type="text/JavaScript">
            function GetJS(id) 
            {
	            window.showModelessDialog("Ads_Code.aspx?ID=" + id, "up","dialogWidth=374px;dialogHeight=144px;status=0;scroll=no");
            }
    </script>

    <script language="javascript" type="text/javascript" src="../../Images/skysoft.js"></script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table id="NavigationPath" border="0" cellpadding="4" cellspacing="0" width="100%">
                <tr>
                    <td width="50%">
                        <img src="../../Images/arrow.gif" alt="" />
                        您现在的位置：&nbsp;<span id="path" runat="server"></span>
                    </td>
                    <td width="50%">
                        说明：生成广告JS文件以后，将JS插入你需要的显示广告的模板的相应位置。
                    </td>
                </tr>
            </table>
            <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" OnItemCommand="DataList1_ItemCommand">
                <ItemTemplate>
                    <table cellspacing="2" cellpadding="4" width="100%" align="center" bgcolor="#eeeeee"
                        border="0">
                        <tr bgcolor="#ffffff">
                            <td colspan="4" height="17">
                                ID：<%# Eval("ID") %>
                            </td>
                        </tr>
                        <tr bgcolor="#f6f6f6">
                            <td width="130" height="17">
                                广告（站点）名称：
                            </td>
                            <td width="271" height="17">
                                <a href='<%# Eval("Contact") %>' target="_blank">
                                    <%# Eval("UserName") %></a>
                            </td>
                            <td width="120" height="17">
                                站点URL：
                            </td>
                            <td width="218" height="17">
                                <%# Eval("Contact") %>
                            </td>
                        </tr>
                        <tr bgcolor="#ffffff">
                            <td width="130">
                                加入时间：
                            </td>
                            <td width="271">
                                <%# Eval("UpDateTime")%>
                            </td>
                            <td width="120">
                                打开窗口：
                            </td>
                            <td width="218">
                                <%# Eval("Target")%>
                            </td>
                        </tr>
                        <tr bgcolor="#f6f6f6">
                            <td width="130">
                                客户姓名：
                            </td>
                            <td width="271">
                                <%# Eval("UserName")%>
                            </td>
                            <td width="120">
                                客户联系方式：
                            </td>
                            <td width="218">
                                <%# Eval("Contact")%>
                            </td>
                        </tr>
                        <tr bgcolor="#ffffff">
                            <td width="130" bgcolor="#ffffff">
                                广告条宽度：
                            </td>
                            <td width="271">
                                <b>
                                    <%# Eval("Width")%>
                                </b>像素
                            </td>
                            <td width="120">
                                广告条高度：
                            </td>
                            <td width="218">
                                <b>
                                    <%# Eval("Height")%></b>像素
                            </td>
                        </tr>
                        <tr bgcolor="#f6f6f6">
                            <td width="130">
                                显示：
                            </td>
                            <td width="271">
                                <font color="red">
                                    <%# Eval("Show")%></font> 次
                            </td>
                            <td width="120">
                                点击：
                            </td>
                            <td width="218">
                                <font color="red">
                                    <%# Eval("Clicks")%></font> 次
                            </td>
                        </tr>
                        <tr bgcolor="#ffffff">
                            <td width="130">
                                失效条件：
                            </td>
                            <td width="271">
                                <%# TiaoJian(Eval("MaxClick"),Eval("MaxShowTime"),Eval("MaxDateTime")) %>
                            </td>
                            <td width="120">
                                提示文字
                            </td>
                            <td width="218">
                                <%# Eval("Note")%>
                            </td>
                        </tr>
                        <tr bgcolor="#f6f6f6">
                            <td width="130">
                                广告图片URL：
                            </td>
                            <td colspan="3">
                                <%# Eval("Ad_Url")%>
                            </td>
                        </tr>
                        <tr bgcolor="#ffffff">
                            <td>
                                备注：
                            </td>
                            <td colspan="3">
                                <%# Eval("Remark")%>
                            </td>
                        </tr>
                        <tr bgcolor="#f6f6f6">
                            <td>
                                &nbsp;
                            </td>
                            <td colspan="3">
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="Button1" runat="server" Enabled='<%# bo_Stop %>' CommandName="stop"
                                    Text='<%# Convert.ToBoolean(Eval("Stop"))==true?"启动":"暂停" %>' CssClass="btn">
                                </asp:Button>&nbsp;&nbsp;
                                <asp:Button ID="Button2" runat="server" Enabled='<%# bo_Stop %>' CommandName="Del"
                                    Text="删除" EnableViewState="False" CssClass="btn"></asp:Button>&nbsp;&nbsp;&nbsp;
                                <input onclick='window.location.href="Ads_Add.aspx?ID=<%# Eval("ID") %>"' type="button"
                                    value="修改" <%# bo_Edit==true?"":"disabled=disabled" %> class="btn">&nbsp;&nbsp;
                                <asp:Button ID="Button3" runat="server" CommandName="JS" Text="生成JS" CssClass="btn">
                                </asp:Button>&nbsp;&nbsp;&nbsp;
                                <input onclick='GetJS(<%# Eval("ID") %>)' type="button" value="代码" class="btn">
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList><asp:Label ID="show1" runat="server"></asp:Label>
            <div class="pagefield">
                <cc1:PageNavigation ID="PageNavigation1" runat="server" EnableViewState="true" OnPageChanging="PageNavigation1_PageChanging">
                </cc1:PageNavigation>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
