function shCheckFilesAccess()
 {
     shIncludeLanguageFile();
     // sometimes language file may not be included yet, need it in shCheckFileAccess
     $status = array();
     $status['administrator/components/com_sh404sef/config'] = $this->shCheckFileAccess('administrator/components/com_sh404sef/config');
     $status['administrator/components/com_sh404sef/config/config.sef.php'] = $this->shCheckFileAccess('administrator/components/com_sh404sef/config/config.sef.php');
     $status['administrator/components/com_sh404sef'] = $this->shCheckFileAccess('administrator/components/com_sh404sef');
     $status['administrator/components/com_sh404sef/custom.sef.php'] = $this->shCheckFileAccess('administrator/components/com_sh404sef/index.html');
     $status['administrator/components/com_sh404sef/logs'] = $this->shCheckFileAccess('administrator/components/com_sh404sef/logs/index.html');
     $status['administrator/components/com_sh404sef/security'] = $this->shCheckFileAccess('administrator/components/com_sh404sef/security/index.html');
     $status['components/com_sh404sef/cache'] = $this->shCheckFileAccess('components/com_sh404sef/cache/index.html');
     $this->fileAccessStatus = $status;
 }
Exemple #2
0
    die('Direct Access to this location is not allowed.');
}
// Ensure that user has access to this function.
$user =& JFactory::getUser();
if (!($user->usertype == 'Super Administrator' || $user->usertype == 'Administrator')) {
    $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
}
// Setup paths.
$sef_config_class = JPATH_ADMINISTRATOR . '/components/com_sh404sef/sh404sef.class.php';
$sef_config_file = JPATH_ADMINISTRATOR . '/components/com_sh404sef/config/config.sef.php';
// Make sure class was loaded.
if (!class_exists('shSEFConfig')) {
    if (is_readable($sef_config_class)) {
        require_once $sef_config_class;
    } else {
        JError::RaiseError(500, COM_SH404SEF_NOREAD . "( {$sef_config_class} )<br />" . COM_SH404SEF_CHK_PERMS);
    }
}
// testing JLanguage16
jimport('joomla.language.language');
$j16Language =& shjlang16Helper::getLanguage();
$loaded = $j16Language->load('com_sh404sef', JPATH_BASE);
// include sh404sef default language file
shIncludeLanguageFile();
// find about specific controller requested
$cName = JRequest::getCmd('c');
// get controller from factory
$controller = Sh404sefFactory::getController($cName);
// read and execute task
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Exemple #3
0
 /**
  * Class constructor
  *
  * @access public
  */
 function __construct($options = array())
 {
     parent::__construct($options);
     $this->setMode(JROUTER_MODE_SEF);
     // force SEF mode
     shIncludeLanguageFile();
 }