Esempio n. 1
0
    define('DS', DIRECTORY_SEPARATOR);
}
//Require the submenu for component
jimport('joomla.application.component.table');
jimport('joomla.application.component.model');
jimport('joomla.utilities.date');
jimport('joomla.application.component.controller');
JLoader::register('JAVBModel', JPATH_COMPONENT_ADMINISTRATOR . '/models/model.php');
JLoader::register('JAVFController', JPATH_COMPONENT . '/controllers/controller.php');
JLoader::register('JAVBView', JPATH_COMPONENT_ADMINISTRATOR . '/views/view.php');
JTable::addIncludePath(JPATH_SITE . '/administrator/components/com_javoice/tables');
JAVBModel::addIncludePath(JPATH_SITE . '/components/com_javoice/models');
/* Require Helper */
require_once JPATH_SITE . '/components/com_javoice/helpers/jahelper.php';
$GLOBALS['javconfig'] = array();
JAVoiceHelpers::get_config_system();
global $javconfig;
require_once JPATH_COMPONENT_SITE . '/asset/cron/cron.php';
if (isset($javconfig['systems']) && $javconfig['systems']->get('is_turn_off_javoice', 0)) {
    if (!JAVoiceHelpers::check_access()) {
        return;
    }
}
if (!isset($_SESSION['JAV_LAST_VISITED'])) {
    if (isset($_COOKIE['JAV_LAST_VISITED'])) {
        $_SESSION['JAV_LAST_VISITED'] = $_COOKIE['JAV_LAST_VISITED'];
    } else {
        $_SESSION['JAV_LAST_VISITED'] = strtotime(date("Y-m-d") . " -3 days");
    }
    setcookie('JAV_LAST_VISITED', time());
}
Esempio n. 2
0
    define('DS', DIRECTORY_SEPARATOR);
}
JLoader::register('JAVBController', JPATH_COMPONENT . '/controllers/controller.php');
JLoader::register('JAVBView', JPATH_COMPONENT . '/views/view.php');
JLoader::register('JAVBModel', JPATH_COMPONENT . '/models/model.php');
if (version_compare(JVERSION, '3.0', 'ge')) {
    require_once JPATH_COMPONENT . "/asset/simplexml.php";
}
/*
 * Make sure the user is authorized to view this page
 */
/* Require Helper */
require_once JPATH_SITE . '/components/com_javoice/helpers/jahelper.php';
$GLOBALS['javconfig'] = array();
$JAVoiceHelpers = new JAVoiceHelpers();
$JAVoiceHelpers->get_config_system();
require_once JPATH_COMPONENT_ADMINISTRATOR . '/asset/jaconstants.php';
// Require the base controller
require_once JPATH_COMPONENT . '/controller.php';
//Require the submenu for component
//require_once (JPATH_COMPONENT.'/views/jaview/view.html.php');
if (!defined('JAVOICE_GLOBAL_SKIN')) {
    // load mootool
    JHTML::_('behavior.framework', true);
    $document = JFactory::getDocument();
    $document->addScript('//code.jquery.com/jquery-1.8.3.min.js');
    $document->addStyleSheet(JURI::root() . 'administrator/components/com_javoice/asset/css/ja.voice.css');
    if (version_compare(JVERSION, '3.0', 'ge')) {
        $document->addStyleSheet(JUri::root() . 'administrator/components/com_javoice/asset/css/ja.voice.j3x.css');
    }
    $document->addStyleSheet(JURI::root() . 'components/com_javoice/asset/css/ja.voice.css');