<?php

$id = $_GET['id'];
isset($conf['sys_menus'][$id]) or yun_error('该菜单不存在');
$m = $conf['sys_menus'][$id];
if ($m['mod'] == 'link_' || $m['mod'] == 'home_' || $m['mod'] == 'fun_')
{
    unset($conf['sys_menus'][$id]);
} elseif ($m['mod'] == 'page_')
{
    unset($conf['sys_menus'][$id]);
    $db->query("delete from " . PF . "page where id='$id'");
} else
{
    do_apply('menu_del', null, $id, $conf['sys_menus'][$id]['mod']);
}
set_conf('sys_menus', $conf['sys_menus']);
$js = 'document.getElementById("ms_' . $id . '").style.display="none";';
if (isset($conf['sys_pmenus'][$id]))
{
    yun_succeed('删除成功', 'refresh', true);
}
yun_succeed('删除成功', $js);

?>