<{import file="index/header.html"}> 
<style type="text/css">
a.avatar{ width:100%; margin-top:5px; float:left; }
a.avatar img{ width:35px; height:35px; border-radius:35px; }
</style>
<div class="nav"><span>订单评价</span></div>
<div class="filter"> 
	<input type="button" name="del_checked" class="del_ck button" value="删除选项"/> 
	<a href="<{$__ADMIN__}>goods_order/comment" class="<{if $smarty.get.status == ''}>option_ch<{else}>option<{/if}>">全部</a>
	<a href="<{$__ADMIN__}>goods_order/comment?status=1" class="<{if $smarty.get.status == '1'}>option_ch<{else}>option<{/if}>">通过</a>
	<a href="<{$__ADMIN__}>goods_order/comment?status=0" class="<{if $smarty.get.status == '0'}>option_ch<{else}>option<{/if}>">屏蔽</a>
</div>
<div class="main"> 
	<table class="ltable">
	  	<thead>
		  	<tr>
				<th width="30"><input type="checkbox" class="checked_all"/></th> 
				<th width="50">会员</th> 
				<th>评论内容</th> 
				<th width="50">查看</th> 
				<th width="120">评分</th> 
				<th width="60">状态</th>
				<th width="40">编辑</th>
				<th width="110">时间</th> 
		  	</tr>
	  	</thead>
		<tbody>
			<{if $data.list}>
				<{foreach item=i from=$data.list}>
					<tr> 
						<td><input name="key_id[]" type="checkbox" value="<{$i.id}>" class="checked_list"/></td>
						<td valign="top"><a href="javascritp::" class="avatar"><img src="<{if $i.avatar}><{$__IMG__}><{$i.avatar|img_size:35x35}><{else}><{$__PUBLIC__}>images/avatar.png<{/if}>"></a></td> 
						<td>
							<div class="c_con"><{$i.content}></div>
							<div class="c_img">
								<{if $i.images}>
									<{foreach item=ii from=$i.images}>
										<a href="<{$__IMG__}><{$ii}>" target="_blank"><img src="<{$__IMG__}><{$ii|img_size:30x30}>"/></a>
									<{/foreach}>
								<{/if}>
							</div>
						</td> 
						<td><a href="<{$__URI__}>goods/<{$i.gid}><{$__HTML__}>" target="_blank">查看</a></td>
						<td><span class="star" data-score="<{$i.score}>"></span></td>
						<td><input type="checkbox" name="status" class="type2 offline" data-id="<{$i.id}>" <{if $i.status == '1'}>checked="checked"<{/if}>/></td>
						<td><a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a></td>
						<td><{$i.addtime}></td>
					</tr>
				<{/foreach}>
			<{else}>
				<tr><td colspan="7">还没有数据，赶快添加吧！</td></tr>
			<{/if}> 
		</tbody> 
	</table> 
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}>
</div>
<{import file="index/footer.html"}> 
<script type="text/javascript" src="<{$__PUBLIC__}>plug/raty/jquery.raty.js"></script>
<script type="text/javascript">
_delete('<{$__ADMIN__}>goods_order/comment_del', '.del_ck');
function edit_con(name,url){
	parent.dialog(name, url, 600, 260); 
} 
$(function(){
	$("input.offline").click(function(){
		id = $(this).attr('data-id');
		$.post('<{$__ADMIN__}>goods_order/comment_status?id='+id, function(result){ 
			data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				$.alert('操作成功'); 
			}else{
				alert(data.msg);
			}
		}); 
	});
}); 
$(function(){
	$('span.star').raty({
	  	score: function() {
			return $(this).attr('data-score');
	  	},iconRange: [
			{ range: 1, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 2, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 3, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 4, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 5, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' }
	  	],readOnly: true
	});
}); 
</script>