<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/admin.css" rel="stylesheet"/>
<link href="css/simpletree.css" rel="stylesheet"/>
<script src="js/jquery/jquery.min.js"></script>
<script src="js/jquery/jquery.contextmenu.js"></script>
<script src="js/jquery/jquery.simple.tree.js"></script>
</head>
<body>
<ul class="simpleTree">
	<li class="root">
		<span><a onclick="root(this)" href="index.php?r=Report.channelReport&channel_id=1" target="channelReportWindow">首页</a></span>
		<ul>
			<!--{foreach from=$channel item=channel}-->
			<!--{if $channel.children == 1}-->
			<li id="channel<!--{$channel.id}-->">
				<span><a href="index.php?r=Report.channelReport&channel_id=<!--{$channel.id}-->"><!--{$channel.channel_text}-->[ID:<!--{$channel.id}-->]</a></span>
				<ul class="ajax">
					<li>{url:index.php?r=Report.channelGetTree&parent_id=<!--{$channel.id}-->}</li>
				</ul>
			<!--{else}-->
			<li>
				<span><!--{$channel.channel_text}-->[ID:<!--{$channel.id}-->]</span>
			<!--{/if}-->
			</li>
			<!--{/foreach}-->
		</ul>
	</li>
</ul>
</body>
<script>
var simpleTreeCollection;
$(document).ready(function(){
	simpleTreeCollection = $(".simpleTree").simpleTree({
		autoclose: true,
		drag: false,
		afterClick: function(node){
			var url = $("a:first", node).attr("href");
			if (url != null) {
				window.parent.frames["channelReportWindow"].location.href = url;
			}
		}
	});
});
function root(dom){
	window.location.reload();
}
</script>
</html>