<{include file="index/header.html"}> 
<div class="nav">
	<span>用户留言</span> 
</div>
<div class="main"> 
	<table width="100%" class="ltable">
	  	<thead>
		  	<tr>
				<th width="80">ID</th>
				<th width="100">用户</th> 
				<th>留言信息</th> 
				<th width="60">状态</th> 
				<th width="60">操作</th>
				<th width="110">时间</th>
		  	</tr>
	  	</thead>
		<{if $data.list}>		
			<tbody> 
				<{foreach item=i from=$data.list}>
					<tr>
						<td><{$i.comment_id}></td>
						<td><a href="admin.php?m=user&a=enter&uid=<{$i.uid}>" target="_blank"><{$i.nick}></a></td> 
						<td>
							<{$i.content}> 
							<span class="ttl"><a href="?m=article&a=show&id=<{$i.id}>" target="_blank"><{$i.title}></a></span>
						</td> 
						<td><a href="javascript:;" class="pass" msg_id="<{$i.comment_id}>"><img src="public/images/status_<{$i.pass}>.gif"/></a></td>  
						<td><a href="admin.php?m=article&a=comment_del&id=<{$i.comment_id}>">删除</a></td>
						<td><{$i.addtime|date_format:'%Y-%m-%d %H:%M'}>'</td>
					</tr>
				<{/foreach}>
			</tbody>
		<{else}>
	  		<tr><td colspan="6"><div class="nomsg">暂无数据</div></td></tr>
		<{/if}> 
	</table>
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}>
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript">
$(function(){
	$(".pass").click(function(){
		$this = $(this);
		var id = $this.attr('msg_id');
		$.post('admin.php?m=article&a=ajax_comment_pass',{id:id},function(data){ 
			$('img',$this).attr('src','public/images/status_'+data+'.gif');
		});  
	});
	
});
</script>