getHelp($_REQUEST['help']);
if (is_array($url)) {
doChoosePage($url);
return;
}
if ($url) {
header("Location: $url");
exit;
}
}
doBrowse($lang['strinvalidhelppage']);
}
function doBrowse($msg = '') {
global $misc, $data, $lang;
$misc->printHeader($lang['strhelppagebrowser']);
$misc->printBody();
$misc->printTitle($lang['strselecthelppage']);
echo $misc->printMsg($msg);
echo "
\n";
$pages = $data->getHelpPages();
foreach ($pages as $page => $dummy) {
echo "- {$page}
\n";
$urls = $data->getHelp($page);
if (!is_array($urls)) $urls = array($urls);
foreach ($urls as $url) {
echo "- {$url}
\n";
}
}
echo "
\n";
$misc->printFooter();
}
function doChoosePage($urls) {
global $misc, $lang;
$misc->printHeader($lang['strhelppagebrowser']);
$misc->printBody();
$misc->printTitle($lang['strselecthelppage']);
echo "\n";
foreach($urls as $url) {
echo "- {$url}
\n";
}
echo "
\n";
$misc->printFooter();
}
switch ($action) {
case 'browse':
doBrowse();
break;
default:
doDefault();
break;
}
?>