"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";
$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);
?>