';
$sec = get_parameter ('sec');
$sec2 = get_parameter ('sec2');
foreach ($menu as $mainsec => $main) {
//Set class
if (!isset ($main["sub"])) {
$main["sub"] = array ();
}
if (!isset ($main["refr"])) {
$main["refr"] = 0;
}
if ($sec == $mainsec) {
$class = 'selected';
$selected = 1;
} else {
$class = '';
$selected = 0;
$style = "";
}
//Print out the first level
echo '
';
echo '- ';
echo ''.$main["text"].'';
echo '
';
foreach ($main["sub"] as $subsec2 => $sub) {
//Set class
if (($sec2 == $subsec2) && (isset ($sub[$subsec2]["options"]))
&& (get_parameter_get ($sub[$subsec2]["options"]["name"]) == $sub[$subsec2]["options"]["value"])) {
//If the subclass is selected and there are options and that options value is true
$class = 'submenu selected';
} elseif ($sec2 == $subsec2 && (!isset ($sub[$subsec2]["options"]))) {
//If the subclass is selected and there are no options
$class = 'submenu selected';
} elseif ($selected == 1) {
//If the mainclass is selected
$class = 'submenu';
} else {
//Else it's invisible
$class = 'submenu invisible';
}
if (!isset ($sub["refr"])) {
$sub["refr"] = 0;
}
if (isset ($sub["type"]) && $sub["type"] == "direct") {
//This is an external link
echo '- '.$sub["text"].'
';
} else {
//This is an internal link
if (isset ($sub[$subsec2]["options"])) {
$link_add = "&".$sub[$subsec2]["options"]["name"]."=".$sub[$subsec2]["options"]["value"];
} else {
$link_add = "";
}
echo '- ';
echo ''.$sub["text"].'';
echo '
';
}
}
echo '
';
}
//Invisible UL for adding border-top
echo '';
}
echo ':: '.__('Operation').' ::
';
$menu = array ();
require ("operation/menu.php");
temp_print_menu ($menu, "int");
echo ':: '.__('Administration').' ::
';
$menu = array ();
require ("godmode/menu.php");
temp_print_menu ($menu, "int");
unset ($menu);
require ("links_menu.php");
?>