'); //--Setup tooltips - used almost everywhere.. JHTML::_('behavior.tooltip'); //--Get component parameters $params =& JComponentHelper::getParams( com_EASY_APP_ELKUKU_1 ); //--Setup debugger $ecr_debug = $params->get('ecr_debug'); $tmpl = JRequest::getVar('tmpl', ''); if( $ecr_debug ) { //--Set debugging ON define('ECR_DEBUG', 1); JLoader::import('helpers.debug', JPATH_COMPONENT); if( $tmpl != 'component') { echo '
Debugging
'; } } //--Add css JHTML::stylesheet('default.css','administrator/components/'.com_EASY_APP_ELKUKU_1.'/assets/css/'); //--Add javascript JHTML::script('easycreator.js', 'administrator/components/'.com_EASY_APP_ELKUKU_1.'/assets/js/', false); //--Add std HTML class JLoader::import('helpers.html.html', JPATH_COMPONENT); JLoader::import('helpers.html.toolbar', JPATH_COMPONENT); //--Require the base controller require_once( JPATH_COMPONENT.DS.'controller.php' ); //--Require specific controller if requested if( $controller = JRequest::getWord('controller') ) { $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php'; if( file_exists($path) ) { require_once $path; } else { $controller = ''; } } //--Create the controller $classname = 'EasyCreatorController'.$controller; $controller = new $classname( ); //--Check if we are on localhost - otherwise display a warning if( $params->get('warn_livesite') ) { $ip = getenv('REMOTE_ADDR'); if( $ip && $ip != '127.0.0.1' ) { JError::raiseNotice(100, JText::_('ECR_INSTALL_WARN_LOCAL_DEV')); JError::raiseNotice(100, JText::_('ECR_INSTALL_JDOC_LINK')); } } if( $tmpl == 'component') { //--Perform the Request task only - raw view $controller->execute( JRequest::getVar('task') ); } else { //--Display the menu ecrHTML::easyMenu(); //--Perform the Request task $controller->execute( JRequest::getVar('task') ); //--Display the footer ecrHTML::footer(); } //--Redirect if set by the controller $controller->redirect();