Source for file toolbar.mambots.html.php

Documentation is available at toolbar.mambots.html.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Mambots
  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. class TOOLBAR_modules {
  11.     /**
  12.     * Draws the menu for Editing an existing module
  13.     */
  14.     function _EDIT({
  15.         global $id;
  16.  
  17.         mosMenuBar::startTable();
  18.         mosMenuBar::save();
  19.         mosMenuBar::spacer();
  20.         mosMenuBar::apply();
  21.         mosMenuBar::spacer();
  22.         if $id {
  23.             // for existing content items the button is renamed `close`
  24.             mosMenuBar::cancel'cancel'T_('Close') );
  25.         else {
  26.             mosMenuBar::cancel();
  27.         }
  28.         mosMenuBar::spacer();
  29.         if ($GLOBALS['task'== 'new'{
  30.             mosMenuBar::help'new' );
  31.         else {
  32.             if ($_POST{
  33.                 $cid = (int) $GLOBALS['cid'][0];
  34.             else {
  35.                 $cid = (int) $_GET['id'];
  36.             }
  37.             $database =mamboDatabase::getInstance();
  38.             $database->setQuery('select element from #__mambots where id = '.$cid);
  39.             $result $database->loadResult();
  40.             mosMenuBar::help$result $result 'edit' );
  41.         }
  42.         mosMenuBar::endTable();
  43.     }
  44.  
  45.     function _DEFAULT({
  46.         mosMenuBar::startTable();
  47.         mosMenuBar::publishList();
  48.         mosMenuBar::spacer();
  49.         mosMenuBar::unpublishList();
  50.         mosMenuBar::spacer();
  51.         mosMenuBar::addNewX();
  52.         mosMenuBar::spacer();
  53.         mosMenuBar::editListX();
  54.         mosMenuBar::spacer();
  55.         mosMenuBar::deleteList();
  56.         mosMenuBar::spacer();
  57.         mosMenuBar::help'manager' );
  58.         mosMenuBar::endTable();
  59.     }
  60. }
  61. ?>

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