<?php if (!defined('APP_PATH')) exit;?><!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=utf-8" />
<title></title>
<link href="http://127.0.0.5/Magic/Data/Public/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://127.0.0.5/Magic/Data/Public/js/jquery.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/main.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/dtree.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/jquery.nicescroll.min.js"></script>
<style type="text/css">
.tablelist tbody tr:hover{background:none;}
.Node_0{display:none}
.dTreeNode{width:100%;float:left;border-bottom:1px solid #ccc;}
.dTreeNode:hover{background:#e5ebee;}
.dTreeNode span{float:left;height:36px;}
.node_id{width:6%;text-align:center;}
.node_name{width:31%}
.node_link{width:6%}
.node_name img,.node_name a{float:left}
.node_model{width:12%;text-align:center;}
.node_sort{width:8%;text-align:center;}
.node_menu{width:9%;text-align:center;}
.node_status{width:8%;text-align:center;}
.node_action{width:20%;text-align:center;}
</style>
</head>
<body>
<script>
  $(document).ready(function() {    
	$("html").niceScroll();
  });
</script>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="/">首页</a></li>
		<li><a href="#">网站栏目管理</a></li>
	</ul>
</div>
<div class="rightinfo">
	<div class="tools">
		<ul class="toolbar">
			<li><a href="?r=class-index-edit"><span><img src="http://127.0.0.5/Magic/Data/Public/images/t01.png" /></span>添加栏目</a></li>
			<li><a href="javascript:c.openAll();"><span><img src="http://127.0.0.5/Magic/Data/Public/images/t07.png" /></span>全部展开</a></li>
			<li><a href="javascript:c.closeAll();"><span><img src="http://127.0.0.5/Magic/Data/Public/images/t01.png" /></span>全部隐藏</a></li>
		</ul>
    </div> 
   <div class="formtitle1"><span>栏目列表</span></div>
   <iframe id="blank" name="blank"  style="display:none" ></iframe>
    <table class="tablelist">
		<thead>
    		<tr>
				<th width="80" align="center"><b>ID</b></th>
				<th align="left"><b>栏目名称</b></th>
				<th width="100" align="center"><b>类型</b></th>
				<th width="150" align="center"><b>模型</b></th>
				<th width="80" align="center"><b>排序</b></th>
				<th width="80" align="center"><b>导航</b></th>
				<th width="80" align="center"><b>状态</b></th>
				<th width="250" align="center" style="border-right:1px solid #b6cad2"><b>操作</b></th>
			</tr>
        </thead>
		<tbody>
			<tr><td colspan="8">
			<?php if (empty($list)){ ?>
			暂无记录!
			<?php }else{ ?>
			
				<script type="text/javascript">
					c = new dTree('c');
					c.add(0,-1,'','','');
					<?php foreach ($list as $k=>$vo){?>
						<?php if($vo['attribute']==1){ ?>
							<?php $type = '内部栏目';;?> 
						<?php }else if($vo['attribute']==2){ ?>
							<?php $type = '频道封面';;?>
						<?php }else if($vo['attribute']==3){ ?>
							<?php $type = '外部链接';;?> 
						<?php }?>
					c.add(<?php echo $vo['catid'];?>,<?php echo $vo['pid'];?>,'<?php echo $vo['name'];?>','?r=class-index-edit&id=<?php echo $vo['catid'];?>',-2,'<?php echo $type;?>','<?php echo $vo['model'];?> [<?php echo $vo['value'];?>]','<?php echo $vo['sorter'];?>','<?php echo $vo['ismenu'];?>','<?php echo $vo['status'];?>','<?php echo $vo['value'];?>','<?php echo $vo['value'];?>');
					<?php }?>
					document.write(c);
				</script>
			<?php }?>
			</td></tr>
		</tbody>
		</table>
</div>
</body>
</html>





