<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pop.aspx.cs" Inherits="webXabara_shop_pop" %>

<!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 id="Head1" runat="server">
    <title>管理店铺信息</title>
    <link href="../InClude/StyleSheet.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            margin: 8px 8px 0px 0px;
        }
    </style>
    <script src="/Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="/Scripts/tipswindow.js" type="text/javascript"></script>
    <script src="/Scripts/all.js" type="text/javascript"></script>
    <script type="text/javascript">
        function CheckAll(e, itemname) {
            var aa = document.getElementsByName(itemname);
            if (aa == undefined) return;
            for (var i = 0; i < aa.length; i++) aa[i].checked = e.checked;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="divWidth">
        <div class="titleBg">
            管理广告商品 
        &nbsp;<asp:TextBox ID="searchWord" runat="server" CssClass="inputText" Width="150px"></asp:TextBox>
&nbsp;<asp:Button ID="search" runat="server" CssClass="inputBottom" Text="搜索" 
                onclick="search_Click" />
        </div>
        <div class="height5px">
        </div>
        <div runat="server" id="listNews">
            <asp:Repeater ID="RepeaterList" runat="server">
            <HeaderTemplate>
                <table width="100%" class="tableLine">
                    <tr>
                        <td class="trTitleBG">
                            <input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'batDel')" />
                        </td>
                        <td class="trTitleBG">
                            关键字
                        </td>                        
                        <td class="trTitleBG">
                            效果图
                        </td>
                        <td class="trTitleBG">
                            价格
                        </td>
                        <td class="trTitleBG">
                            <a href="?sale=1">推广量</a>
                        </td>
                        <td class="trTitleBG">
                            更新时间
                        </td>
                        <td class="trTitleBG">
                            天数
                        </td>
                        <td class="trTitleBG">
                            服务时间
                        </td>
                    </tr>                    
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td style="text-align:center;"><input name="batDel" type="checkbox" value='<%# Eval("num_iid").ToString().Trim()%>' /></td>
                    <td><a href="/search.htm?keyWord=<%# Server.UrlEncode(Eval("keyWord").ToString().Trim()) %>" target="_blank"><%# Eval("keyWord").ToString().Trim() %></a></td>
                    <td style="text-align:center;" title="<%# Eval("title").ToString().Trim() %>">
                        <a href="<%# Eval("pic_url").ToString().Trim() %>" target="_blank"><img src="<%# Eval("pic_url").ToString().Trim()+ "_b.jpg" %>" style="height:100px;" /></a>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("price").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("volume").ToString().Trim()%>
                    </td>
                    <td style=" text-align:center;">
                        <%# !string.IsNullOrEmpty(Eval("updateDate").ToString() as string)?Convert.ToDateTime(Eval("updateDate")).ToString("yy-MM-dd"):""%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("buyDays").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                        <%# Convert.ToDateTime(Eval("adFrom")).ToString("yyyy-MM-dd HH:mm:ss")%><br /><%# Convert.ToDateTime(Eval("adTo")) < DateTime.Now ? "<span style=\"color:red;\">" + Convert.ToDateTime(Eval("adTo")).ToString("yyyy-MM-dd HH:mm:ss") + "</span>" : Convert.ToDateTime(Eval("adTo")).ToString("yyyy-MM-dd HH:mm:ss")%>
                    </td>                    
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr>
                    <td style="text-align:center; background-color: #E9F8FC;"><input name="batDel" type="checkbox" value='<%# Eval("num_iid").ToString().Trim()%>' /></td>
                    <td style="background-color: #E9F8FC;"><a href="/search.htm?keyWord=<%# Server.UrlEncode(Eval("keyWord").ToString().Trim()) %>" target="_blank"><%# Eval("keyWord").ToString().Trim() %></a></td>
                    <td style="background-color: #E9F8FC; text-align:center;" title="<%# Eval("title").ToString().Trim() %>">
                        <a href="<%# Eval("pic_url").ToString().Trim() %>" target="_blank"><img src="<%# Eval("pic_url").ToString().Trim()+ "_b.jpg" %>" style="height:100px;" /></a>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Eval("price").ToString().Trim()%>
                    </td>
                    <td style="text-align:center; background-color: #E9F8FC;">
                        <%# Eval("volume").ToString().Trim()%>
                    </td>
                    </td>
                    <td style=" text-align:center; background-color: #E9F8FC;">
                        <%# !string.IsNullOrEmpty(Eval("updateDate").ToString() as string)?Convert.ToDateTime(Eval("updateDate")).ToString("yy-MM-dd"):""%>
                    </td>
                    <td style="text-align:center; background-color: #E9F8FC;">
                        <%# Eval("buyDays").ToString().Trim()%>
                    </td>
                    <td style="text-align:center; background-color: #E9F8FC;">
                        <%# Convert.ToDateTime(Eval("adFrom")).ToString("yyyy-MM-dd HH:mm:ss")%><br /><%# Convert.ToDateTime(Eval("adTo")) < DateTime.Now ? "<span style=\"color:red;\">" + Convert.ToDateTime(Eval("adTo")).ToString("yyyy-MM-dd HH:mm:ss") + "</span>" : Convert.ToDateTime(Eval("adTo")).ToString("yyyy-MM-dd HH:mm:ss")%>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        </div>
        <div class="height5px">
        </div>
        <div id="errDiv" runat="server" class="tableAdminLine">
            <div style="height: 150px;">
            </div>
            <div style="text-align:center;">
                <asp:Label ID="errInfo" runat="server" ForeColor="#FF3300"></asp:Label></div>
            <div style="height: 150px;">
            </div>
        </div>
        <div class="height10px">
        </div>
        <div class="tableAdminLine" style="padding: 5px;" id="checkDiv" runat="server">
            <div style="text-align: center; height: 36px; line-height: 36px; background-color: White;">
                全选<input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'batDel')" />
                &nbsp;<asp:Button 
                    ID="del" runat="server" Text="删除" CssClass="inputBottom" 
                    CausesValidation="False" onclick="del_Click" />&nbsp;<asp:Button 
                    ID="checkPOP" runat="server" Text="自动检查无效状态" CssClass="inputBottom" 
                    CausesValidation="False" onclick="checkPOP_Click" /></div>
        </div>
        <div class="height10px">
        </div>
        <div>
            <a name="foot" id="foot"></a><asp:Literal ID="lblCurrentPage" runat="server"></asp:Literal>
        </div>
    </div>
    </form>
</body>
</html>