示例#1
0
 protected function initContrexxCaching()
 {
     global $_CONFIG;
     // in case the request's origin is from a mobile devie
     // and this is the first request (the InitCMS object wasn't yet
     // able to determine of the mobile device wishes to be served
     // with the system's mobile view), we shall deactivate the caching system
     if (\InitCMS::_is_mobile_phone() && !\InitCMS::_is_tablet() && !isset($_REQUEST['smallscreen'])) {
         $this->boolIsEnabled = false;
         return;
     }
     if ($_CONFIG['cacheEnabled'] == 'off') {
         $this->boolIsEnabled = false;
         return;
     }
     if (isset($_REQUEST['caching']) && $_REQUEST['caching'] == '0') {
         $this->boolIsEnabled = false;
         return;
     }
     // TODO: Reimplement - see #1205
     /*if ($this->isException()) {
           $this->boolIsEnabled = false;
           return;
       }*/
     $this->boolIsEnabled = true;
     // check the cache directory
     if (!is_dir(ASCMS_CACHE_PATH)) {
         \Cx\Lib\FileSystem\FileSystem::make_folder(ASCMS_CACHE_PATH);
     }
     if (!is_writable(ASCMS_CACHE_PATH)) {
         \Cx\Lib\FileSystem\FileSystem::makeWritable(ASCMS_CACHE_PATH);
     }
     $this->strCachePath = ASCMS_CACHE_PATH . '/';
     $this->intCachingTime = intval($_CONFIG['cacheExpiration']);
     // Use data of $_GET and $_POST to uniquely identify a request.
     // Important: You must not use $_REQUEST instead. $_REQUEST also contains
     //            the data of $_COOKIE. Whereas the cookie information might
     //            change in each request, which might break the caching-
     //            system.
     $request = array_merge_recursive($_GET, $_POST);
     ksort($request);
     $this->arrPageContent = array('url' => $_SERVER['REQUEST_URI'], 'request' => $request);
     $this->strCacheFilename = md5(serialize($this->arrPageContent));
 }
示例#2
0
 protected function initContrexxCaching()
 {
     global $_CONFIG;
     // in case the request's origin is from a mobile devie
     // and this is the first request (the InitCMS object wasn't yet
     // able to determine of the mobile device wishes to be served
     // with the system's mobile view), we shall cache the request separately
     $isMobile = \InitCMS::_is_mobile_phone() && !\InitCMS::_is_tablet() && !isset($_REQUEST['smallscreen']);
     if ($_CONFIG['cacheEnabled'] == 'off') {
         $this->boolIsEnabled = false;
         return;
     }
     if (isset($_REQUEST['caching']) && $_REQUEST['caching'] == '0') {
         $this->boolIsEnabled = false;
         return;
     }
     if (isset($_GET['templateEditor']) && $_GET['templateEditor'] == 1) {
         $this->boolIsEnabled = false;
         return;
     }
     // TODO: Reimplement - see #1205
     /*if ($this->isException()) {
           $this->boolIsEnabled = false;
           return;
       }*/
     if (\Cx\Core\Core\Controller\Cx::instanciate()->getMode() == \Cx\Core\Core\Controller\Cx::MODE_MINIMAL) {
         $this->boolIsEnabled = false;
         return;
     }
     $this->boolIsEnabled = true;
     $this->intCachingTime = intval($_CONFIG['cacheExpiration']);
     // Use data of $_GET and $_POST to uniquely identify a request.
     // Important: You must not use $_REQUEST instead. $_REQUEST also contains
     //            the data of $_COOKIE. Whereas the cookie information might
     //            change in each request, which might break the caching-
     //            system.
     $request = array_merge_recursive($_GET, $_POST);
     ksort($request);
     $currentUrl = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     $this->arrPageContent = array('url' => $currentUrl, 'request' => $request, 'accept_language' => $_SERVER['HTTP_ACCEPT_LANGUAGE'], 'isMobile' => $isMobile);
     $this->strCacheFilename = md5(serialize($this->arrPageContent));
 }
示例#3
0
        $graph->SetGridX($this->graphGridX);
        $graph->SetGridY($this->graphGridY);
        $graph->SetGridColor($this->graphGridColor);
        $graph->SetLineThickness(1);
        $graph->SetPointSize(2);
        //es werden dringend gerade Zahlen empfohlen
        $graph->SetPointShape("dots");
        $graph->SetShading(0);
        $graph->SetNoData($_ARRAYLANG['TXT_NO_DATA_AVAILABLE']);
        $graph->SetDataValues($this->graphArrData);
        $graph->DrawGraph();
    }
}
error_reporting(0);
/**
 * Includes
 */
global $objDatabase, $objInit, $_ARRAYLANG, $adminPage;
\Env::get('ClassLoader')->loadFile(dirname(__FILE__) . '/../../core/Core/init.php');
$cx = init('minimal');
\Env::get('ClassLoader')->loadFile($cx->getCodeBaseLibraryPath() . '/ykcee/ykcee.php');
$objDatabase = $cx->getDb()->getAdoDb();
$adminPage = true;
$objInit = new \InitCMS($mode = "backend");
$sessionObj = \cmsSession::getInstance();
$_SESSION->cmsSessionStatusUpdate("backend");
\Permission::checkAccess(19, 'static');
$objInit->_initBackendLanguage();
$objInit->getUserFrontendLangId();
$_ARRAYLANG = $objInit->loadLanguageData('Stats');
new \Cx\Core_Modules\Stats\Controller\MakeGraph();