Files
sourceforge-ossez/oss/joomla/trunk/components/com_apoll/apoll.php
T
YuCheng Hu 07d61be3a0 添加到 trunk
+YUCHENG HU+

git-svn-id: https://svn.code.sf.net/p/hawebs/svn@276 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
2010-06-13 22:21:44 +00:00

49 lines
1.5 KiB
PHP

<?php
# @version $Id: components/com_apoll/apoll.php
# @package: Apoll Vote
# ===================================================
# @author
# Name: Hristo Genev
# Email: [email protected]
# Url: http://www.afactory.org
# ===================================================
# @copyright Copyright (C) 2008 aFactory.org All rights reserved.
# @license see http://www.gnu.org/licenses/lgpl.html GNU/LGPL.
# You can use, redistribute this file and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation.
# License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
// Set the table directory
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
// Require the base controller
require_once (JPATH_COMPONENT.DS.'controller.php');
// Require specific controller if requested
if($controller = JRequest::getWord('c')) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
// Create the controller
$classname = 'ApollController'.ucfirst($controller);
$controller = new $classname( );
// Register Extra tasks
$controller->registerTask( 'results', 'display' );
// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
?>