<{include file="index/header.html"}>
<div class="nav"><span>动态分类</span></div>
<div class="filter"> 
	<a href="javascript:;" onClick="cats_edit('添加分类','?m=news&a=cats_edit')" class="add">添加分类</a> 
</div>
<div class="main"> 
	<table class="ltable">
	  	<thead>
		  	<tr>
				<th>名称</td> 
				<th width="100">别名</th>
				<th width="50">排序</th>
				<th width="60">状态</th>
				<th width="130">操作</th>
				<th width="120">添加时间</th>
		  	</tr>
	  	</thead> 
		<tbody>
		<{if $cats}>
			<{foreach item=i from=$cats}>
				<tr style="background:#FAFDFE;">
					<td><{$i.name}></td>
					<td><{$i.alias}></td> 
					<td><{$i.px}></td> 
					<td><{if $i.status == '1'}>正常<{else}>关闭<{/if}></td> 
					<td>
						<a href="javascrip:;" onClick="cats_edit('修改分类','?m=news&a=cats_edit&cid=<{$i.cid}>')" class="edit">编辑</a>
						<a href="javascript:;" data-id="<{$i.cid}>" class="del">删除</a>
					</td> 
					<td><{$i.addtime}></td>
				</tr> 
				<{foreach item=p from=$i.pcats}>	
					<tr>
						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-- <{$p.name}></td>
						<td><{$p.alias}></td>
						<td><{$p.px}></td>  
						<td><{if $p.status == '1'}>正常<{else}>关闭<{/if}></td> 
						<td>
							<a href="javascrip:;" onClick="cats_edit('修改分类','?m=news&a=cats_edit&cid=<{$p.cid}>')" class="edit">编辑</a>
							<a href="javascript:;" data-id="<{$p.cid}>" class="del">删除</a>
						</td>
						<td><{$p.addtime}></td>
					</tr> 
				<{/foreach}> 	
			<{/foreach}> 
		<{else}>	
			<tr><td colspan="6">还没有数据，赶快添加吧！</td></tr> 
		<{/if}> 
		</tbody>
	</table> 
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript">  
_delete('?m=news&a=cats_del');
function cats_edit(name,url){  
	parent.dialog(name,url); 
} 
</script> 