<% 
    //-----------------------------------------------------------
    // 文件名称: Advertisement_Ads_Manage.aspx
    // 页面名称: 广告
    //
    // 描    述:
    //
    // 
    // 修改标识: Mod By 钟治宇 2008-11-11 
    //  　添加　两个LinkButton　标签　　
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Advertisement_Ads_Manage, V5Shop.Shop.Advertisement" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!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/css.css" rel="stylesheet" type="text/css">
    <link href="css/css_list.css" rel="stylesheet" type="text/css">
    <link href="css/control.css" rel="stylesheet" type="text/css">

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

    <script type="text/javascript" language="javascript" src="Js/Control_Calendar.js"></script>

    <div id='dhtmltooltip'>
        <img src="" /></div>

    <script language="javascript" src="js/showimg.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="ManageHeader1" runat="server" />
            <div id="searcharea">
                <asp:Label ID="lblCategory" runat="server" Text="广告分类："></asp:Label>
                <asp:DropDownList ID="ddlCategory" runat="server">
                </asp:DropDownList>
                <asp:Label ID="lblName" runat="server" Text="广告名称："></asp:Label>
                <asp:TextBox ID="txtName" Width="100px" runat="server"></asp:TextBox>
                <asp:Label ID="lblAdsType" runat="server" Text="广告类型："></asp:Label>
                <asp:DropDownList ID="ddlAdsType" runat="server">
                </asp:DropDownList>
                <asp:Label ID="lblIsAct" runat="server" Text="是否开启："></asp:Label>
                <asp:DropDownList ID="ddlIsAct" runat="server">
                    <asp:ListItem Value="">全部</asp:ListItem>
                    <asp:ListItem Value="1">已开启</asp:ListItem>
                    <asp:ListItem Value="0">未开启</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" meta:resourcekey="btnSearchResource1"
                    class="button" />
            </div>
            <div id="content">
                <div id="tool">
                    <input class="checkbox" type="checkbox" id="CheckAllBox" onclick="CheckAll()" runat="server" />
                    全选
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" OnClick="btnAdd_Click"><img src="images/icon/key_add.gif" /> 添加</asp:LinkButton>
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" OnClick="btnEdit_Click"
                        OnClientClick="return CheckEdit()"><img src="images/icon/key_edit.gif" /> 编辑</asp:LinkButton>
                    <asp:LinkButton ID="btnDel" runat="server" ForeColor="#4B6888" OnClick="btnDel_Click"
                        OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" /> 删除</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton1" runat="server" ForeColor="#4B6888" OnClientClick="return GetAdsCode()"><img src="images/icon/key_code.gif" /> 广告调用代码</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton2" runat="server" ForeColor="#4B6888" OnClientClick="return GetAdsView()"><img src="images/icon/key_show.gif" /> 广告预览</asp:LinkButton>
                    <!--2008-11-11         　          -->
                    &nbsp;<asp:LinkButton ID="LinkButton3" runat="server" ForeColor="#4B6888" OnClick="LinkButton3_Click1"
                        OnClientClick="return CheckEditAll('GridViewShow')"><img src="images/icon/key_code.gif" /> 开启</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton4" runat="server" ForeColor="#4B6888" OnClientClick="return CheckEditAll('GridViewShow')"
                        OnClick="LinkButton4_Click"><img src="images/icon/key_show.gif" />关闭</asp:LinkButton></div>
                <div class="listborder">
                    <V5Shop:V5ShopGridView ID="GridViewShow" runat="server" meta:resourcekey="GridViewShowResource1"
                        AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist"
                        HeaderStyle-Height="18px" HeaderStyle-ForeColor="#000" EmptyDataText="没有查询到任何记录"
                        TableName="Ads" DataKeyNames="ID">
                        <Columns>
                            <asp:TemplateField>
                                <itemstyle horizontalalign="Center" width="5%" />
                                <itemtemplate>
                                <input class="checkbox" runat="server" value='<%# Eval("Mark") %>' id="CheckBoxID" type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Name" SortExpression="Name" HeaderText="广告名称">
                                <itemstyle width="15%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="预览">
                                <itemstyle horizontalalign="Left" width="5%" />
                                <itemtemplate>
                                <img alt = "" src="images/icon-viewpic.gif" onmouseover="javascript:ddrivetip('<img src=../template/<%=path %>/<%#Eval("QueryArray").ToString().Split(',')[0]%> width=100>','#ffffff',100)" onmouseout="hideddrivetip()" />
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CateName" SortExpression="CategoryID" HeaderText="广告分类">
                                <itemstyle width="10%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="AdsType" SortExpression="AdsType" HeaderText="广告类型">
                                <itemstyle width="10%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="StartDate" SortExpression="StartDate" HeaderText="开启时间">
                                <itemstyle width="15%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="EndDate" SortExpression="EndDate" HeaderText="结束时间">
                                <itemstyle width="15%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Hits" SortExpression="Hits" HeaderText="点击数">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="是否开启">
                                <itemstyle horizontalalign="Center" width="6%" />
                                <itemtemplate>
                                <%#IsOpen(Eval("IsAct").ToString())%>
</itemtemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                        <HeaderStyle CssClass="category" ForeColor="#000000" Height="18px" />
                    </V5Shop:V5ShopGridView>
                </div>
            </div>
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
    </form>
</body>
</html>
