Ejemplo n.º 1
0
            break;
        case "todo":
            $page = new TodoPage($database);
            break;
    }
    // we request these now so that exceptions are thrown
    $title = $page->getTitle();
    $head = $page->getHead();
    $main = $page->getMain();
    $sidebar = $page->getSidebar();
} catch (PDOException $e) {
    $page = new ErrorPage($e);
    // we request these now so that exceptions are thrown
    $title = $page->getTitle();
    $head = $page->getHead();
    $main = $page->getMain();
    $sidebar = $page->getSidebar();
}
?>
<!doctype html>
<html>
  <head>
    <title>Stacks Project<?php 
print $title;
?>
</title>
    <link rel='stylesheet' type='text/css' href='<?php 
print href("css/main.css");
?>
'>