Beispiel #1
0
* @author		MOLEDesign (Morgan Leecy) - http://www.moledesign.biz - morgan@moledesign.biz
* @license		GNU/GPL
*
*             .oooO  Oooo.
*             (   )  (   )
* -------------\ (----) /----------------------------------------------------------- +
*               \_)  (_/
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
//Copy this line to be able to call the application from outside (Module, Plugin, Third component, ...)
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_rtiprint' . DS . 'helpers' . DS . 'loader.php';
//Document title
$document = JFactory::getDocument();
$document->titlePrefix = "RT iPrint - ";
$document->titleSuffix = "";
if (defined('JDEBUG') && count($_POST)) {
    $_SESSION['Rtiprint']['$_POST'] = $_POST;
}
$jinput = JFactory::getApplication()->input;
// When this component is called to return a file
// TODO : A better practice is to call it through the View Class
if ($jinput->get('task', null, 'CMD') == 'file') {
    RtiprintClassFile::returnFile('db');
}
$controller = CkJController::getInstance('Rtiprint');
$controller->execute($jinput->get('task', null, 'CMD'));
$controller->redirect();