engelsystem/includes/funktion_menu.php

41 lines
1.2 KiB
PHP
Raw Normal View History

2011-06-01 12:13:39 +02:00
<?php
2011-06-01 19:42:57 +02:00
// Menue generieren
2011-06-01 15:37:41 +02:00
function ShowMenu($MenuName) {
global $MenueTableStart, $MenueTableEnd, $_SESSION, $debug, $url, $ENGEL_ROOT;
$Gefunden = false;
2011-06-01 12:13:39 +02:00
2011-06-01 15:37:41 +02:00
// Ueberschift
2011-06-01 17:28:03 +02:00
$Text = "";
2011-06-01 12:13:39 +02:00
2011-06-01 15:37:41 +02:00
// Eintraege
foreach ($_SESSION['CVS'] as $Key => $Entry)
if (strpos($Key, ".php") > 0)
if ((strpos("00$Key", "0$MenuName") > 0) || ((strlen($MenuName) == 0) && (strpos("0$Key", "/") == 0))) {
$TempName = Get_Text($Key, true);
2011-06-01 12:13:39 +02:00
2011-06-01 18:23:01 +02:00
if ((true || $debug) && ($TempName == ""))
2011-06-01 15:37:41 +02:00
$TempName = "not found: \"$Key\"";
2011-06-01 15:37:41 +02:00
if ($Entry == "Y") {
//zum absichtlkichen ausblenden von einträgen
if (strlen($TempName) > 1) {
//sonderfälle:
if ($Key == "admin/faq.php")
$TempName .= " (" . noAnswer() . ")";
elseif ($Key == "credits.php") continue;
//ausgabe
2011-06-01 19:42:57 +02:00
$Text .= "<li><a href=\"" . $url . $ENGEL_ROOT . $Key . "\">$TempName</a></li>\n";
2011-06-01 15:37:41 +02:00
$Gefunden = true;
}
}
elseif ($debug) {
$Gefunden = true;
2011-06-01 19:42:57 +02:00
$Text .= "<li>$TempName ($Key)</li>\n";
2011-06-01 15:37:41 +02:00
}
}
if ($Gefunden)
2011-06-01 17:51:39 +02:00
echo '<nav class="container"><h4>' . Get_Text("$MenuName/") . '</h4><ul class="content">' . $Text . '</ul></nav>';
2011-06-01 15:37:41 +02:00
} //function ShowMenue
?>