<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true" CodeBehind="SearchRecord.aspx.cs"
    Inherits="ETongJin.Search.Web.Admin.SearchRecord" %>
<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="5">行业搜索日志 </th>
    </tr>
    <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand" 
          onitemdatabound="Repeater1_ItemDataBound">
      <HeaderTemplate>
        <tr align="center">
          <td width="5%" class="td1">&nbsp;</td>
          <td class="td1"> 关键词 </td>
          <td width="25%" class="td1"> IP </td>
          <td width="18%" class="td1"> 添加时间 </td>
          <td width="20%" class="td1"> 相关操作 </td>
        </tr>
      </HeaderTemplate>
      <ItemTemplate>
        <tr style="text-align:center;">
          <td><input id="Checkbox1" type="checkbox" name="id" value="<%#Eval("id") %>" />
          </td>
          <td class="td4"><a href="/s/?wd=<%#Eval("keyword") %>" target="_blank"> <%#Eval("keyword")%></a>
            <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("id") %>' />
            <input id="HiddenIP"  type="hidden" runat="server" value='<%#Eval("IP") %>' />
          </td>
          <td><%#Eval("IP") %>&nbsp;&nbsp;
          <asp:LinkButton ID="LinkButton1" CommandArgument="2" runat="server"  CausesValidation="false" OnClientClick="return confirm('您将此IP加入IP黑名单!此操作将不记录此IP的搜索日志');">加入IP黑名单</asp:LinkButton>

           </td>
          <td><%#Eval("addtime") %> </td>
          <td><a href='wd.aspx?k=<%#HttpUtility.UrlEncode( Eval("keyword").ToString(),Encoding.Default) %>'> 加入相关关键词</a>
            <asp:LinkButton ID="LinkButton2" CommandArgument="1" runat="server" CausesValidation="false" OnClientClick="return confirm('您将删除这条记录!!?删除后不可恢复');">删除</asp:LinkButton>
          </td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
    <tr>
      <td colspan="5" class="td3"><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="4" 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'" />
        <asp:Button ID="Button2" runat="server" Text="全部删除" OnClientClick="return confirm('您确定删除选中的记录么?删除后不可恢复');" CssClass="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" onclick="Button2_Click" />
      </td>
    </tr>
  </table>
  <script language="JavaScript">
	tigra_tables('demo_table', 2, 2, '#ecfbd4', '#ffffff', '#e5f1f4', '#bce774');
</script>
</asp:Content>
