<%@ Page language="c#" Codebehind="Review.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Admin.Review" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Review</title>
		<LINK href="inc/style.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>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
<table width="100%" height="550" style="border:1px #619ADF solid; border-left:0;margin-top:6px; margin-right:7px;background:#F2F7FD;" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="tl"></td>
		<td class="tm"><span class="tt">留言/评论 &gt;&gt; <asp:Label ID="lbTitle" Runat="server">商品评论管理</asp:Label></span></td>
		<td class="tm2"><span class="tt"><a href="http://www.wangqi.com" target="_blank"><img src="Images/admin_help.gif" border="0" alt="帮助"></a></span></td>
		<td class="tr"></td>
	</tr>
</table>
</div>
<div class="mframe">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="tl"></td>
		<td class="tm"><div class="tt">&nbsp; 商品评论管理</div></td>
		<td class="tr"></td>
	</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#EBF3FE" valign="top" style=" border-right:1px #77ABE5 solid;">
<table width="90%"  cellspacing="0" cellpadding="0">
	<tr>
		<td class="ml1"></td>
		<td class="mm1">
			<table class="tableBorder" 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:datagrid id="dgReviews" runat="server" AllowPaging="True" PagerStyle-Mode="NumericPages"
							AutoGenerateColumns="False" DataKeyField="ReviewID" Width="100%" HorizontalAlign="Center"
							HeaderStyle-CssClass="summary-title">
							<HeaderStyle Font-Bold="True" CssClass="summary-title"></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>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="对应商品">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="70px"></ItemStyle>
									<ItemTemplate>
										<a href='../Show.aspx?PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>' target=_blank>
											<%# GetProductName(DataBinder.Eval(Container.DataItem, "ProductID").ToString()) %>
										</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="确定" HeaderText="回复" CancelText="取消" EditText="点击回复">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="55px"></ItemStyle>
								</asp:EditCommandColumn>
								<asp:TemplateColumn HeaderText="评论内容">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left"></ItemStyle>
									<ItemTemplate>
										<b>内容</b>：<%# DataBinder.Eval(Container.DataItem, "Body") %><br>
										<b>回复</b>：<%# DataBinder.Eval(Container.DataItem, "Reply") %>
									</ItemTemplate>
									<EditItemTemplate>
										<b>内容</b>：<br>
										<asp:TextBox ID="txtBody" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Body") %>' TextMode="MultiLine" Width="290px">
										</asp:TextBox><br>
										<b>回复</b>：<br>
										<asp:TextBox ID="txtReply" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Reply") %>' TextMode="MultiLine" Width="290px" Height="80px">
										</asp:TextBox><br>
										<asp:CheckBox ID="cbxSendEmail" Runat="server" Text='将回复结果发送到顾客的邮箱' Checked="True"></asp:CheckBox>
										<asp:CheckBox ID="cbxActive" Runat="server" Text='审批通过'></asp:CheckBox>
									</EditItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="用户名">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="180px"></ItemStyle>
									<ItemTemplate>
										使用名字：<%# DataBinder.Eval(Container.DataItem, "UserName") %><br>
										对应会员：<%# GetMemberName(DataBinder.Eval(Container.DataItem, "MemberID").ToString()) %><br>
										Email：<%# DataBinder.Eval(Container.DataItem, "Email") %>
										<%# 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, "Reply").ToString()) == "" ? "replyno.gif" : "replyyes.gif"%>' alt='<%# (DataBinder.Eval(Container.DataItem, "Reply").ToString()) == "" ? "未回复" : "已回复"%>'>
									</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>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
						</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>
