'.$item['data'].''."\n";
$html.= ''."\n";
$html.= '
'."\n";
foreach($item['children'] as $children)
{
$html.= menu_children($children);
}
$html.= '
'."\n";
$html.= '
'."\n";
}
}
return $html;
}
function menu_children($children)
{
global $firephp;
//Génération du lien
$href = false;
if( $children['href']!='' && function_exists($children['href']) )
{
$href = $children['href']();
}
//Traitement des permissions
if( isset($children['perm']) )
{
$permStatut = false;
foreach($children['perm']['list'] as $perm)
{
$permStatut = $permStatut || hasPerm($perm);
}
if(!$permStatut)
{
if( !isset($children['perm']['hidden']) ||
$children['perm']['hidden']===false )
{
$href = '#';
}
elseif( isset($children['perm']['hidden']) &&
$children['perm']['hidden']===true )
{
$href = false;
}
}
}
//Traitement profil
if(isset($children['profil']))
{
if( ( !isset($children['profil']['hidden']) ||
$children['profil']['hidden']===false ) &&
hasProfil($children['profil']['name'])===false )
{
$href = '#';
}
elseif( isset($children['profil']['hidden']) &&
$children['profil']['hidden'] &&
hasProfil($children['profil']['name'])===false )
{
$href = false;
}
}
//Output
$html = '';
if($href!==false)
{
$html.= '';
if($href=='#'){
$html.= ''.
$children['data'].
'';
}
else{ $html.= $children['data']; }
$html.= '';
$html.= "\n";
}
return $html;
}