<?php
if( !isset($_SESSION['author_id']) || !isset($_SESSION['author_account']) || !isset($_SESSION['author_level']) || $_SESSION['author_id'] == '' || $_SESSION['author_account'] == '' || $_SESSION['author_level'] == '' )
{
	session_unset();
	session_destroy();

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

require_once('includes/common.php');

require_once('includes/author.php');
$obj_class_author = new class_author();

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

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