public function exportPDF() { AImporter::controller('passengers'); $controller = new BookproControllerPassengers(); return $controller->exportpdf(); }
// import joomla controller library jimport('joomla.application.component.controller'); require_once JPATH_ROOT . DS . 'components' . DS . 'com_bookpro' . DS . 'libraries' . DS . 'rad' . DS . 'bootstrap.php'; //insert file bug require_once JPATH_ROOT . DS . 'components' . DS . 'com_bookpro' . DS . 'libraries' . DS . 'base' . DS . 'libs' . DS . 'basic.php'; /* @var $language JLanguage */ $language = JFactory::getLanguage(); $language->load('com_bookpro', JPATH_SITE, null, true); //insert base include JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'importer.php'; include JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'; AImporter::defines(); AImporter::helper('bookpro', 'factory', 'html', 'log'); $error_lifetime = JFactory::getApplication()->getUserState('com_bookpro.errors.lifetime', 0, 'int'); $error_lifetime = $error_lifetime > time() ? 1 : 0; JBLog::init($error_lifetime); JHtml::_('bootstrap.framework'); $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'components/com_bookpro/assets/js/bookpro.js'); //AImporter::js('common', 'joomla.javascript'); $document->addStyleSheet('components/com_bookpro/assets/css/joomla3.css'); JHtml::_('behavior.framework'); $ctr = JFactory::getApplication()->input->get('controller'); if ($ctr) { $classname = AImporter::controller(); $controller = new $classname(); } else { $controller = JControllerLegacy::getInstance('bookpro'); } $controller->execute(JFactory::getApplication()->input->get('task')); $controller->redirect();
function exportFlightReport() { AImporter::controller('flights'); $controller = new BookproControllerFlights(); return $controller->exportpdf(); }
public function exporttransport() { AImporter::controller('transportreports'); $controller = new BookproControllertransportreports(); return $controller->exportPDF(); }