getCurUser(); $paths = M('Admin_Menu')->getCurNote()->getPath(); $nav = M('Admin_Menu')->select() ->order('rank ASC') ->fetchRows() ->toTree(); return '
'; } public function showMenu($arr, $paths, $user) { $html = ''; foreach ($arr as $row) { $allow = explode(',', $row['allow_group']); if (!$row['is_enabled']) continue; if ($row['allow_group'] && @!in_array($user['group_id'], $allow)) continue; $url = H('Url', 'controller=admin_menu&action=redirect&id='.$row['id']); $opened = isset($paths[$row['id']]) ? 'active open' : ''; if ($row['childs_num']) { $html .= '