<?php /** * Handles most pages that are in the database * * @author Brad Jorgensen <*****@*****.**> * @package SDBIC */ require 'includes/global.inc.php'; debug(0, 0, 0); if ($_GET['id']) { $page = Page::get_from_id((int) $_GET['id']); } elseif ($_GET['q']) { $page = Page::get_from_alias($dbi->escape($_GET['q'])); } if (!$page) { $page = Page::get_from_alias('404'); header("HTTP/1.0 404 Not Found"); } include 'header.php'; echo $page->content['main']; include 'footer.php';