<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站管理后台</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>
</head>

<body>
	<div class="top-tips">
		<div class="tips-wrap">
			<div class="title">单页分类管理</div>
			如有使用上的疑问，请点此<a href="<?php echo IN_SYS;?>" target="_blank" style="color:#FF0000">获取帮助</a>
		</div>
	</div>

	<table class="table-list" cellpadding="1" cellspacing="1">
		<tr>
			<th>ID</th>
			<th>分类名称</th>
			<th>所属分类</th>
			<?php if(SITETYPE){?><th>所属分站</th><?php }?>

			<th>操作</th>
		</tr>
		<?php if($result){?>
		<?php foreach($result as $no => $r){?>
		<tr id="tr_<?php echo $r['typeid'];?>" <?php echo ($no%2)?'':'class="light"';?>>
			<td><?php echo $r['typeid'];?></td>
			<td><?php echo $r['name'];?></td>
			<td><?php echo $r['parentid']?page_typename($r['parentid']):'一级分类';?></td>
			<?php if(SITETYPE){?><td><?php echo $siteidobj->sitename($r['siteid']);?></td><?php }?>

			<td><?php if(!$r['parentid']){?><a href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=<?php echo $action;?>&parentid=<?php echo $r['typeid'];?>">下级分类</a> | <?php }?><a href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=<?php echo $action;?>&job=edit&id=<?php echo $r['typeid'];?>">编辑</a> | <a href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=<?php echo $action;?>&job=delete&id=<?php echo $r['typeid'];?>">删除</a></td>
		</tr>
		<?php }?>
		<tr class="page">
			<td colspan="5">
			<?php echo $pageobj->pagestring;?>
			</td>
		</tr>
		<?php }else{echo '<tr class="light"><td colspan="5">暂无数据</td></tr>';}?>
	</table>
</body>
</html>
