<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_Other_ReportList, QianboCMS" EnableEventValidation="false" %>
<%@ Import Namespace="Qianbo.Common" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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/layout.css" type="text/css" rel="Stylesheet" />
<script type="text/javascript" src="../../Js/Common.js"></script>
<script type="text/javascript">
function SelectAll()
{
    var s = $("tbReport").getElementsByTagName("input")
    for(var i=0;i<s.length;i++)
    {
        if(s[i].type=="checkbox")
        {
            s[i].checked=$("cbAll").checked;
        }
    }
}
function CheckSelected()
{
    var s = $("tbReport").getElementsByTagName("input")
    var flag = false;
    for(var i=0;i<s.length;i++)
    {
        if(s[i].type=="checkbox"&&s[i].checked)
        {
            flag = true;
        }
    }
    if(!flag)
    {
        alert('请选择需要删除的举报记录！');
        return false;
    }
    else
    {
        return confirm('是否确定删除所选择的举报记录？');
    }
}
</script>
</head>

<body>
<form id="form1" runat="server">
  <table align="center" cellpadding="0" cellspacing="1" class="wzdh" width="99%">
    <tr>
      <td style="padding-left: 10px;"><img src="../Images/Skin/Default/you.gif" align="absmiddle" /> 您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; 举报管理</td>
    </tr>
  </table>
  <table cellpadding="0" cellspacing="1" class="border" align="center" width="99%">
    <tr class="wzlist">
      <td><a href="ReportList.aspx">所有</a> | <a href="ReportList.aspx?Type=0">未处理</a> | <a href="ReportList.aspx?Type=1">已处理</a> | <a href="ReportList.aspx?Type=2">已关闭</a></td>
    </tr>
  </table>
  <table cellpadding="0" cellspacing="1" class="border" align="center" id="tbReport">
    <asp:Repeater ID="repReport" runat="server" OnItemCommand="repReport_ItemCommand">
      <HeaderTemplate>
        <tr class="title">
          <td width="30px">选择</td>
          <td width="30px">编号</td>
          <td width="22%">举报内容</td>
          <td>链接地址</td>
          <td width="60px">状态</td>
          <td width="120px">举报用户</td>
          <td width="180px">举报时间</td>
          <td width="180px">操作</td>
        </tr>
      </HeaderTemplate>
      <ItemTemplate>
        <tr class="tdbg" onmouseover="this.className='tdbgmouseover'" onmouseout="this.className='tdbg'">
          <td><asp:CheckBox ID="chk" runat="server" /></td>
          <td><asp:Literal ID="litId" runat="server" Text='<%# Eval("ReportId")%>'></asp:Literal></td>
          <td align="left"><%# Function.HtmlEncode(Eval("Content"))%></td>
          <td align="left"><a href='<%# Eval("Url")%>' target="_blank"><%# Eval("Url")%></a></td>
          <td><%# GetStatus(Eval("IsComplete"))%></td>
          <td><%# Eval("UserName")%></td>
          <td><%# Eval("AddTime","{0:d}")%></td>
          <td><asp:LinkButton ID="Set" runat="server" CommandName="set" Enabled='<%# GetEnabled(Eval("IsComplete"))%>' CommandArgument='<%# Eval("ReportId")%>' Text="处理" /> | <asp:LinkButton ID="Close" runat="server" CommandName="close" Enabled='<%# GetEnabled(Eval("IsComplete"))%>' CommandArgument='<%# Eval("ReportId")%>' Text="关闭" /> | <asp:LinkButton ID="Delete" runat="server" CommandName="delete" CommandArgument='<%# Eval("ReportId")%>' Text="删除" OnClientClick="return confirm('是否确定删除该举报信息？')" /></td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
  </table>
  <table cellpadding="0" cellspacing="1" class="border" align="center" width="99%">
    <tr class="wzlist">
      <td><input type="checkbox" id="cbAll" onclick="SelectAll()" />
        <label for="cbAll">全选该页</label>
        <asp:Button ID="btnDelete" runat="server" Text="批量删除" CssClass="btn" OnClientClick="return CheckSelected();" OnClick="btnDelete_Click" /></td>
    </tr>
  </table>
</form>
<table cellpadding="0" cellspacing="1" class="border" align="center" width="99%">
  <tr class="wzlist">
    <td><webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PageSize="20" HorizontalAlign="Right" PrevPageText="上一页" ShowInputBox="Never" UrlPageIndexName="p" UrlPaging="True" ShowCustomInfoSection="Left" Width="99%" LayoutType="Table" CustomInfoSectionWidth="10%"></webdiyer:AspNetPager></td>
  </tr>
</table>
</body>
</html>