Your IP : 216.73.216.68


Current Path : /home/jeromecohp/www/administrator/components/com_emailbeautifier/
Upload File :
Current File : /home/jeromecohp/www/administrator/components/com_emailbeautifier/emailbeautifier.php

<?php
/**
 * @package     EmailBeautifier
 * @subpackage  com_emailbeautifier
 *
 * @author      Techjoomla <extensions@techjoomla.com>
 * @copyright   Copyright (C) 2009 - 2022 Techjoomla. All rights reserved.
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

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

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Filesystem\File;

// Load assets
jimport('joomla.filesystem.file');
$tjStrapperPath = JPATH_ROOT . '/media/techjoomla_strapper/tjstrapper.php';

if (File::exists($tjStrapperPath))
{
	require_once $tjStrapperPath;
	TjStrapper::loadTjAssets('com_emailbeautifier');
}

// Define wrapper class
define('EB_WRAPPER_CLASS', "eb-wrapper");

// Tabstate
HTMLHelper::_('behavior.tabstate');

// Bootstrap tooltip and chosen js
HTMLHelper::_('bootstrap.tooltip');

// Load css
$document = Factory::getDocument();
$document->addStyleSheet(Uri::base() . 'components/com_emailbeautifier/css/emailbeautifier.css');

// Access check.
if (!Factory::getUser()->authorise('core.manage', 'com_emailbeautifier'))
{
	throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
}

// Include dependancies
jimport('joomla.application.component.controller');
JLoader::registerPrefix('Emailbeautifier', JPATH_COMPONENT_ADMINISTRATOR);
JLoader::register('EmailbeautifierHelper', JPATH_COMPONENT_ADMINISTRATOR . DIRECTORY_SEPARATOR
	. 'helpers' .
	DIRECTORY_SEPARATOR . 'emailbeautifier.php');
$controller = BaseController::getInstance('Emailbeautifier');
$controller->execute(Factory::getApplication()->input->get('task'));
$controller->redirect();