<{include file="index/header.html"}>  
<div class="nav"><span>分类列表</span></div>
<div class="filter">
	<a class="add" href="javascript:;" onClick="edit_cats('添加分类','?m=category_com&a=edit')">添加分类</a>
</div>
<div class="main"> 
	<table width="100%" class="ltable">
		<thead>
			<tr> 
				<th width="300">分类名</th> 
				<th width="80">排序</th>
				<th width="80">状态</th>
				<th width="120">操作</th>
				<th></th> 
			</tr>
		</thead>
		<tbody>
		<{if $data}> 
			<{foreach item=i from=$data}>
			<tr> 
				<td>
					<{if $i.pcid == '0'}>
						<a href="?m=category_com&cid=<{$i.cid}>"><{$i.name}></a> 
					<{else}>
						<{$i.name}>
					<{/if}>
				</td> 
				<td><{$i.px}></td>
				<td><{if $i.status == '1'}>正常<{else}>关闭<{/if}></td>
				<td>
					<a href="javascript:;" onClick="edit_cats('编辑分类','?m=category_com&a=edit&cid=<{$i.cid}>')" class="edit">编辑</a>
					<a href="?m=category_com&a=del&cid=<{$i.cid}>" class="del">删除</a>
				</td> 
				<td></td>
			</tr>  
			<{/foreach}>
		<{else}>
		  <tr><td colspan="5">还没有数据，赶快添加吧！</td></tr>
		<{/if}>
		</tbody> 
	</table> 
</div>
<{include file="index/footer.html"}>  
<script type="text/javascript">
function edit_cats(name,url){  
	parent.dialog(name,url, 440); 
}
</script>