[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

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

   1  <?php
   2  /**
   3  * @version $Id: submit_content.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 docs/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  /** ensure this file is being included by a parent file */
  16  defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
  17  
  18  /**
  19  * @package Joomla
  20  * @subpackage Menus
  21  */
  22  class submit_content_menu {
  23  
  24      /**
  25      * @param database A database connector object
  26      * @param integer The unique id of the category to edit (0 if new)
  27      */
  28  	function edit( &$uid, $menutype, $option ) {
  29          global $database, $my, $mainframe;
  30  
  31          $menu = new mosMenu( $database );
  32          $menu->load( (int)$uid );
  33  
  34          // fail if checked out not by 'me'
  35          if ($menu->checked_out && $menu->checked_out != $my->id) {
  36              mosErrorAlert( "The module ".$menu->title." is currently being edited by another administrator" );
  37          }
  38  
  39          if ($uid) {
  40              $menu->checkout( $my->id );
  41          } else {
  42              $menu->type            = 'submit_content';
  43              $menu->menutype        = $menutype;
  44              $menu->browserNav    = 0;
  45              $menu->ordering        = 9999;
  46              $menu->parent        = intval( mosGetParam( $_POST, 'parent', 0 ) );
  47              $menu->published    = 1;
  48          }
  49          // build the html select list for section
  50          $lists['componentid']        = mosAdminMenus::Section( $menu, $uid );
  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          submit_content_menu_html::edit( $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