<?php
session_start();
if(!isset($_SESSION['jabatan']))
{
	echo "<script>window.location='index.php?logout=1'</script>";
}

			
include "koneksi/koneksi.php";
include "function.php";

	//fungsi cek waktu session. jika bernilai false atau tidak true
if (!login_check()) {
//alihkan user ke halaman logout

echo "<script>window.location='index.php?logout=2'</script>";
}
	
include "layouts/header.php";

?>
<br></br>

	<div class="panel-body">
		<div class="row">
		<?php
		include "layouts/menu_system.php";

				$v_cat = (isset($_REQUEST['cat'])&& $_REQUEST['cat'] !=NULL)?$_REQUEST['cat']:'';
				$v_page = (isset($_REQUEST['page'])&& $_REQUEST['page'] !=NULL)?$_REQUEST['page']:'';
				if(file_exists("system/".$v_cat."/".$v_page.".php"))
				{
					include("system/".$v_cat."/".$v_page.".php");
				}else{
					include("system/web/homepage.php");
				}


		?>

</div>
</div>
<?php
include "layouts/footer.php";
				?>
