<?php if (!defined('APP_PATH')) exit;?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="http://127.0.0.5/Magic/Data/Public/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://127.0.0.5/Magic/Data/Public/js/jquery.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/main.js"></script>
</head>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="/">首页</a></li>
		<li><a href="#">模块管理</a></li>
		<li><a href="#">留言板</a></li>
	</ul>
</div>
<iframe name="blank" id="blank" style="display:none"></iframe>
<div class="rightinfo">
   <div class="formtitle1"><span>留言板列表</span></div>
   <iframe id="blank" name="blank"  style="display:none" ></iframe>
    <table class="tablelist">
		<thead>
    	<tr>
			<th width="150" align="center">ID</th>
			<th width="200" align="center">标题</th>
			<th width="100" align="center">留言人</th>
			<th width="100" align="center">联系电话</th>			
			<th align="center">留言内容</th>
			<th width="130" align="center">留言时间</th>
			<th width="80" align="center">状态</th>
			<th width="80" align="center">操作</th>
			</tr>
        </thead>
		<tbody>
			<?php if (empty($list)){ ?>
				<tr><td colspan="8" align="center" style="color:#f00">暂无记录!</td></tr>
			<?php }else{ ?>
			<?php foreach ($list as $vo){?>
			<tr>
				<td align="center"><?php echo $vo['id'];?></td>
				<td align="left"><a href="?r=guestbook-index-edit&id=<?php echo $vo['id'];?>"><?php echo $vo['title'];?></a></td>
				<td align="center"><?php echo $vo['name'];?></td>
				<td align="center"><?php echo $vo['tel'];?></td>
				<td align="center"><?php echo String::msubstr($vo['content'],20);?></td>
				<td align="center"><?php echo date('Y-m-d H:i:s',$vo['datetime']);?></td>
				<td align="center"><img src="http://127.0.0.5/Magic/Data/Public/images/ico-0<?php echo $vo['status'];?>.png" width="15" height="15"></td>
				<td align="center"><a href="?r=guestbook-index-edit&id=<?php echo $vo['id'];?>">编辑</a> | <a href="javascript:" onclick="confirms('留言删除后将无法恢复，请谨慎操作，确认删除？','?r=guestbook-index-del&id=<?php echo $vo['id'];?>')">删除</a></td>
			</tr>
			<?php }?>
			<?php }?>
			 </tbody>
		</table>
	<div class="pagin">
    	<div class="page"><?php echo $page;?></div>
    </div>
</div>
<script type="text/javascript">$('.tablelist tbody tr:odd').addClass('odd');</script>
</body>
</html>