$game = config::getDefaultGame();
$man = $game->getLib('main/manual');
// We're in the manual, display manual controls
$manual = $man->call('getStructure', 'en');
$txt = array('Top', 'Up', 'Previous', 'Next');
if (!is_null(handler::$h->page)) {
$pid = handler::$h->page['id'];
$navLinks = $man->call('getNavLinks', $pid);
for ($i=0;$i<4;$i++) {
$t = is_null($navLinks[$i]) ? "" : "";
$t .= $txt[$i] . (is_null($navLinks[$i]) ? "" : "");
$navLinks[$i] = $t;
}
} else {
$pid = null;
$navLinks = $txt;
}
ob_start();
?>
- = $navLinks[0] ?>
- = $navLinks[2] ?>
- = $navLinks[1] ?>
- = $navLinks[3] ?>
Contents
function dumpManualStructure(&$sections, $depth) {
$br = false;
foreach ($sections as $id => $sd) {
if ($br) {
echo "
";
} else {
$br = true;
}
if ($depth > 0) {
echo str_repeat(' ', $depth * 2);
}
echo "
" . utf8entities($sd['title']) . "";
if (count($sd['subs'])) {
echo "
";
dumpManualStructure($sd['subs'], $depth + 1);
}
}
}
dumpManualStructure($manual, 0);
?>
$sbContents = ob_get_contents();
ob_end_clean();
include("side-box.en.inc");
?>