. */ include_once __DIR__.'/../../core.php'; if (!function_exists('menuSelection')) { function menuSelection($element, $group_id, $depth, $permessi_disponibili) { $dbo = database(); ++$depth; // Permessi impostati per il gruppo $permesso_salvato = $dbo->fetchOne('SELECT permessi FROM zz_permissions WHERE idgruppo = '.prepare($group_id).' AND idmodule = '.prepare($element['id'])); $permessi = $permesso_salvato ? $permesso_salvato['permessi'] : '-'; $result = ' '.str_repeat('     ', $depth).''.$element['title'].' '; $submenus = $element['all_children']; if (!empty($submenus)) { foreach ($submenus as $submenu) { $result .= menuSelection($submenu, $group_id, $depth, $permessi_disponibili); } } return $result; } }