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

