\n"); // the above is kind of hacky but ... $top="."; while (!file_exists("$top/" . "start_page.php")) { $top="$top" . "/.."; } function doctype() { global $top; print("\n"); print("\n"); print("\n\n"); } function br() { print("
\n"); } function title($title) { if ($title == "") { // google juice for the name print("John Levon: Movementarian.org\n\n"); } else { // title first for thin windows print("$title - Movementarian.org\n\n"); } } function stylesheet($file) { print("\n"); print("\n"); print("\n"); } function meta($name, $content) { print("\n"); } function div($name) { print("\n
\n\n"); } function enddiv($name) { print("\n\n
\n\n"); } function img($file, $alt, $width, $height) { print("\"$alt\"\n"); } function rlink($path, $text) { global $top; $path = "$top/" . "$path"; print("$text"); } function href($link, $text = "", $key = "", $tip = "", $rel = "") { print("\n"); if ($text == "") { return; } print("$text\n\n"); } function endhref($link) { print("\n\n \n"); } function fhref($link, $text, $desc) { print("
\n"); href($link, $text); print("
\n"); print("
\n$desc
\n\n"); } function imgtable($img, $text) { print("\n"); print("\"\"\n"); print("\n"); print("$text"); } function menu_entry($file, $name, $link, $key = "", $tip = "") { global $top; $file = "$top/" . "$file"; $link = "$top/" . "$link"; print ("

\n"); if ($file == $link) { print("\n"); } href($link, "$name", $key, $tip, "bookmark"); if ($file == $link) { print("\n"); } print("

\n"); } function sub_menu_entry($link, $name) { global $top; $link = "$top/" . "$link"; print ("

\n"); print("\n"); href($link, "$name", "", "", "bookmark"); print("\n"); print("

\n"); } function start_page($file, $title) { global $top; doctype(); print("\n\n"); stylesheet("$top/style.css"); title($title); meta("description", "Movementarian.org - John Levon's home page"); meta("keywords", "john levon, oprofile, lyx"); print("\n"); print("\n\n"); print("\n"); div("topbar"); div("banner"); print("Movementarian.org\n\n"); enddiv("banner"); /*div("logo"); img("$top" . "oprofile.png", "", 402, 80); enddiv("logo");*/ div("note"); href("$top/" . "browser/", "Page doesn't render properly ?"); enddiv("note"); enddiv("topbar"); div("pinmenu"); list ($kind, $subkind) = split("/", $file); if ($kind == "") { $kind = $subkind; } /* don't place a submenu if it's a top-level subdir */ if ($file == "code/" || $file == "docs/" || $file == "ui/" || $file == "rand/" || $file == "links/" || $file == "cv/") { $kind = ""; } menu_entry($file, "Home", "", "H", "Front page", ""); menu_entry($file, "Code", "code/", "C", "I write some code. Here it is."); if ($kind == "code") { sub_menu_entry($file, $title); $kind = ""; } menu_entry($file, "Docs", "docs/", "D", "I write some documentation. Here it is."); if ($kind == "docs") { sub_menu_entry($file, $title); $kind = ""; } menu_entry($file, "UI", "ui/", "U", "UI weenie stuff."); if ($kind == "ui") { sub_menu_entry($file, $title); $kind = ""; } menu_entry($file, "rand()", "rand/", "R", "I write some crap. Here it is."); if ($kind == "rand") { sub_menu_entry($file, $title); $kind = ""; } menu_entry($file, "Links", "links/", "L", "I read some crap. Here it is."); if ($kind == "links") { sub_menu_entry($file, $title); $kind = ""; } menu_entry($file, "CV", "cv/", "V", "Here I am."); if ($kind != "") { menu_entry($file, $title, $file); } enddiv("pinmenu"); div("badge1"); href("http://validator.w3.org/check/referer"); img("$top/valid-xhtml10.png", "", 54, 31); endhref("http://validator.w3.org/check/referer"); enddiv("badge1"); div("badge2"); href("http://jigsaw.w3.org/css-validator/check/referer"); img("$top/vcss.png", "", 54, 31); endhref("http://jigsaw.w3.org/css-validator/check/referer"); enddiv("badge2"); div("page"); }