<{include file="index/header.html"}>  
<{include file="admin/nav.html"}>
<div class="filter">  
	<a href="javascript:;" onclick="edit('添加模块', '<{$__ADMIN__}>admin/func_edit<{if $smarty.get.pid}>?pid=<{$smarty.get.pid}><{/if}>')" class="add">添加功能</a> 
</div>
<div class="main"> 
	<table class="ltable">
	  	<thead>
		  	<tr> 
				<th width="<{if !$smarty.get.pid}>150<{else}>100<{/if}>">操作</th>
				<th width="120">名称</th>
				<th width="130">代码</th> 
				<th width="80">排序</th> 
				<th></th>
		  	</tr>
	  	</thead>
		<tbody>
		<{if $data}>
			<{foreach item=i from=$data}>
				<tr>
					<td>
						<a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a> 
						<a href="javascript:;" onclick="edit('编辑模块', '<{$__ADMIN__}>admin/func_edit?id=<{$i.id}><{if $smarty.get.pid}>&pid=<{$smarty.get.pid}><{/if}>')" class="edit">编辑</a> 
						<{if !$smarty.get.pid}>
							<a href="<{$__ADMIN__}>admin/func?pid=<{$i.id}>" class="view">查看</a> 
						<{/if}>
					</td>
					<td><{$i.name}></td> 
					<td><{$i.code}></td> 
					<td><{$i.px}></td>  
					<td></td>
				</tr>
			<{/foreach}>
		<{else}>
			<tr><td colspan="6">还没有数据</td></tr>
		<{/if}>
		</tbody> 
	</table>
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript">
_delete('<{$__ADMIN__}>admin/func_del');
function edit(name,url){  
	parent.dialog(name,url,400); 
}
</script>