<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="managepl.aspx.cs" Inherits="web.admin.managepl" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Review</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
			<script language="javascript">
			function CheckDelBox(box)    
			{
					for (var i=0;i<document.Form1.elements.length;i++)
				{
					var e = document.Form1.elements[i];
					if ( (e.type=='checkbox') )
					{
			            
							var o=e.name.lastIndexOf('deleteCheckbox');
			                
							if(o!=-1)
							{
								e.checked = box.checked;
							}
			        
					}
				}
			}
			</script>
					<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>
	</HEAD>
		<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form1" method="post" runat="server" onsubmit="Window_Load(0);">
<table width="100%" height="550" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td width="4%" height="30" class="tl"></td>
		      <td width="91%" class="tm"><span class="tt">评论/留言 &gt;&gt; 
                <asp:Label ID="lbTitle" Runat="server">店铺评论管理</asp:Label>&nbsp; <span style="color: #ff0033">
                    （说明：评论回复显示的是管理员的回复，管理员的回复在前台表现为编辑点评）</span></span></td>
		      <td width="0%" class="tm2"><span class="tt"></span></td>
		<td width="5%" class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> <br>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
              <td class="ml"><br>
              </td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
                  <tr>
                    <td bgcolor="#FFFFFF" valign="top" > 
                      <table width="95%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		<td class="mm1">
			<table cellSpacing="0" cellPadding="0" width="100%" align="center"
				border="0">
				<tr>
					<td height="23" class="forumRowHighlight">
						<asp:Button id="btnDelete" CssClass="btn1" runat="server" Text="删除评论"></asp:Button>
                        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="批量通过" />&nbsp;<br /> &nbsp;<br />
						<asp:datagrid id="dgReviews" runat="server" AllowPaging="True" PagerStyle-Mode="NumericPages"
							AutoGenerateColumns="False" DataKeyField="ReviewID" Width="100%" HorizontalAlign="Center"
							HeaderStyle-CssClass="summary-title" BorderColor="#E0E0E0" BorderWidth="1px" OnItemDataBound="dgReviews_ItemDataBound" >
							<HeaderStyle Font-Bold="True" CssClass="head" BackColor="#EDF6FF" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn>
									<HeaderTemplate>
										<input type="checkbox" id="checkDel" onClick="CheckDelBox(this)" />
									</HeaderTemplate>
									<ItemTemplate>
										<asp:CheckBox id="deleteCheckbox" runat="server" AutoPostBack="False"></asp:CheckBox>
                                       
									</ItemTemplate>
                                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
								</asp:TemplateColumn>
									<asp:TemplateColumn Visible="False">
								
									<ItemTemplate>
                                        <asp:Label ID="proid" runat="server" Text=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>></asp:Label>
									</ItemTemplate>
                                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                            Font-Underline="False" HorizontalAlign="Center" />
                                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                            Font-Underline="False" HorizontalAlign="Center" />
								</asp:TemplateColumn>
								<asp:TemplateColumn Visible="False">
								
									<ItemTemplate>
                                        <asp:TextBox ID="tb" runat="server" Text=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>></asp:TextBox>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="对应店铺">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="70px"></ItemStyle>
									<ItemTemplate>
										<a href='../company/company_<%# DataBinder.Eval(Container.DataItem, "ProductID") %>.html' target=_blank>
											<%# GetProductName(DataBinder.Eval(Container.DataItem, "ProductID").ToString()) %>
										</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:EditCommandColumn UpdateText="确定" HeaderText="回复" CancelText="取消" EditText="点击回复">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" ForeColor="#FF0033"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="55px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" ForeColor="#FF0033"></ItemStyle>
								</asp:EditCommandColumn>
							
								<asp:TemplateColumn HeaderText="评论内容">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="500px"></ItemStyle>
									<ItemTemplate>
										<b>标题</b>：<%# DataBinder.Eval(Container.DataItem, "UserName")%><br>
										
								  		<b>内容</b>：<%# DataBinder.Eval(Container.DataItem, "body") %><br>
									    <b>回复</b>：<%# gethf(DataBinder.Eval(Container.DataItem, "ReviewID").ToString())%><br>
									</ItemTemplate>
									<EditItemTemplate>
										<b>内容</b>：<br>
										<asp:TextBox ID="txtBody" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Body") %>' TextMode="MultiLine" Width="386px" Height="109px"></asp:TextBox><br>
										<b>回复</b>：<br>
										<asp:TextBox ID="txtReply" Runat="server" Text='' TextMode="MultiLine" Width="385px" Height="42px"></asp:TextBox><br>
									
										
									</EditItemTemplate>
								</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText="针对该评论的举报">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="180px"></ItemStyle>
									<ItemTemplate>
										
										<%# DataBinder.Eval(Container.DataItem, "jbcontent") %>
						               
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="用户名">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="180px"></ItemStyle>
									<ItemTemplate>
										
										对应会员：<%# GetMemberName(DataBinder.Eval(Container.DataItem, "MemberID").ToString()) %><br>
						                <%# GetScore(DataBinder.Eval(Container.DataItem, "Score").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="其它信息">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="120px"></ItemStyle>
									<ItemTemplate>
										时间：<%# DateTime.Parse(DataBinder.Eval(Container.DataItem, "AddTime").ToString()).ToString("yyyy-MM-dd") %><br>
										IP地址：<%# DataBinder.Eval(Container.DataItem, "IP") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="状态">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<img src='images/<%# (DataBinder.Eval(Container.DataItem, "Status").ToString()) == "0" ? "replyno.gif" : "replyyes.gif"%>' alt='<%# (DataBinder.Eval(Container.DataItem, "Status").ToString()) == "0" ? "未通过" : "已通过"%>'>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									CommandName="Delete">
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								</asp:ButtonColumn>
								   <asp:TemplateColumn HeaderText="验证">
                                      <ItemTemplate> 
                                      
                                     <%# DataBinder.Eval(Container.DataItem, "Status").ToString()=="1"?"<font color=FF0000>已通过</font>":"<a href='?rid="+DataBinder.Eval(Container.DataItem, "ReviewID") +"&mid="+DataBinder.Eval(Container.DataItem, "MemberID")+"'> 通过</a>"%>  
                                        
                                        </ItemTemplate>
                                      <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" HorizontalAlign="Center" Width="50px" /> 
                                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" HorizontalAlign="Center" Width="70px" /> 
                                    </asp:TemplateColumn>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                            <ItemStyle Height="25px" />
						</asp:datagrid>
					</td>
				</tr>
			</table>
		</td>
		<td class="mr1"></td>
	</tr>
</table>
                    </td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
		</form>
	</body>
</HTML>
