| [ 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_archive_section_menu { 21 /** 22 * @param database A database connector object 23 * @param integer The unique id of the category to edit (0 if new) 24 */ 25 function editSection( $uid, $menutype, $option ) { 26 global $database, $my, $mainframe; 27 28 $menu = new mosMenu( $database ); 29 $menu->load( $uid ); 30 31 // fail if checked out not by 'me' 32 if ($menu->checked_out && $menu->checked_out <> $my->id) { 33 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"; 34 exit(0); 35 } 36 37 if ( $uid ) { 38 $menu->checkout( $my->id ); 39 } else { 40 $menu->type = 'content_archive_section'; 41 $menu->menutype = $menutype; 42 $menu->ordering = 9999; 43 $menu->parent = intval( mosGetParam( $_POST, 'parent', 0 ) ); 44 $menu->published = 1; 45 } 46 47 // build the html select list for section 48 $lists['componentid'] = mosAdminMenus::Section( $menu, $uid, 1 ); 49 50 // build the html select list for ordering 51 $lists['ordering'] = mosAdminMenus::Ordering( $menu, $uid ); 52 // build the html select list for the group access 53 $lists['access'] = mosAdminMenus::Access( $menu ); 54 // build the html select list for paraent item 55 $lists['parent'] = mosAdminMenus::Parent( $menu ); 56 // build published button option 57 $lists['published'] = mosAdminMenus::Published( $menu ); 58 // build the url link output 59 $lists['link'] = mosAdminMenus::Link( $menu, $uid ); 60 61 // get params definitions 62 $params =& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); 63 64 content_archive_section_menu_html::editSection( $menu, $lists, $params, $option ); 65 } 66 } 67 ?>
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 |