<?php
/**
cout('<div id="menuPanel">');
	$rsmm=array(); $qmm="SELECT * FROM pages WHERE idparent=0";
	callRS($rsmm, $qmm);
	for ($mm=0;$mm<count($rsmm);$mm++) {
		cout('<div class="menuCategory" data="menuPages">'.$rsmm[$mm]["page_name"].' <a href="#" title="Collapse This" onclick="return false;"><img src="/'.adminFolder.'/img/arrow-collapse.png" alt="" /></a></div>');
		$rsmm2=array();$qmm2="SELECT * FROM pages WHERE idparent='".$rsmm[$mm]["idpage"]."'";
		callRS($rsmm2, $qmm2);
		if (count($rsmm2)!=0) {
			cout('<ul class="menu '.$rsmm[$mm]["page_url"].'" show="1">');
			for ($mm2=0;$mm2<count($rsmm2);$mm2++) {
				cout('<li><a href="/'.adminFolder.'/pages/view/'.$rsmm2[$mm2]["idpage"].'/">'.$rsmm2[$mm2]["page_name"].'</a></li>');
			}
		}
	}
	
	
	
cout('</div>');
**/
/*
$rsmm=array(); $qmm="SELECT * FROM _admin_page_cats WHERE isactive=1";
callRS($rsmm, $qmm);

cout('<div id="menuPanel">');
	for ($mm=0;$mm<count($rsmm);$mm++) {
		if (intval($rsmm[$mm]["isshow"])==1) {
			$imgsrc="/".adminFolder."/img/arrow-collapse.png";
		} else {
			$imgsrc="/".adminFolder."/img/arrow-expand.png";
		}
		cout('<div class="menuCategory" data="'.$rsmm[$mm]["cat_name"].'">'.$rsmm[$mm]["cat_label"].' <a href="#" title="Collapse This" onclick="return false;"><img src="'.$imgsrc.'" alt="" /></a></div>');
		$rsmm2=array();$qmm2="SELECT * FROM _admin_pages WHERE kdpagecat='".$rsmm[$mm]["kdpagecat"]."'";
		callRS($rsmm2, $qmm2);
		if (count($rsmm2)!=0) {
			cout('<ul class="menu '.$rsmm[$mm]["cat_name"].'" show="'.$rsmm[$mm]["isshow"].'">');
				for ($mm2=0;$mm2<count($rsmm2);$mm2++) {
					cout('<li><a href="/'.adminFolder.'/'.$rsmm2[$mm2]["url"].'/">'.$rsmm2[$mm2]["page_label"].'</a></li>');
				}
			cout('</ul>');
		}
				
	}
cout('</div>');

cout('
<script type="text/javascript">
	$("#menuPanel .menuCategory a").each(function(){
		var $this = $(this).parent();
		if ($("."+ $this.attr("data")).attr("show")=="1") {
			$("."+ $this.attr("data")).slideDown(6, function(){
				$this.find("a").attr("title", "Collpase This");
				$this.find("img").attr("src", "/".adminFolder."/img/arrow-collapse.png");
			});
		} else {
			$("."+ $this.attr("data")).slideUp(6, function(){
				$this.find("a").attr("title", "Expand This");
				$this.find("img").attr("src", "/".adminFolder."/img/arrow-expand.png");
			});
		}
		$(this).bind("click", function(){
			if ($("."+ $this.attr("data")).attr("show")=="1") {
				$("."+ $this.attr("data")).attr("show", "0");
				$("."+ $this.attr("data")).slideUp(600, function(){
					$this.find("a").attr("title", "Expand This");
					$this.find("img").attr("src", "/".adminFolder."/img/arrow-expand.png");
					$.ajax({
						type: "GET",
						url: "/".adminFolder."/_ajax/admin_menu.php",
						data: "a=updateadminmenu&dedata="+ $this.attr("data") +"&langsung="+ $("."+ $this.attr("data")).attr("show"),
						success: function(resp){
						}
					});
				});
			} else {
				$("."+ $this.attr("data")).attr("show", "1");
				$("."+ $this.attr("data")).slideDown(600, function(){
					$this.find("a").attr("title", "Collpase This");
					$this.find("img").attr("src", "/".adminFolder."/img/arrow-collapse.png");
					$.ajax({
						type: "GET",
						url: "/".adminFolder."/_ajax/admin_menu.php",
						data: "a=updateadminmenu&dedata="+ $this.attr("data") +"&langsung="+ $("."+ $this.attr("data")).attr("show"),
						success: function(resp){
						}
					});
				});
			}
			
		});
	});
</script>
');
*/
?>
