Ejemplo n.º 1
0
 function ew_plugin_options()
 {
     $extraWatchPath = getExtraWatchPath();
     if (!current_user_can('edit_pages')) {
         wp_die(__('You do not have sufficient permissions to access this page.'));
     }
     echo '<div class="wrap">';
     require_once $extraWatchPath . "components" . DS . "com_extrawatch" . DS . "config.php";
     require_once $extraWatchPath . "components" . DS . "com_extrawatch" . DS . "src" . DS . "inc.extrawatch.env.php";
     require_once $extraWatchPath . "administrator" . DS . "components" . DS . "com_extrawatch" . DS . "admin.extrawatch.php";
     echo extrawatch_mainController();
     echo '</div>';
 }
Ejemplo n.º 2
0
 static function getAjax()
 {
     if (@$_REQUEST["env"] == "ExtraWatchJoomlaEnv") {
         ///
         defined('_JEXEC') or die('Restricted access');
     }
     if (!defined("_JEXEC")) {
         define("_JEXEC", 1);
     }
     if (!defined('DS')) {
         define('DS', DIRECTORY_SEPARATOR);
     }
     $modulePath = realpath(dirname(__FILE__) . DS . '..' . DS . '..');
     if (!defined("JPATH_BASE2")) {
         define("JPATH_BASE2", $modulePath);
     }
     if (@EXTRAWATCH_PROFILING_ENABLED) {
         $t1 = round(microtime(true) * 1000);
     }
     require_once $modulePath . DS . 'administrator' . DS . 'components' . DS . 'com_extrawatch' . DS . 'admin.extrawatch.php';
     if (@_EW_CLOUD_MODE) {
         $queryParams = ExtraWatchHelper::getUrlQueryParams();
         if (@(!$task)) {
             $task = @$queryParams['task'];
             ///
         }
         echo @extrawatch_mainController(@$task);
     }
     if (@EXTRAWATCH_PROFILING_ENABLED) {
         $time = round(microtime(true) * 1000) - $t1;
     }
     if (@EXTRAWATCH_PROFILING_ENABLED) {
         ExtraWatchLog::debug("({$time} ms) controller call ");
     }
     die;
 }
Ejemplo n.º 3
0
    defined('_JEXEC') or die('Restricted access');
}
if (!defined("_JEXEC")) {
    define("_JEXEC", 1);
}
/* wordpress performance optimization */
ini_set('html_errors', 0);
define('SHORTINIT', true);
define('MYSQL_NEW_LINK', false);
/* wordpress performance optimization */
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
$modulePath = realpath(dirname(__FILE__) . DS . '..' . DS . '..');
if (!defined("JPATH_BASE2")) {
    define("JPATH_BASE2", $modulePath);
}
if (@EXTRAWATCH_PROFILING_ENABLED) {
    $t1 = round(microtime(true) * 1000);
}
require_once $modulePath . DS . 'administrator' . DS . 'components' . DS . 'com_extrawatch' . DS . 'admin.extrawatch.php';
if (@_EW_CLOUD_MODE) {
    echo @extrawatch_mainController(@$task);
}
if (@EXTRAWATCH_PROFILING_ENABLED) {
    $time = round(microtime(true) * 1000) - $t1;
}
if (@EXTRAWATCH_PROFILING_ENABLED) {
    ExtraWatchLog::debug("({$time} ms) controller call ");
}
die;