[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/administrator/components/com_poll/ -> toolbar.poll.php (source)

   1  <?php
   2  /**
   3  * @version $Id: toolbar.poll.php 5014 2006-09-11 19:35:26Z friesengeist $
   4  * @package Joomla
   5  * @subpackage Polls
   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  
  20  switch ($task) {
  21      case 'new':
  22          TOOLBAR_poll::_NEW();
  23          break;
  24  
  25      case 'edit':
  26          $cid = josGetArrayInts( 'cid' );
  27  
  28          $query = "SELECT published"
  29          . "\n FROM #__polls"
  30          . "\n WHERE id = " . (int) $cid[0]
  31          ;
  32          $database->setQuery( $query );
  33          $published = $database->loadResult();
  34  
  35          $cur_template = $mainframe->getTemplate();
  36  
  37          TOOLBAR_poll::_EDIT( $cid[0], $cur_template );
  38          break;
  39  
  40      case 'editA':
  41          $id = intval( mosGetParam( $_REQUEST, 'id', 0 ) );
  42  
  43          $query = "SELECT published"
  44          . "\n FROM #__polls"
  45          . "\n WHERE id = " . (int) $id
  46          ;
  47          $database->setQuery( $query );
  48          $published = $database->loadResult();
  49  
  50          $cur_template = $mainframe->getTemplate();
  51  
  52          TOOLBAR_poll::_EDIT( $id, $cur_template );
  53          break;
  54  
  55      default:
  56          TOOLBAR_poll::_DEFAULT();
  57          break;
  58  }
  59  ?>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics