header(); $this->title($title); } /** * Draws a page title. * * @param $title * Page title; */ function title($title) { echo "

$title

\n"; } /** * Draws the page header. */ function header() { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } /** * Draws the page footer. */ function footer() { echo ''; } /** * Draws a form. * * @param $content * Form inner content. * * @param $action * Form action. * * @param $method * Form method. */ function form($content, $action = 'index.php', $method = 'get') { echo '
'; echo $content; echo ''; echo '
'; echo '
'; } /** * Draws a form text input. * * @param $name * Input name. * * @return * Rendered text input. */ function form_input_text($name) { return ucfirst($name) .': '; } /** * Draws a navigation bar. * * @param $entry * Current entry. * * @param $entries * Total number of entries. * * @param $action * Page action. */ function navbar($entry, $entries, $action = 'index.php') { // First / prev links. if ($entry != 1) { $prev = $entry - 1; echo 'first '; echo '< prev '; } // Next / last links. if ($entry < $entries) { $next = $entry + 1; echo 'next > '; echo 'last'; } } }