CoreFiles by mySites.guru
toolbar.poll.php62 lines, 1,543 bytes, from Joomla_1.0.9-Stable-Full_Package.zip
Raw History Compare with 1.0.8
md5
36e81135f8f1c5d6e80257342893bd44
sha1
106730de68974711f35392b26dd75555c50045e9
sha256
a97ed176ac603602193c4da31d43dfd50d4ae61190b84d41ed2c6adb071478a4
<?php
/**
* @version $Id: toolbar.poll.php 3495 2006-05-15 01:44:00Z stingrey $
* @package Joomla
* @subpackage Polls
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

require_once( $mainframe->getPath( 'toolbar_html' ) );

switch ($task) {
	case 'new':
		TOOLBAR_poll::_NEW();
		break;

	case 'edit':
		$cid = mosGetParam( $_REQUEST, 'cid', array(0) );
		if (!is_array( $cid )) {
			$cid = array(0);
		}

		$query = "SELECT published"
		. "\n FROM #__polls"
		. "\n WHERE id = $cid[0]"
		;
		$database->setQuery( $query );
		$published = $database->loadResult();

		$cur_template = $mainframe->getTemplate();

		TOOLBAR_poll::_EDIT( $cid[0], $cur_template );
		break;

	case 'editA':
		$id = intval( mosGetParam( $_REQUEST, 'id', 0 ) );

		$query = "SELECT published"
		. "\n FROM #__polls"
		. "\n WHERE id = $id"
		;
		$database->setQuery( $query );
		$published = $database->loadResult();

		$cur_template = $mainframe->getTemplate();

		TOOLBAR_poll::_EDIT( $id, $cur_template );
		break;

	default:
		TOOLBAR_poll::_DEFAULT();
		break;
}
?>

The same content is in 2 releases, Joomla 1.0.9 to 1.0.10. See them all, or every version of this file.