<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="comment.aspx.cs" Inherits="Maticsoft.Web.Admin.comment.comment"  MasterPageFile="~/MasterPage.master" ValidateRequest="false" EnableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script src="../../js/Common.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
   function showBtype()
	{
	var strUrl="../B/ajax/showB1.aspx?paperName="+escape(document.getElementById("<%=DropDownList1.ClientID %>").value);
		Ajaxs.GET(strUrl,showtypeexist);
		
	}
	function showtypeexist(req)
	{
		var text = req.responseText;
	
		var d = text.split(',');
		
		document.getElementById("<%=DropDownList2.ClientID %>").options.length=0;
        document.getElementById("<%=DropDownList2.ClientID %>").options.add(new Option("全部","全部"));
	
		for (i=0;i<d.length;i++)
		{
		if(d[i]!=""){
		document.getElementById("<%=DropDownList2.ClientID %>").options.add(new Option( d[i],d[i]));
		}
		
		}
		document.getElementById("<%=HiddenField1.ClientID %>").value=document.getElementById("<%=DropDownList2.ClientID %>").value;
	
	}
	function changeqnum()
	{
	document.getElementById("<%=HiddenField1.ClientID %>").value=document.getElementById("<%=DropDownList2.ClientID %>").value;
	}
    </script>

    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1">
        <tr>
            <td>
                <fieldset>
                    <legend class="tt1">评论管理</legend>
                    <table>
                        <tr>
                            <td>
                                所属报纸:
                            </td>
                            <td>
                                <asp:DropDownList ID="DropDownList1" runat="server" onchange="showBtype()">
                                </asp:DropDownList>
                            </td>
                            <td>
                                所属期号:
                            </td>
                            <td>
                                <asp:DropDownList ID="DropDownList2" runat="server" onchange="changeqnum()">
                                </asp:DropDownList>
                            </td>
                            <td>
                                <asp:Button ID="Button1" runat="server" CssClass="button2" Text="查询" OnClick="Button1_Click" />
                            </td>
                            <td>
                                &nbsp;&nbsp;&nbsp;
                                <asp:Button ID="Button2" runat="server" CssClass="button22" Text="删除该报该期所有评论" ForeColor="Red"
                                    OnClick="Button2_Click" OnClientClick="return window.confirm('确定要删除满足条件的评论吗?')" />
                            </td>
                        </tr>
                    </table>
                    <div id="List" runat="server">
                    </div>
                    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1">
                        <tr>
                            <td height="50" valign="middle" align="center">
                                <div id="CopyrightInfo" runat="server">
                                </div>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">
function Del(id)
{
    if(confirm('你确认删除此评论吗?'))
    {
        self.location="?Action=Del&ID="+id;
    }
}

 function delAll() {
   if(confirm('你确认删除所选评论吗?'))
    {
    var ids="";
    for (var i = 0; i < document.getElementsByName("selectFlag").length; i++) {
     if(document.getElementsByName("selectFlag")[i].checked){
     ids+=document.getElementsByName("selectFlag")[i].value+",";
     }
     }
     ids=ids.substring(0,(ids.length-1))
     self.location="?Action=Dels&ID="+ids;
   
        
    }
  
 }

    </script>

    <asp:HiddenField ID="HiddenField1" runat="server" />
    <asp:HiddenField ID="HiddenField_select" runat="server" />
</asp:Content>
