<{import file="index/header.html"}>  
<{if $smarty.get.pid == ''}>
	<div class="nav"><span>分类列表</span></div>
<{else}>
	<div class="cnav"><a href="javascript:;" class="back">子级导航</a></div>
<{/if}>
<div class="filter">
	<{if $smarty.get.pid == ''}>
		<a class="add" href="javascript:;" onClick="edit_cats('添加分类', '<{$__ADMIN__}>common/edit')">添加分类</a>
	<{else}>
		<a class="add" href="javascript:;" onClick="edit_cats('添加分类', '<{$__ADMIN__}>common/edit?pid=<{$smarty.get.pid}>')">添加参数</a>
	<{/if}>
</div>
<div class="main"> 
	<table class="ltable">
		<thead>
			<tr> 
				<{if $smarty.get.pid == ''}>
					<th width="130">操作</th>
					<th width="200">分类名</th>
					<th width="150">别名</th>
				<{else}>
					<th width="100">操作</th>
					<th width="200">分类名</th>
				<{/if}>
				<th width="80">排序</th>
				<th width="80">状态</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
			<{if $data}> 
				<{foreach item=i from=$data.list}>
				<tr>
					<td> 
						<a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a>
						<a href="javascript:;" onClick="edit_cats('编辑分类', '<{$__ADMIN__}>common/edit?pid=<{$i.pid}>&id=<{$i.id}>')" class="edit">编辑</a>
						<{if $i.pid == '0'}>
							<a href="<{$__ADMIN__}>common?pid=<{$i.id}>" class="next">下层</a>
						<{/if}>
					</td> 
					<td><{$i.name}></td> 
					<{if $smarty.get.pid == ''}>
						<td><{$i.alias}></td>
					<{/if}>
					<td><{$i.px}></td>
					<td><{if $i.status == '1'}>正常<{else}>关闭<{/if}></td> 
					<td></td>
				</tr>  
				<{/foreach}>
			<{else}>
			  <tr><td colspan="6">还没有数据，赶快添加吧！</td></tr>
			<{/if}>
		</tbody> 
	</table> 
</div>
<{import file="index/footer.html"}>  
<script type="text/javascript">
_delete('<{$__ADMIN__}>common/del');
function edit_cats(name,url){  
	parent.dialog(name,url, 440); 
}
</script>