| [ 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 content_section_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 editSection( $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 $menu->checkout( $my->id ); 40 } else { 41 $menu->type = 'content_section'; 42 $menu->menutype = $menutype; 43 $menu->ordering = 9999; 44 $menu->parent = intval( mosGetParam( $_POST, 'parent', 0 ) ); 45 $menu->published = 1; 46 } 47 48 // build the html select list for section 49 $lists['componentid'] = mosAdminMenus::Section( $menu, $uid ); 50 51 // build the html select list for ordering 52 $lists['ordering'] = mosAdminMenus::Ordering( $menu, $uid ); 53 // build the html select list for the group access 54 $lists['access'] = mosAdminMenus::Access( $menu ); 55 // build the html select list for paraent item 56 $lists['parent'] = mosAdminMenus::Parent( $menu ); 57 // build published button option 58 $lists['published'] = mosAdminMenus::Published( $menu ); 59 // build the url link output 60 $lists['link'] = mosAdminMenus::Link( $menu, $uid ); 61 62 // get params definitions 63 $params =& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); 64 65 content_section_menu_html::editSection( $menu, $lists, $params, $option ); 66 } 67 } 68 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Feb 8 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 |