<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
	$action=empty($action)?'main':trim($action);
	switch ($action)
	{
		case 'main':
			$unpassedcontent=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."content` WHERE `".DB_PRE."content`.`status`=0");
			$unpassedmember=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."member` WHERE `".DB_PRE."member`.`ispassed`!=1");
			$unpassedcomment=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."comment` WHERE `".DB_PRE."comment`.`status`=0");
			$unpassedcompany=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."member` WHERE `".DB_PRE."member`.`modelid`=2 AND `".DB_PRE."member`.`iscompmayed`!=1");
			$unpassedconvert=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."member_convert`");
			$unpassedorder=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."order` WHERE `status`!=3");
			$unpassedmsg=get_cache_counts("SELECT COUNT(id) AS count FROM `".DB_PRE."guestbook` WHERE `passed`=0");
			$mymenu=array();
			$r=cache_read('module.cache.php',DIRCMS_ROOT.'data/cache_module/');
			$syspriv=$r['system']['roleid']; 
			foreach($r as $_r)
			{
				if(!$_r['disabled'] && in_array($roleid,$_r['roleid']))$mymenu[]=$_r['modulemurl'];
				if($_r['istop'] && !$_r['disabled'] && in_array($roleid,$_r['roleid']))$menu[]=$_r['modulemurl'];
			}
			include admin_tlp('main');
			break;	
	}
?>