<%@ page language="C#" autoeventwireup="true" inherits="admin_comment, Fm.Web" %>

<%@ Register Src="../controls/FormPaging_Rep.ascx" TagName="FormPaging_Rep" TagPrefix="uc1" %>

<!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="../images/css/inbox.css" rel="stylesheet" type="text/css" />
      <script language="javascript">
    function Check(che)
    {
        var gv=document.getElementById("tabdocument");
        for(var i=1;i<gv.rows.length-1;i++)
        {
            gv.rows[i].cells[0].getElementsByTagName("input")[0].checked=che.checked; 
        }
    }
    function Ok()
    {
        var docid=document.getElementById("txtdocid").value;
        if(docid=="")
        {
            alert("请输入想要删除的文章ID!");
            return false;
        }
        else if(!/^[0-9]*$/.test(docid))
        {
            alert("文章ID只允许为数字!");
            return false;
        }
        else
        {
            return true;
        }
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 98%" id="tabdocument"  class=Ibx_gTable_Con>
            <tr>
                <td colspan="2">
                    <asp:Button ID="Button1" runat="server" OnClientClick="return confirm('确认删除所选评论吗?')" OnClick="Button1_Click" Text="按所选删除" /></td>
                <td colspan="2">
                    <asp:TextBox ID="txtdocid" runat="server" Width="100px"></asp:TextBox>
                    <asp:Button ID="Button2" runat="server" Text="按输入的文章ID删除" OnClientClick="return Ok()" OnClick="Button2_Click" /></td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td width=8%>
                    <input id="Check_all" onclick="Check(this)" type="checkbox" />选择</td>
                <td width=28%>
                    所属文章</td>
                <td width=18%>
                    评论人</td>
                <td width=18%>
                    评论时间</td>
                <td width=18%>
                    评论IP</td>
                <td width=8%>
                    文章ID</td>
            </tr>
                <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
            <tr>
                <td>
                <asp:CheckBox ID="Check_Select" runat="server" ToolTip='<%#Eval("comid") %>' />
                </td>
                <td>
                <%#Eval("title") %>
                </td>
                <td>
                <%#Eval("username") %>
                </td>
                <td>
                <%#Eval("writetime") %>
                </td>
                <td>
                <%#Eval("ip") %>
                </td>
                <td>
                <%#Eval("docid") %>
                </td>
            </tr>
            </ItemTemplate>
                </asp:Repeater>
            <tr>
                <td align="center" colspan="6">
                    <uc1:FormPaging_Rep ID="FormPaging_Rep1" runat="server" />
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
