[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: toolbar.menus.php 5047 2006-09-14 13:49:01Z friesengeist $ 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 require_once( $mainframe->getPath( 'toolbar_html' ) ); 19 require_once( $mainframe->getPath( 'toolbar_default' ) ); 20 21 switch ($task) { 22 case 'new': 23 TOOLBAR_menus::_NEW(); 24 break; 25 26 case 'movemenu': 27 TOOLBAR_menus::_MOVEMENU(); 28 break; 29 30 case 'copymenu': 31 TOOLBAR_menus::_COPYMENU(); 32 break; 33 34 case 'edit': 35 $cid = josGetArrayInts( 'cid' ); 36 $path = $mosConfig_absolute_path .'/administrator/components/com_menus/'; 37 38 if ( $cid[0] ) { 39 $query = "SELECT type" 40 . "\n FROM #__menu" 41 . "\n WHERE id = " . (int) $cid[0] 42 ; 43 $database->setQuery( $query ); 44 $type = $database->loadResult(); 45 $item_path = $path . $type .'/'. $type .'.menubar.php'; 46 47 if ( $type ) { 48 if ( file_exists( $item_path ) ) { 49 require_once( $item_path ); 50 } else { 51 TOOLBAR_menus::_EDIT(); 52 } 53 } else { 54 echo $database->stderr(); 55 } 56 } else { 57 $type = strval( mosGetParam( $_REQUEST, 'type', null ) ); 58 $item_path = $path . $type .'/'. $type .'.menubar.php'; 59 60 if ( $type ) { 61 if ( file_exists( $item_path ) ) { 62 require_once( $item_path ); 63 } else { 64 TOOLBAR_menus::_EDIT(); 65 } 66 } else { 67 TOOLBAR_menus::_EDIT(); 68 } 69 } 70 break; 71 72 default: 73 $type = strval( mosGetParam( $_REQUEST, 'type' ) ); 74 $item_path = $path . $type .'/'. $type .'.menubar.php'; 75 76 if ( $type ) { 77 if ( file_exists( $item_path ) ) { 78 require_once( $item_path ); 79 } else { 80 TOOLBAR_menus::_DEFAULT(); 81 } 82 } else { 83 TOOLBAR_menus::_DEFAULT(); 84 } 85 break; 86 } 87 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |