<?php
/* 
 * Copyright(C). D-cube,Inc. All Rights Reserved.
 */

/*
 * @file		Menu.class.php
 * @brief		総合メニュークラス
 * @date		2006.12.16
 */

require_once(CLASS_DIR."/PageRender.class.php");
require_once(CLASS_DIR."/adodb/GroupManager.class.php");
require_once(CLASS_DIR."/adodb/CategoryManager.class.php");

class Menu extends PageRender
{
	function makePage()
	{
		$this->assign("TOPIC_PATH","bitcube管理TOP");
		
		$group_dao = new GroupManager();
		$group_array = $group_dao->getGroupList();
		
		$category_dao = new CategoryManager();
		
		foreach($group_array as $key => $group)
			$group_array[$key]["category_array"] = $category_dao->getCategoryList("$category_dao->category.category_order desc","$category_dao->category.group_code = ".$group["group_code"]);
		
		$this->assign("group_array",$group_array);
		
		$this->template = "Menu.tpl";
	}
	
	function render()
	{
		$this->makePage();
		$this->renderPage();
	}
}
