本文整理匯總了PHP中saveMenu函數的典型用法代碼示例。如果您正苦於以下問題:PHP saveMenu函數的具體用法?PHP saveMenu怎麽用?PHP saveMenu使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了saveMenu函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: saveMenu
function saveMenu($id, $data, $menu)
{
if (!empty($menu) && count($menu) > 0) {
foreach ($menu as $key => $value) {
if (!empty($value['id']) && $value['id'] == $id) {
$menu[$key] = $data;
if (isset($value['sub'])) {
$menu[$key]['sub'] = $value['sub'];
}
break;
}
if (!empty($value['sub']) && count($value['sub']) > 0) {
$menu[$key]['sub'] = saveMenu($id, $data, $value['sub']);
}
}
}
return $menu;
}
示例2: defined
* @copyright (C) 2000 - 2004 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
//$types[] = mosHTML::makeOption( 'new_item', 'Content Item' );
$types[] = mosHTML::makeOption('content_archive_section', 'Section Archive Blog');
$reqpath = "{$mosConfig_absolute_path}/administrator/components/com_menus/content_archive_section";
require_once "{$reqpath}/content_archive_section.class.php";
require_once "{$reqpath}/content_archive_section.menu.html.php";
switch ($task) {
case "content_archive_section":
// this is the new item, ie, the same name as the menu `type`
content_archive_section_menu::editSection(0, $menutype, $option);
break;
case "edit":
content_archive_section_menu::editSection($cid[0], $menutype, $option);
break;
case "save":
// no special handling
saveMenu($option);
break;
case "publish":
case "unpublish":
// no special action
break;
case "remove":
// no special action
break;
}
示例3: defined
<?php
/**
* @package Mambo
* @subpackage Menus
* @author Mambo Foundation Inc see README.php
* @copyright Mambo Foundation Inc.
* See COPYRIGHT.php for copyright notices and details.
* @license GNU/GPL Version 2, see LICENSE.php
* Mambo is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the License.
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
mosAdminMenus::menuItem($type);
switch ($task) {
case 'newsfeed_category_table':
// this is the new item, ie, the same name as the menu `type`
newsfeed_category_table_menu::editCategory(0, $menutype, $option);
break;
case 'edit':
newsfeed_category_table_menu::editCategory($cid[0], $menutype, $option);
break;
case 'save':
case 'apply':
saveMenu($option, $task);
break;
}
示例4: DrawMenuList
$GLOBALS["addjs_modules"] .= ",sec-menu.js";
$GLOBALS["addjs_assets"] .= ",ace-editor/ace.js";
if (!isset($_GET["arg"])) {
DrawMenuList();
} else {
switch ($_GET["arg"]) {
case "ajax-save":
$id = $connection->real_escape_string($_POST["id"]);
$container = $connection->real_escape_string($_POST["container"]);
$type = $connection->real_escape_string($_POST["type"]);
$title = $connection->real_escape_string($_POST["title"]);
$json = $connection->real_escape_string($_POST["json"]);
if ($id == "") {
$id = uniqid();
}
saveMenu($id, $container, $type, $title, $json);
break;
case "ajax-manual-editor":
$id = $connection->real_escape_string($_POST["id"]);
GetEditorContent($id);
break;
case "ajax-delete":
$id = $connection->real_escape_string($_POST["id"]);
DeleteMenu($id);
break;
case "ajax-load-cscope-pages-datalist":
LoadScopeDatalist($connection->real_escape_string($_POST["container"]));
break;
default:
$arg = $connection->real_escape_string($_GET["arg"]);
DrawEditGUI($arg);
示例5: mosGetParam
$cid = mosGetParam($_POST, 'cid', '');
if (isset($cid[0])) {
$cid[0] = stripslashes($cid[0]);
}
switch ($task) {
case 'new':
editMenu($option, '');
break;
case 'edit':
if (!$menu) {
$menu = $cid[0];
}
editMenu($option, $menu);
break;
case 'savemenu':
saveMenu();
break;
case 'deleteconfirm':
deleteconfirm($option, $cid[0]);
break;
case 'deletemenu':
deleteMenu($option, $cid, $type);
break;
case 'copyconfirm':
copyConfirm($option, $cid[0]);
break;
case 'copymenu':
copyMenu($option, $cid, $type);
break;
case 'cancel':
cancelMenu($option);