Annotation of /mambo/branches/4.6/administrator/components/com_poll/toolbar.poll.php
Parent Directory
|
Revision Log
Revision 3 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: toolbar.poll.php,v 1.1 2005/07/22 01:53:21 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Polls | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | require_once( $mainframe->getPath( 'toolbar_html' ) ); | ||
| 15 : | |||
| 16 : | switch ($task) { | ||
| 17 : | case 'new': | ||
| 18 : | TOOLBAR_poll::_NEW(); | ||
| 19 : | break; | ||
| 20 : | |||
| 21 : | case 'edit': | ||
| 22 : | $cid = mosGetParam( $_REQUEST, 'cid', array(0) ); | ||
| 23 : | if (!is_array( $cid )) { | ||
| 24 : | $cid = array(0); | ||
| 25 : | } | ||
| 26 : | |||
| 27 : | $database->setQuery( "SELECT published FROM #__polls WHERE id='$cid[0]'" ); | ||
| 28 : | $published = $database->loadResult(); | ||
| 29 : | |||
| 30 : | $cur_template = $mainframe->getTemplate(); | ||
| 31 : | |||
| 32 : | TOOLBAR_poll::_EDIT( $cid[0], $cur_template ); | ||
| 33 : | break; | ||
| 34 : | |||
| 35 : | case 'editA': | ||
| 36 : | $id = mosGetParam( $_REQUEST, 'id', 0 ); | ||
| 37 : | |||
| 38 : | $database->setQuery( "SELECT published FROM #__polls WHERE id='$id'" ); | ||
| 39 : | $published = $database->loadResult(); | ||
| 40 : | |||
| 41 : | $cur_template = $mainframe->getTemplate(); | ||
| 42 : | |||
| 43 : | TOOLBAR_poll::_EDIT( $id, $cur_template ); | ||
| 44 : | break; | ||
| 45 : | |||
| 46 : | default: | ||
| 47 : | TOOLBAR_poll::_DEFAULT(); | ||
| 48 : | break; | ||
| 49 : | } | ||
| 50 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

