require_once JPATH_ROOT . DS . 'components' . DS . 'com_bookpro' . DS . 'libraries' . DS . 'base' . DS . 'libs' . DS . 'basic.php'; include JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_bookpro' . DS . 'helpers' . DS . 'importer.php'; include JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'log.php'; $siteUrl = 'var siteURL = "' . JURI::base() . '";'; JHtml::_('bootstrap.framework'); $doc = JFactory::getDocument(); $doc->addScript(JURI::root() . 'components/com_bookpro/assets/js/bookpro.js'); $doc->addScriptDeclaration($siteUrl); $doc->addStyleSheet(JURI::base() . 'components/com_bookpro/assets/css/bookpro.css'); $error_lifetime = JFactory::getApplication()->getUserState('com_bookpro.errors.lifetime', 0, 'int'); $error_lifetime = $error_lifetime > time() ? 1 : 0; JBLog::init($error_lifetime); $language = JFactory::getLanguage(); /* @var $language JLanguage */ //$language->load('com_bookpro.common', JPATH_ADMINISTRATOR); AImporter::defines(); AImporter::css('common'); $controller = JRequest::getCmd('controller'); $view = JRequest::getCmd('view'); if (!$controller) { $controller = JControllerLegacy::getInstance('BookPro'); } else { if (file_exists(JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php')) { require_once JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php'; } else { JError::raiseError(403, JText::_('Access Forbidden')); } $classname = 'BookProController' . $controller; $controller = new $classname(); } // Perform the Request task