Files
i2p.www/menu.php

39 lines
838 B
PHP
Raw Normal View History

<?php
function getpagetitle($page) {
2004-07-12 19:17:49 +00:00
global $site_structure;
if (isset($site_structure[$page]['title'])) {
return $site_structure[$page]['title'];
}
$title = str_replace ('_', ' ', $page);
return ucfirst($title);
}
2004-07-12 19:17:49 +00:00
function buildmenu() {
global $site_structure;
foreach ($site_structure as $page=>$page_config) {
if (isset($page_config['depth'])) {
$title = getpagetitle($page);
$link = '';
if (isset($page_config['link'])) {
$link = $page_config['link'];
} else {
$link = $page;
}
switch ($page_config['depth']) {
case 1:
print "<br /><b><a href=\"$link\">$title</a></b><br />\n";
break;
case 2:
print "- <a href=\"$link\">$title</a><br />\n";
break;
case 3:
print "&nbsp;&nbsp;* <a href=\"$link\">$title</a><br />\n";
break;
default:
}
}
}
}
?>