Source for file toolbar.poll.php

Documentation is available at toolbar.poll.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. require_once$mainframe->getPath'toolbar_html' ) );
  14.  
  15. switch ($task{
  16.     case 'new':
  17.         TOOLBAR_poll::_NEW();
  18.         break;
  19.  
  20.     case 'edit':
  21.         $cid mosGetParam$_REQUEST'cid'array(0) );
  22.         if (!is_array$cid )) {
  23.             $cid array(0);
  24.         }
  25.  
  26.         $database->setQuery"SELECT published FROM #__polls WHERE id='$cid[0]');
  27.         $published $database->loadResult();
  28.  
  29.         $cur_template $mainframe->getTemplate();
  30.         
  31.         TOOLBAR_poll::_EDIT$cid[0]$cur_template );
  32.         break;
  33.  
  34.     case 'editA':
  35.         $id mosGetParam$_REQUEST'id');
  36.         
  37.         $database->setQuery"SELECT published FROM #__polls WHERE id='$id');
  38.         $published $database->loadResult();
  39.  
  40.         $cur_template $mainframe->getTemplate();
  41.         
  42.         TOOLBAR_poll::_EDIT$id$cur_template );
  43.         break;
  44.  
  45.     default:
  46.         TOOLBAR_poll::_DEFAULT();
  47.         break;
  48. }
  49. ?>

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