\n"; die (1); } /* Exception handling. */ require_once('ExceptionHandler.php'); set_exception_handler(array('ExceptionHandler', 'handleException')); /* Page mapping. */ $pages = array( 'compatibility' => 'CompatibilityPage', 'contact' => 'ContactPage', 'credits' => 'CreditsPage', 'demos' => 'DemosPage', 'documentation' => 'DocumentationPage', 'downloads' => 'DownloadsPage', 'games' => 'GamesPage', 'faq' => 'FAQPage', 'feeds' => 'FeedsPage', 'links' => 'LinksPage', 'news' => 'NewsPage', 'press' => 'PressPage', 'presssnowberry' => 'PressSnowberryPage', 'screenshots' => 'ScreenshotsPage', 'subprojects' => 'SubprojectsPage', ); /* Default to the news page. */ if (!array_key_exists(($page = isset($_GET['p']) ? $_GET['p'] : null), $pages)) { $page = 'news'; } /* Switch to the requested page */ require_once ("Pages/{$pages[$page]}.php"); $p = new $pages[$page](); return $p->index(); ?>