| [ Index ] | PHP Cross Reference of Mambo 4.6.5 |
|
| [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Mambo 4 * @subpackage Menus 5 * @author Mambo Foundation Inc see README.php 6 * @copyright (C) 2000 - 2009 Mambo Foundation Inc. 7 * See COPYRIGHT.php for copyright notices and details. 8 * @license GNU/GPL Version 2, see LICENSE.php 9 * 10 * Redistributions of files must retain the above copyright notice. 11 * 12 * Mambo is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; version 2 of the License. 15 */ 16 17 /** ensure this file is being included by a parent file */ 18 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 19 20 class separator_menu { 21 22 /** 23 * @param database A database connector object 24 * @param integer The unique id of the category to edit (0 if new) 25 */ 26 function edit( $uid, $menutype, $option ) { 27 global $database, $my, $mainframe; 28 29 $menu = new mosMenu( $database ); 30 $menu->load( $uid ); 31 32 // fail if checked out not by 'me' 33 if ($menu->checked_out && $menu->checked_out <> $my->id) { 34 echo "<script>alert('".sprintf(T_('The module % is currently being edited by another administrator'), $menu->title)."'); document.location.href='index2.php?option=$option'</script>\n"; 35 exit(0); 36 } 37 38 if ($uid) { 39 // do stuff for existing item 40 $menu->checkout( $my->id ); 41 42 } else { 43 // do stuff for new item 44 $menu->type = 'separator'; 45 $menu->menutype = $menutype; 46 $menu->browserNav = 0; 47 $menu->ordering = 9999; 48 $menu->parent = intval( mosGetParam( $_POST, 'parent', 0 ) ); 49 $menu->published = 1; 50 } 51 52 if ( empty( $menu->name ) ) { 53 $menu->name = '- - - - - - -'; 54 } 55 56 // build the html select list for ordering 57 $lists['ordering'] = mosAdminMenus::Ordering( $menu, $uid ); 58 // build the html select list for the group access 59 $lists['access'] = mosAdminMenus::Access( $menu ); 60 // build the html select list for paraent item 61 $lists['parent'] = mosAdminMenus::Parent( $menu ); 62 // build published button option 63 $lists['published'] = mosAdminMenus::Published( $menu ); 64 65 // get params definitions 66 $params =& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); 67 68 separator_menu_html::edit( $menu, $lists, $params, $option ); 69 } 70 } 71 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed May 23 00:05:01 2012 | Cross-referenced by PHPXref 0.7 |
| Mambo API: Mambo is Free software released under the GNU/General Public License, Version 2 |