"ShowLog" ); function ShowLog($sql, $page = 0) { $commentsPerPage = 5; $URL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $blogFMT = "{ENTRY_DATE}
" . "{SUBJECT}\n" . "{COMMENT}\n "; $navFMT = "
{NAVIGATION}
\n"; $body = "\n" . "\n\n"; $myBlog = new Blog(); $myBlog->set_var("collection", "Oven"); $myBlog->set_var("blogFMT", $blogFMT); $myBlog->set_var("navFMT", $navFMT); $myBlog->set_var("commentsPerPage", 5); $myBlog->set_var("pageLink", ""); $myBlog->set_var("prevIMG", "/images/previous.gif"); $myBlog->set_var("nextIMG", "/images/next.gif"); $body .= $myBlog->Show($sql, $page); $body .= "

Hearth Oven Log

" . "Here you will find my thoughts and ramblings about building " . "and using a wood fired hearth oven." . "

\n"; $tpl = new Template("Templates"); $tpl->set_file("MyTemplateFile", "recipe.html"); $tpl->set_var("TITLE", "Oven Building Log"); $tpl->set_var("NAV", ""); $tpl->set_var("URL", $URL); $tpl->set_var("BODY", $body); $tpl->parse("MyPage", "MyTemplateFile"); $tpl->p("MyPage"); } // MAIN processing routine if (!$sql) { header("Location: http://blackoven.idkhosting.com/db_error.html"); exit; } $currentScreen = isset($_REQUEST['_State']) ? $_REQUEST['_State'] : "Default"; if (! $validScreens[$currentScreen]) { $currentScreen = "Default"; } $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 0; $validScreens[$currentScreen]($sql, $page); ?>