Annotation of /mambo/branches/4.6/administrator/components/com_menus/content_archive_category/content_archive_category.class.php
Parent Directory
|
Revision Log
Revision 3 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: content_archive_category.class.php,v 1.1 2005/07/22 01:52:50 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Menus | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | /** | ||
| 15 : | * @package Mambo | ||
| 16 : | * @subpackage Menus | ||
| 17 : | */ | ||
| 18 : | class content_archive_category_menu { | ||
| 19 : | /** | ||
| 20 : | * @param database A database connector object | ||
| 21 : | * @param integer The unique id of the category to edit (0 if new) | ||
| 22 : | */ | ||
| 23 : | function editCategory( $uid, $menutype, $option ) { | ||
| 24 : | global $database, $my, $mainframe; | ||
| 25 : | global $mosConfig_absolute_path; | ||
| 26 : | |||
| 27 : | $menu = new mosMenu( $database ); | ||
| 28 : | $menu->load( $uid ); | ||
| 29 : | |||
| 30 : | // fail if checked out not by 'me' | ||
| 31 : | if ($menu->checked_out && $menu->checked_out <> $my->id) { | ||
| 32 : | echo "<script>alert('The module $menu->title is currently being edited by another administrator'); document.location.href='index2.php?option=$option'</script>\n"; | ||
| 33 : | exit(0); | ||
| 34 : | } | ||
| 35 : | |||
| 36 : | if ($uid) { | ||
| 37 : | $menu->checkout( $my->id ); | ||
| 38 : | } else { | ||
| 39 : | $menu->type = 'content_archive_category'; | ||
| 40 : | $menu->menutype = $menutype; | ||
| 41 : | $menu->ordering = 9999; | ||
| 42 : | $menu->parent = intval( mosGetParam( $_POST, 'parent', 0 ) ); | ||
| 43 : | $menu->published = 1; | ||
| 44 : | } | ||
| 45 : | |||
| 46 : | // build the html select list for category | ||
| 47 : | $lists['componentid'] = mosAdminMenus::Category( $menu, $uid ); | ||
| 48 : | |||
| 49 : | // build the html select list for ordering | ||
| 50 : | $lists['ordering'] = mosAdminMenus::Ordering( $menu, $uid ); | ||
| 51 : | // build the html select list for the group access | ||
| 52 : | $lists['access'] = mosAdminMenus::Access( $menu ); | ||
| 53 : | // build the html select list for paraent item | ||
| 54 : | $lists['parent'] = mosAdminMenus::Parent( $menu ); | ||
| 55 : | // build published button option | ||
| 56 : | $lists['published'] = mosAdminMenus::Published( $menu ); | ||
| 57 : | // build the url link output | ||
| 58 : | $lists['link'] = mosAdminMenus::Link( $menu, $uid ); | ||
| 59 : | |||
| 60 : | // get params definitions | ||
| 61 : | $params =& new mosParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); | ||
| 62 : | |||
| 63 : | content_archive_category_menu_html::editCategory( $menu, $lists, $params, $option ); | ||
| 64 : | } | ||
| 65 : | } | ||
| 66 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

