You could stick this in too:
but this all seems like a lot of hassle when you could just use Smarty/include a header and footer.
Code:
if(!preg_match('#^/index.php.*#', $_SERVER['REQUEST_URI'])) {
die('You cannot view this page directly.');
}
but this all seems like a lot of hassle when you could just use Smarty/include a header and footer.