Location: PHPKode > projects > injooosm > components/com_injooosm/injooosm.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: injooosm.php 2010-02-05 14:03:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage frontend
 * @license GNU/GPL
 * @filesource
 *
 */

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


// Require the base controller
require_once JPATH_COMPONENT.DS.'controller.php';

// Require the base helper
require_once JPATH_COMPONENT.DS.'helpers'.DS.'layout.php';
require_once JPATH_COMPONENT.DS.'helpers'.DS.'helper.php';
JLoader::register('gpsCLass', '.'.DS.'components'.DS.'com_injooosm'.DS.'helpers'.DS);
JLoader::import('components.com_injooosm.helpers.gpsClass', JPATH_SITE, 'gpsClass');

$cfg = injooosmHelper::getConfig();
// set the template
$tmpl = ($cfg->template = "") ? $cfg->template : 'default';


$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base().'components'.DS.'com_injooosm'.DS.'assets'.DS.'injooosm.css');
$document->addStyleSheet(JURI::base().'components'.DS.'com_injooosm'.DS.'assets'.DS.'template'.DS.$tmpl.DS.'style.css');



// Initialize the controller
if($controller = JRequest::getWord('controller')) {
    $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
    if (file_exists($path)) {
        require_once $path;
    } else {
        $controller = '';
    }
}

$classname    = 'injooosmController'.ucfirst($controller);
$controller   = new $classname( );

// Register Extra tasks
$controller->registerTask( 'save', 'save' );

$controller->execute( JRequest::getCmd( 'task' ) );

// Redirect if set by the controller
$controller->redirect();
Return current item: injooosm