[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/administrator/components/com_menus/content_archive_section/ -> content_archive_section.class.php (source)

   1  <?php
   2  /**
   3  * @version $Id: content_archive_section.class.php 4544 2006-08-15 13:49:12Z predator $
   4  * @package Joomla
   5  * @subpackage Menus
   6  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
   7  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
   8  * Joomla! is free software. This version may have been modified pursuant
   9  * to the GNU General Public License, and as distributed it includes or
  10  * is derivative of works licensed under the GNU General Public License or
  11  * other free or open source software licenses.
  12  * See COPYRIGHT.php for copyright notices and details.
  13  */
  14  
  15  // no direct access
  16  defined( '_VALID_MOS' ) or die( 'Restricted access' );
  17  
  18  /**
  19  * @package Joomla
  20  * @subpackage Menus
  21  */
  22  class content_archive_section_menu {
  23      /**
  24      * @param database A database connector object
  25      * @param integer The unique id of the category to edit (0 if new)
  26      */
  27  	function editSection( $uid, $menutype, $option ) {
  28          global $database, $my, $mainframe;
  29  
  30          $menu = new mosMenu( $database );
  31          $menu->load( (int)$uid );
  32  
  33          // fail if checked out not by 'me'
  34          if ($menu->checked_out && $menu->checked_out != $my->id) {
  35              mosErrorAlert( "The module ".$menu->title." is currently being edited by another administrator" );
  36          }
  37  
  38          if ( $uid ) {
  39              $menu->checkout( $my->id );
  40          } else {
  41              $menu->type     = 'content_archive_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, 1 );
  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 mosParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' );
  64  
  65          content_archive_section_menu_html::editSection( $menu, $lists, $params, $option );
  66      }
  67  }
  68  ?>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics