<?php
if( !isset($_SESSION['admin_id']) || !isset($_SESSION['admin_account']) || !isset($_SESSION['admin_level']) || $_SESSION['admin_id'] == '' || $_SESSION['admin_account'] == '' || $_SESSION['admin_level'] == '' )
{
	session_unset();
	session_destroy();

	header('Location:login.php');
	exit();
}

require_once('includes/common.php');

require_once('includes/admin.php');
$obj_class_admin = new class_admin();

if( ( $uint_this_level = $obj_class_admin->get_this_level($_SERVER['PHP_SELF']) ) === false || $uint_this_level > $_SESSION['admin_level'] )
{
	session_unset();
	session_destroy();

	header('Location:login.php');
	exit();
}
?>