Source for file toolbar.menus.php

Documentation is available at toolbar.menus.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Menus
  5. @copyright  Refer to copyright.php
  6. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  7. @author Mambo Foundation Inc see README.php
  8. */ 
  9.  
  10. /** ensure this file is being included by a parent file */
  11. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  12.  
  13. require_once$mainframe->getPath'toolbar_html' ) );
  14. require_once$mainframe->getPath'toolbar_default' ) );
  15.  
  16. switch ($task{
  17.     case 'new':
  18.         TOOLBAR_menus::_NEW();
  19.         break;
  20.  
  21.     case 'movemenu':
  22.         TOOLBAR_menus::_MOVEMENU();
  23.         break;
  24.  
  25.     case 'copymenu':
  26.         TOOLBAR_menus::_COPYMENU();
  27.         break;
  28.  
  29.     case 'edit':
  30.         $cid     mosGetParam$_POST'cid'array(0) );
  31.         if (!is_array$cid )) {
  32.             $cid array(0);
  33.         }
  34.         $path     $mosConfig_absolute_path .'/administrator/components/com_menus/';    
  35.  
  36.         if $cid[0{
  37.             $query "SELECT type FROM #__menu WHERE id = $cid[0]";
  38.             $database->setQuery$query );
  39.             $type $database->loadResult();
  40.             $item_path  $path $type .'/'$type .'.menubar.php';
  41.             
  42.             if $type {
  43.                 if file_exists$item_path  ) ) {
  44.                     require_once$item_path  );
  45.                 else {
  46.                     TOOLBAR_menus::_EDIT($type);
  47.                 }
  48.             else {
  49.                 echo $database->stderr();
  50.             }
  51.         else {
  52.             $type         mosGetParam$_REQUEST'type'null );
  53.             $item_path  $path $type .'/'$type .'.menubar.php';
  54.             
  55.             if $type {
  56.                 if file_exists$item_path ) ) {
  57.                     require_once$item_path  );
  58.                 else {
  59.                     TOOLBAR_menus::_EDIT($type);
  60.                 }
  61.             else {
  62.                 TOOLBAR_menus::_EDIT($type);
  63.             }
  64.         }
  65.         break;
  66.  
  67.     default:
  68.         $type         trimmosGetParam$_REQUEST'type'null ) );
  69.         $item_path  $path $type .'/'$type .'.menubar.php';
  70.         
  71.         if $type {
  72.             if file_exists$item_path ) ) {
  73.                 require_once$item_path );
  74.             else {
  75.                 TOOLBAR_menus::_DEFAULT();
  76.             }
  77.         else {
  78.             TOOLBAR_menus::_DEFAULT();
  79.         }
  80.         break;
  81. }
  82. ?>

Documentation generated on Mon, 05 May 2008 16:23:40 +0400 by phpDocumentor 1.4.0