summaryrefslogtreecommitdiff
path: root/includes/funktion_menu.php
blob: 87196ede59e880340053bbc7dd3f9fc1a0c7ce2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?PHP

function ShowMenu( $MenuName)
{
	global $MenueTableStart, $MenueTableEnd, $_SESSION, $DEBUG, $url, $ENGEL_ROOT;
	$Gefunden=FALSE;

	//�berschift
	$Text = "<h4 class=\"menu\">". Get_Text("$MenuName/"). "</h4>";
	
	//eintr�ge
	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);
				if(( TRUE||$DEBUG) && (strlen($TempName)==0) )
					$TempName = "not found: \"$Key\"";
				
				if( $Entry == "Y")
				{
					//zum absichtlkichen ausblenden von eintr�gen
					if( strlen($TempName)>1)
					{
						//sonderf�lle:
						if( $Key=="admin/faq.php")
							$TempName .= " (". noAnswer(). ")";
						//ausgabe
						$Text .= "\t\t\t<li><a href=\"". $url. $ENGEL_ROOT. $Key. "\">$TempName</a></li>\n";
						$Gefunden = TRUE;
					}
				}
				elseif( $DEBUG ) 
				{
					$Gefunden = TRUE;
					$Text .= "\t\t\t<li>$TempName ($Key)</li>\n";
				}
			}
	if( $Gefunden)
		echo $MenueTableStart.$Text.$MenueTableEnd;
}//function ShowMenue

?>