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