echo $Navs['data'][$menuID]['name']; ?> "> </label> <div class="publishing-action"> <input type="submit" name="save_menu" id="save_menu_header" class="button button-primary menu-save" value="保存菜单" onclick="postsort();return false;"> </div><!-- END .publishing-action --> </div><!-- END .major-publishing-actions --> </div> </form> <div id="menu-edit-body"> <div id="menu-edit-body-content"> <ol class="nav-menu ui-sortable"> <?php $html = ''; $Menus = linkmanageGetMenu(); $menuIDarray = json_decode($zbp->Config('linkmanage')->{$menuID}, true); foreach ($menuIDarray as $key => $value) { $menu = $Menus['ID' . $key]; if ($value == 'null') { $html_tmp = ' <li sid="menuItem_' . $menu['id'] . '"> <div class="menu-item-bar"> <div class="menu-item-handle ui-sortable-handle"> <span class="item-title"><span class="menu-item-title">' . $menu['title'] . '</span> </span> <span class="item-controls"> <span class="item-type">' . $menu['type'] . '</span> <span class="item-edit ui-icon ui-icon-triangle-1-n"></span> </span> </div> </div>
function linkmanage_deleteLink($linkid, $nav_name) { global $zbp; $menu = linkmanageGetMenu(); $nav = json_decode($zbp->Config('linkmanage')->{$nav_name}, true); $have_sun = false; foreach ($nav as $key => $value) { if ($value == $linkid) { $have_sun = true; break; } } if ($have_sun) { echo 1; } else { unset($menu['ID' . $linkid]); unset($nav[$linkid]); echo 0; $zbp->Config('linkmanage')->Menu = json_encode($menu); $zbp->Config('linkmanage')->{$nav_name} = json_encode($nav); $zbp->SaveConfig('linkmanage'); } die; }