kompletter umbau euf ein dynamiesches menue
git-svn-id: svn://svn.cccv.de/engel-system@188 29ba0400-6e00-0410-a75a-ca02368028f8main
parent
b91450e558
commit
9c1117aae6
File diff suppressed because it is too large
Load Diff
@ -1,42 +1,40 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
|
|
||||||
function ShowMenu( $Menu )
|
function ShowMenu( $MenuName)
|
||||||
{
|
{
|
||||||
if( !isset($Menu["Entry"]) ) return;
|
global $MenueTableStart, $MenueTableEnd, $_SESSION, $DEBUG, $url, $ENGEL_ROOT;
|
||||||
|
$Gefunden=FALSE;
|
||||||
|
|
||||||
global $MenueTableStart, $MenueTableEnd, $_SESSION, $DEBUG;
|
//Überschift
|
||||||
|
$Text = "<h4 class=\"menu\">". Get_Text("$MenuName/"). "</h4>";
|
||||||
|
|
||||||
echo $MenueTableStart;
|
//einträge
|
||||||
echo "<h4 class=\"menu\">". $Menu["Name"]. "</h4>";
|
foreach( $_SESSION['CVS'] as $Key => $Entry )
|
||||||
|
if( strpos( $Key, ".php") > 0)
|
||||||
foreach( $Menu["Entry"] as $Entry )
|
if( (strpos( "00$Key", "0$MenuName") > 0) ||
|
||||||
|
((strlen($MenuName)==0) && (strpos( "0$Key", "/") == 0) ) )
|
||||||
{
|
{
|
||||||
//wenn File mit ../ beginnt wird "../" abgeschnitten und der Ordener weggelassen
|
$TempName = Get_Text($Key, TRUE);
|
||||||
if( strstr( $Entry["File"], "../" ) != FALSE )
|
if(( TRUE||$DEBUG) && (strlen($TempName)==0) )
|
||||||
$MenuFile = substr( $Entry["File"], strpos( $Entry["File"], "../" )+ 3) ;
|
$TempName = "not found: \"$Key\"";
|
||||||
else
|
|
||||||
$MenuFile = $Menu["Path"]. $Entry["File"];
|
|
||||||
|
|
||||||
if( $_SESSION['CVS'][$MenuFile] == "Y")
|
if( $Entry == "Y")
|
||||||
|
{
|
||||||
|
//zum absichtlkichen ausblenden von einträgen
|
||||||
|
if( strlen($TempName)>1)
|
||||||
{
|
{
|
||||||
echo "\t\t\t<li><a href=\"". $Entry["File"]. "\">". $Entry["Name"]. "</a></li>\n";
|
$Gefunden = TRUE;
|
||||||
if( isset($Entry["Line"]))
|
$Text .= "\t\t\t<li><a href=\"". $url. substr( $ENGEL_ROOT, 1). $Key. "\">$TempName</a></li>\n";
|
||||||
echo $Entry["Line"];
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//DEBUG
|
elseif( $DEBUG )
|
||||||
if( $DEBUG )
|
|
||||||
{
|
{
|
||||||
if( !isset($_SESSION['CVS'][$MenuFile] ) )
|
$Gefunden = TRUE;
|
||||||
echo "ERROR CVS: '". $MenuFile. "' not set";
|
$Text .= "\t\t\t<li>$TempName ($Key)</li>\n";
|
||||||
|
}
|
||||||
if( $_SESSION['CVS'][$MenuFile] != "Y")
|
}
|
||||||
echo "\t\t\t<li>". $Entry["File"]. " (". $Entry["Name"]. ")</li>\n";
|
if( $Gefunden)
|
||||||
} // DEBUG
|
echo $MenueTableStart.$Text.$MenueTableEnd;
|
||||||
} //foreach
|
|
||||||
|
|
||||||
echo $MenueTableEnd;
|
|
||||||
}//function ShowMenue
|
}//function ShowMenue
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue