<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true" CodeBehind="AdList.aspx.cs"
    Inherits="ETongJin.Search.Web.Admin.AdList" %>
<script runat="server">
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
    }
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  <script type="text/javascript">
function CheckAll(obj)
{
var allcheck = document.getElementsByName("id");
for(i=0;i<allcheck.length;i++)
{
allcheck[i].checked = obj.checked;
}
}
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <table class="tableBorder" border="0" cellpadding="3" cellspacing="1" id="demo_table">
    <tr>
      <th colspan="6"> 广告管理 </th>
    </tr>
    <tr>
      <td colspan="6" class="date"><div class="dateinput">筛选：
          <asp:DropDownList 
              ID="DropDownList1" runat="server" AutoPostBack="True" 
              onselectedindexchanged="DropDownList1_SelectedIndexChanged1">
            <asp:ListItem Value="-1">排序方式</asp:ListItem>
            <asp:ListItem Value="1">正在投放</asp:ListItem>
            <asp:ListItem Value="2">已审核，广告主暂停</asp:ListItem>
            <asp:ListItem Value="3">广告主申请投放</asp:ListItem>
            <asp:ListItem Value="4">未审核，广告主暂停</asp:ListItem>
          </asp:DropDownList>
          &nbsp;&nbsp;搜索：
          <asp:DropDownList ID="DropListSearch" runat="server" onselectedindexchanged="DropListSearch_SelectedIndexChanged">
            <asp:ListItem Value="0">广告主</asp:ListItem>
            <asp:ListItem Value="1">关键词</asp:ListItem>
          </asp:DropDownList>
          <asp:TextBox ID="TextBoxValue" runat="server" CssClass="ym12_input2"></asp:TextBox>
          <asp:Button ID="btnSearch" runat="server" Text="搜索" onclick="btnSearch_Click" CssClass="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" />
        </div></td>
    </tr>
    <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand" OnItemDataBound="Repeater1_ItemDataBound">
      <HeaderTemplate>
        <tr align="center">
          <td width="5%" class="td2">选中</td>
          <td width="9%" class="td2"> 广告主 </td>
          <td width="25%" class="td2"> 广告标题 </td>
          <td class="td2"> 关键词 </td>
          <td width="18%" class="td2"> 广告状态 </td>
          <td width="8%" class="td2"> 相关操作 </td>
        </tr>
      </HeaderTemplate>
      <ItemTemplate>
        <tr align="center">
          <td><input id="Checkbox1" type="checkbox" name="id" value="<%#Eval("id") %>" />
            <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("id") %>' />
          </td>
          <td><asp:HyperLink ID="HyperLink2" NavigateUrl='<%#"AdList.aspx?username="+Eval("username") %>' runat="server" Text='<%#Eval("username") %>'></asp:HyperLink>
          </td>
          <td class="td4"><a href="<%#Eval("url") %>" target="_blank"> <%#Eval("title")%></a> </td>
          <td class="td4"><asp:HyperLink ID="hlKeyWord" NavigateUrl='<%#Eval("searchtype") %>' runat="server" Target="_blank" Text='<%#Eval("keyword") %>'></asp:HyperLink>
          </td>
          <td><asp:Label ID="lbPosition" runat="server" Text='<%#Eval("adstatus") %>'></asp:Label></td>
          <td><asp:HyperLink ID="HyperLink1" NavigateUrl='<%#"ad.aspx?i="+Eval("id") %>' runat="server">修改</asp:HyperLink>
            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="2" CausesValidation="false" OnClientClick="return confirm('您将删除这个广告!!?删除后不可恢复');">删除</asp:LinkButton>
          </td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
    <tr>
      <td colspan="6" class="td2"><div id="tnt_pagination"><%= PageStr%></div></td>
    </tr>
    <tr>
      <td class="td3"><input id="Checkbox1" type="checkbox" name="chkAll" onclick="CheckAll(this);" /></td>
      <td colspan="5" class="td5"><asp:Button ID="Button1" runat="server" Text="批量删除" OnClientClick="return confirm('您确定删除选中的记录么?删除后不可恢复');" OnClick="Button1_Click" CssClass="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" />
    </tr>
  </table>
  <script language="JavaScript">
	tigra_tables('demo_table', 3, 2, '#ffffff', '#F8F8F8', '#F1F3F5', '#71ADDA');
</script>
</asp:Content>
