array(),'images'=>array(),'research'=>array(),'web'=>array(),'contact'=>array(),'journal'=>array('intro','list','history','future','first','second','third','fourth','fifth','sixth','seventh','eighth','resources','contact')); // 2. If there is no $_GET['id'] defined, then serve the homepage: if (!isset($_GET['id'])) { include ($root . '/pages/intro.php'); } // 3. If the page is allowed, include it: elseif (array_key_exists($_GET['id'], $pass)) { $id = $_GET['id']; // no sub-page was chosen if(!isset($_GET['subid']) || $_GET['subid']=='') { if($id == 'journal'){ include ($root . '/pages/' . $id . '/moved.php'); } else{ include ($root . '/pages/' . $id . '.php'); } } // a sub-page in a sub folder elseif (in_array($_GET['subid'], $pass[$_GET['id']])) { $subid = $_GET['subid']; include ($root . '/pages/' . $id . '/moved.php'); } else { // This includes page was chosen w/o the sub-menu include ($root . '/pages/error.php'); } } // 4. If the page is not allowed, send them to an error page: else { // This sends the 404 header: header("HTTP/1.0 404 Not Found"); // This includes the error page: include ($root . '/pages/error.php'); } ?>