<?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="tools">
		<ul class="toolbar">
			<li><a href="?r=links-index-edit"><span><img src="http://127.0.0.5/Magic/Data/Public/images/t01.png" /></span>添加友链</a></li>
		</ul>
    </div> 
   <div class="formtitle1"><span>友链列表</span></div>
    <table class="tablelist">
		<thead>
    	<tr>
			<th width="100" align="center">ID</th>
			<th width="150" align="center">网站名称</th>
			<th width="250" align="center">网址</th>
			<th width="150" align="center">添加时间</th>
			<th align="center">备注</th>
			<th width="80" align="center">审核</th>
			<th width="100" align="center">操作</th>
			</tr>
        </thead>
		<tbody>
			<?php if (empty($links)){ ?>
				<tr><td colspan="8" align="center" style="color:#f00">暂无记录!</td></tr>
			<?php }else{ ?>
			<?php foreach ($links as $vo){?>
			<tr>
				<td align="center"><?php echo $vo['id'];?></td>
				<td align="center"><?php echo $vo['title'];?></td>
				<td align="center"><?php echo $vo['url'];?></td>
				<td align="center"><?php echo $vo['pubtime'];?></td>
				<td align="left"><?php echo String::msubstr($vo['note'],100);?></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=links-index-edit&id=<?php echo $vo['id'];?>">编辑</a> | 
				<a href="javascript:"  onclick="confirms('友链删除后将无法恢复，<br>请谨慎操作，确认删除？','?r=links-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>
