Пример #1
0
 /**
  * Initializing site
  *
  * @return Site
  */
 public static function init()
 {
     if (!isset(self::$instance)) {
         self::$instance = new Site();
     }
     return self::$instance;
 }
Пример #2
0
 public static function gI()
 {
     if (self::$instance === null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Пример #3
0
 /**
  * Create and return this class.
  */
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 function _query($qry)
 {
     if (Site::instance()->debug()) {
         echo 'Requete MySql : ' . htmlentities($qry);
     }
     return @mysql_query($qry, $this->dblink);
 }
Пример #5
0
 private static function setInstance(Site $object)
 {
     self::$instance = $object;
     $objectCache = ObjectCache::getInstance();
     $objectCache->setEncryptedObject("EducaskSiteObject", $object, true);
 }
Пример #6
0
            if (is_string($erreur)) {
                $body = htmlentities($erreur);
            }
        }
        $footer = '</fieldset><p>Si cette erreur persiste, contactez un administrateur.<br /><br />@SimpleFramework, tous droits réservés.</p>';
        die($header . $body . $footer);
    }
}
///Anti MagicQuotes
if (get_magic_quotes_gpc()) {
    foreach ($_GET as $k => $v) {
        $_GET[$k] = stripslashes($v);
    }
    foreach ($_POST as $k => $v) {
        $_POST[$k] = stripslashes($v);
    }
}
require REP_RACINE . 'Config/Config.class.php';
_includeSite(REP_RACINE);
try {
    Site::instance()->load(REP_RACINE);
} catch (Exception $e) {
    $erreurHandler = null;
    if (class_exists('FatalErrorRender')) {
        $erreurHandler = new FatalErrorRender($e);
    } else {
        $erreurHandler = new FatalErrorRenderBasic($e);
    }
}
Site::instance()->timeMgr->markTime('Fin du fichier init.php');
Пример #7
0
<?php

include 'init.php';
include 'changes.php';
$pr = Site::instance()->getNewRender();
$pr->useCache('index', 100);
if ($pr->afficherSiCache()) {
} else {
    $pr->setVar('changelog', $changelog);
    $pr->setVar('templateHtml', htmlentities(file_get_contents('Templates/default/index_example.tpl')));
    $pr->afficher('index');
}
Пример #8
0
 function setExecTime()
 {
     $this->setVar('generateTime', Site::instance()->getExecTime());
 }
Пример #9
0
 function racine()
 {
     return Site::instance()->repRacine;
 }