You can log in again."; include 'templates/page-header.php'; include 'templates/page-menu.php'; include 'templates/block-message.php'; include 'pages/login.php'; // all other normal pages } else { include 'templates/page-header.php'; include 'templates/page-menu.php'; include 'templates/block-message.php'; if (isset($user)) { include 'templates/page-sidebar.php'; } include "pages/{$page}.php"; } // the page is not in allowed urls, loading front page } else { $error = 'The page "' . $page . '" is not found'; include 'templates/page-header.php'; include 'templates/page-menu.php'; include 'templates/block-message.php'; if (isset($user)) { include 'templates/page-sidebar.php'; } include 'pages/front.php'; } include 'templates/page-footer.php'; // clear errors and notices before next page just in case unset($_SESSION['error']); unset($_SESSION['notice']); ?>