elseif ($_REQUEST['act'] == 'menu')
{
include_once('includes/inc_menu.php');
include_once('includes/inc_priv.php');
foreach ($modules AS $key => $value)
{
ksort($modules[$key]);
}
ksort($modules);
foreach ($modules AS $key => $val)
{
$menus[$key]['label'] = $_LANG[$key];
if (is_array($val))
{
foreach ($val AS $k => $v)
{
if ( isset($purview[$k]))
{
if (is_array($purview[$k]))
{
$boole = false;
foreach ($purview[$k] as $action)
{
$boole = $boole || admin_priv($action, '', false);
}
if (!$boole)
{
continue;
}
}
else
{
if (! admin_priv($purview[$k], '', false))
{
continue;
}
}
}
if ($k == 'ucenter_setup' && $_CFG['integrate_code'] != 'ucenter')
{
continue;
}
$menus[$key]['children'][$k]['label'] = $_LANG[$k];
$menus[$key]['children'][$k]['action'] = $v;
}
}
else
{
$menus[$key]['action'] = $val;
}
if(empty($menus[$key]['children']))
{
unset($menus[$key]);
}
}
$smarty->assign('menus', $menus);
$smarty->assign('no_help', $_LANG['no_help']);
$smarty->assign('help_lang', $_CFG['lang']);
$smarty->assign('charset', EC_CHARSET);
$smarty->assign('admin_id', $_SESSION['admin_id']);
$smarty->display('menu.htm');
}