<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>友情链接管理</title>
<LINK href="<?=base_url()?>csdj/admin/images/admin.css" type="text/css" rel="stylesheet">
<SCRIPT type="text/javascript" src="<?=base_url()?>csdj/admin/js/admin.js"></script>
<script type="text/javascript" src="<?=base_url()?>csdj/admin/js/ajaxrequest.js"></script>
</head>
<BODY style="margin:2px">
<table align="center" border="1" cellspacing="0" cellpadding="5" bordercolor="#C4DFF4" width="950" style="border-collapse:collapse;"><tr><td align="center" colspan=5 class=title>友情链接管理 ｜ <a title="添加链接" href="<?=site_url('admin/link/add/')?>">添加链接</a></td></tr><tr>
<td width="35%" align="center">网站名称</td>
<td width="20%" align="center">LOGO</td>
<td width="10%" align="center">类型</td>
<td width="10%" align="center">状态</td>
<td width="20%" align="center">操作</td>
</tr>
<?php
 if(empty($link)) echo '<tr align="center"><td colspan="5" align="center">当前没有记录!</td></tr>';
 foreach ($link as $row) { 
?>
	<tr>
		<td align="center"><a href="<?=$row->CS_Url?>" target="_blank"><?=$row->CS_Name?></a></td>
		<td align="center">
<?php
if(empty($row->CS_Pic)){
       echo '--';
}else{
       echo '<img src="'.$row->CS_Pic.'" width="88" Height="31">';
}
?>

                </td>
		<td align="center"><?php if($row->CS_CID==1){echo '文字';}else{echo '图片';}?></td>
		<td align="center" id="sh<?=$row->CS_ID?>">
<?php
if($row->CS_YID==1){
	echo '<a href="javascript:;" title="点击显示" onClick="linksh(\''.site_url('admin/ajax/linksh/').'\','.$row->CS_YID.','.$row->CS_ID.');return false">×</a>';
}else{
	echo '<a href="javascript:;" title="点击隐藏" onClick="linksh(\''.site_url('admin/ajax/linksh/').'\','.$row->CS_YID.','.$row->CS_ID.');return false">√</a>';
}
?>
		</td>
		<td align="center">
			<a href="<?=site_url('admin/link/edit/'.$row->CS_ID)?>">编辑</a> ｜
			<a href="<?=site_url('admin/link/del/'.$row->CS_ID)?>" onClick="return confirm('确定删除此内容吗?');">删除</a>
		</td>
	</tr>
<?php } ?>

<tr><td colspan="5" align="center">&nbsp;链接：<?=$nums?>个&nbsp;&nbsp;&nbsp;&nbsp;<?=$pages?></td></tr>
</table>
</body>
</html>

