<?php
if(count(get_included_files()) ==1) exit("Direct access not permitted.");
//if(!$db->ceckUser()) header('Location: '.NPAGE.'login');
$hal = basename(__FILE__, '.php');
$page->setTitle("Admin/Member Area");
$page->tbCss($hal);

if(!$db->ceckUser()){
	require_once('halaman/hal_login/hal_login.php');
}else{
	
	$page->addCss(TPL_CSS."member.css");
	//$page->addCss(TPL_CSS."admin.css");
	$render='tpl/kuduscyber/member.php';
		
	$page->sAtas();
	require_once('module/mod_headadmin/mod_headadmin.php');
	$page->eAtas();
	
	$page->sMenu();
	?>
	<div id="box_menu" class="box_menu" onscroll="modmenu.scrmenu(this)">
		<?php
		require_once('module/mod_menu/mod_menu.php');
		?>
		<div style="clear: both;"></div>
	</div>
	<?php
	$page->eMenu();
	if(isset($_GET['mod'])){
		$mod=$_GET['mod'];
		if($db->ceckmodule($mod)){
			$page->sModule();
			if(file_exists('module/mod_'.$mod.'/mod_'.$mod.'.php')){		
				require_once('module/mod_'.$mod.'/mod_'.$mod.'.php');
			}else{
				echo "ERROR MODULE";
			}
			$page->eModule();
		}else{
			$page->sModule();
			$page->setJudul("TIDAK BOLEH AKSES");
			echo "NO AKSES";
			$page->eModule();
		}
		
	}else{
		$page->sModule();
		$page->setJudul("SELAMAT DATANG");
		$page->eModule();
		$page->sModule();
		require_once('module/mod_selamatdatang/mod_selamatdatang.php');
		$page->eModule();
	}
	
	$page->sFooter();
	//include 'module/mod_footer/mod_footer.php';
	$page->eFooter();
}

?>