public static function init()
 {
     if (self::$initialized) {
         return true;
     }
     if (!self::$browser) {
         self::$browser = new Browser();
     }
     if (!file_exists(INCLUDE_PATH . 'Entete.php')) {
         self::jump_install();
     } else {
         require_once INCLUDE_PATH . 'Entete.php';
     }
     if (!class_exists('Config')) {
         self::ErrorAndDie('Invalid file "entete.php" (see entete.dist.php)...', false);
     }
     Config::init();
     Config::DB_Connect();
     DataEngine::conf_cache('wormhole_cleaning');
     define('LNG_PATH', TEMPLATE_PATH . 'lng' . DIRECTORY_SEPARATOR . LNG_CODE . DIRECTORY_SEPARATOR);
     return self::minimalinit();
 }
Example #2
0
    {
        if (!get_magic_quotes_gpc()) {
            return $value;
        } else {
            return stripslashes($value);
        }
    }
    require_once CLASS_PATH . 'dataengine.class.php';
    if (!file_exists('./Entete.php')) {
        error('Utilisation incorrecte !');
    }
    require_once './Entete.php';
    require_once CLASS_PATH . 'FirePHP.class.php';
    require_once CLASS_PATH . 'fb.php';
    Config::init();
    Config::DB_Connect();
}
$file = gpc_esc($_POST['file']);
$sqlfile = ROOT_PATH . 'install' . DIRECTORY_SEPARATOR . $file . '.sql';
$lockfile = ROOT_PATH . 'install' . DIRECTORY_SEPARATOR . $file . '.lock';
if (preg_match('/[^a-zA-Z_0-9]+/', $file) > 0) {
    error('Tentative d\'injection détecté.');
}
if (!file_exists($sqlfile)) {
    error('Mise à jour corrompue !');
}
if (file_exists($lockfile)) {
    $cur = (int) file_get_contents($lockfile);
} else {
    $cur = 0;
}