{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="review.php" name="list_form" id="list_form">
<div class="list-div" id="listDiv">
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
<tr>
<td height="36" class="BotNavBg">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td width="50" align="left" style="padding-left:10px;">
	<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label></td>
	<td style="padding-left:5px;">
		<select name="type_up" id="sel_action_up" onchange="change_action(this);">
		<option value="">请选择...</option>
		<option value="drop">删除</option>
		<option value="status">显示</option>
		<option value="not_status">隐藏</option>		
		</select>
	</td>
	<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
	</tr>
	</table>
</td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" class="list-table">
		<tr class="thead">
		<th align="left" width="3%" ><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" /> </th>
		<th width="10%" align="left">类型</th>
		<th width="45%" align="left">内容</th>
		<th width="6%" align="center"><a href="javascript:listTable.sort('is_reply'); "><font color="#FFFFFF">回复</font></a>{$sort_is_reply}</th>
		<th width="6%" align="center"><a href="javascript:listTable.sort('rating'); "><font color="#FFFFFF">评分</font></a>{$sort_rating}</th>
		<th width="5%" align="center"><a href="javascript:listTable.sort('status'); "><font color="#FFFFFF">显示</font></a>{$sort_status}</th>
		<th width="18%" align="center"><a href="javascript:listTable.sort('date_added'); "><font color="#FFFFFF">日期</font></a>{$sort_date_added}</th>
		<th width="9%" align="left">操作</th>
		</tr>
		{foreach from=$review_list item=list}
		<tr>
		<td><input type="checkbox" name="checkboxes[]" value="{$list.review_id}" /></td>
		<td align="left"><span>
		{if $list.type == 1}产品评论{elseif $list.type == 2}文章评论{elseif $list.type == 3}订单评论{/if}
		</span></td>
		<td align="left"><span title="{$list.content}">{$list.cut_content}</span></td>	
		<td align="center"><span>{if $list.is_reply == 0}否{else}是{/if}</span></td>
		<td align="center"><span>{$list.rating}</span></td>
		<td align="center"><img src="images/{if $list.status}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_status', {$list.review_id})" /></td>
		<td align="center"><span>{$list.date_added}</span></td>
		<td align="right" nowrap="true" class="operation">
		<a href="review.php?act=detail&id={$list.review_id}{$strpass}" title="详细" class="op_edit"></a>
		<a href="javascript:;" onclick="listTable.remove({$list.review_id}, '您确实要删除该评论吗?')" title="删除" class="op_del"></a>
		</td>
		</tr>
		{foreachelse}
		<tr><td class="no-records" colspan="16">没有记录</td></tr>
		{/foreach}
	</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td height="36" class="BotNavBg">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="50" align="left" style="padding-left:10px;">
			<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label>
			</td>
			<td style="padding-left:5px;">
				<input type="hidden" name="act" value="batch" />
				<input type="hidden" name="type" value="" id="type" />
				<select name="type_down" id="sel_action_down" onchange="change_action(this);">
				<option value="">请选择...</option>
				<option value="drop">删除</option>
				<option value="status">显示</option>
				<option value="not_status">隐藏</option>
				</select>
			</td>
			<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
		</tr>
		</table>
	</td>
  </tr>
</table>
{if $full_page}
</div>
<script type="text/javascript">
	listTable.recordCount = {$record_count};
	listTable.pageCount = {$page_count};
	{foreach from=$filter item=item key=key}
	listTable.filter.{$key} = '{$item}';
	{/foreach}
	{literal}

	function change_action(obj){
		var sel_val = $(obj).val();	
		$('#type').val(sel_val);

		if(sel_val == 'drop' && confirm("确认删除?")){
			$("#list_form").submit();	
		}else if(sel_val == 'not_status' && confirm("确认隐藏?")){
			$("#list_form").submit();	
		}else if(sel_val == 'status' && confirm("确认显示?")){
			$("#list_form").submit();	
		}
		return false;
	}

	function select_all(obj){
		$('.list-table :checkbox').prop("checked",$(obj).prop('checked'));
	}
{/literal}
</script>
</form>
{insert_scripts files="tab.js"}
{include file="page_footer.htm"}
{/if}