<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><?php include 'header.php'; ?></head><body> <div id="doc4" class="yui-t7"> <div id="hd"><?php include 'menu.php'; ?><div id="bd"> <div class="yui-ge"> <div class="yui-u first"><!-- Begin Dynamic Content --><?php // check if the page variable is set and check if it is the array of allowed pages if(isset($_GET['page'])) { // first check that the file exists if(file_exists($_GET['page'].'.php')) { // If all is well, we include the file include_once($_GET['page'].'.php'); } else { // A little error message if the file does not exist echo 'No such file exists'; } } // if somebody typed in an incorrect url else { // if things are not as they should be, we included the default page if(file_exists('home.php')) { // include the default page include_once('home.php'); } else { // if the default page is missing, we have a problem and it needs to be fixed. echo 'main.php is missing. Please fix me.'; } }?><!-- End Dynamic Content --> </div> <div class="yui-u"> </div> </div> </div> <div id="ft"><?php include 'footer.php'; ?></div> </div></body>