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