<?php

session_start();

$userid = $_SESSION['userid'];

$sql_user_chk = "SELECT * FROM dl_useraccount WHERE id = '$userid'";
$con_user_chk = $conn->query($sql_user_chk) or die($sql_user_chk);
$rs_user = $con_user_chk->fetch_assoc();
$username 		= $rs_user['username'];
$menu_akses 	= $rs_user['menu_akses'];
$user_lastlogin = $rs_user['login'];


$sql_access = "SELECT * FROM useraccess WHERE user_id = '$userid'";
$dcon_acs = $conn->query($sql_access) or die($sql_access);
$acs = $dcon_acs->fetch_array();
	$order_flag 	= $acs['order_flag'];
	$inv_flag 		= $acs['inv_flag'];
	$md_flag 		= $acs['md_flag'];
	$rpt_flag 		= $acs['rpt_flag'];
	$content_flag 	= $acs['content_flag'];
	$setting_flag 	= $acs['setting_flag'];
	$prc_flag 		= $acs['prc_flag'];
	$prd_flag 		= $acs['prd_flag'];
	$acc_flag 		= $acs['acc_flag'];	
	$hpp_flag 		= $acs['hpp_flag'];	


if(!$userid&&$sessionbypass!=1){
	echo $userid;
	header( "Location:../index" );
}

?>
