Source for file toolbar.poll.html.php

Documentation is available at toolbar.poll.html.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Polls
  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. class TOOLBAR_poll {
  14.     /**
  15.     * Draws the menu for a New category
  16.     */
  17.     function _NEW({
  18.         mosMenuBar::startTable();
  19.         mosMenuBar::save();
  20.         mosMenuBar::spacer();
  21.         mosMenuBar::cancel();
  22.         mosMenuBar::spacer();
  23.         mosMenuBar::help'new' );
  24.         mosMenuBar::endTable();
  25.     }
  26.     /**
  27.     * Draws the menu for Editing an existing category
  28.     */
  29.     function _EDIT$pollid$cur_template {
  30.         global $database;
  31.         global $id;
  32.         
  33.         $sql "SELECT template FROM #__templates_menu WHERE client_id='0' AND menuid='0'";
  34.         $database->setQuery$sql );
  35.         $cur_template $database->loadResult();
  36.         mosMenuBar::startTable();
  37.         $popup='pollwindow';
  38.         ?>
  39.         <td><a class="toolbar" href="#" onclick="window.open('popups/<?php echo $popup;?>.php?pollid=<?php echo $pollid?>&t=<?php echo $cur_template?>', 'win1', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" onmouseout="MM_swapImgRestore();"  onmouseover="MM_swapImage('preview','','images/preview_f2.png',1);"><img src="images/preview.png" alt="<?php echo T_('Preview'?>" border="0" name="preview" align="middle" /><br /><?php echo T_('Preview'?></a></td>
  40.         <?php
  41.         mosMenuBar::spacer();
  42.         mosMenuBar::save();
  43.         mosMenuBar::spacer();
  44.         if $id {
  45.             // for existing content items the button is renamed `close`
  46.             mosMenuBar::cancel'cancel'T_('Close') );
  47.         else {
  48.             mosMenuBar::cancel();
  49.         }
  50.         mosMenuBar::spacer();
  51.         mosMenuBar::help'edit' );
  52.         mosMenuBar::endTable();
  53.     }
  54.     function _DEFAULT({
  55.         mosMenuBar::startTable();
  56.         mosMenuBar::publishList();
  57.         mosMenuBar::spacer();
  58.         mosMenuBar::unpublishList();
  59.         mosMenuBar::spacer();
  60.         mosMenuBar::addNewX();
  61.         mosMenuBar::spacer();
  62.         mosMenuBar::editListX();
  63.         mosMenuBar::spacer();
  64.         mosMenuBar::deleteList();
  65.         mosMenuBar::spacer();
  66.         mosMenuBar::help'manager' );
  67.         mosMenuBar::endTable();
  68.     }
  69. }
  70. ?>

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