$db = null; } } } } register_shutdown_function('LastAction'); if (isset($noframe)) { session_register("noframe"); $_SESSION["noframe"] = $noframe = true; } if (!file_exists("./theme/" . $localtheme . "/define.php")) { unset($_COOKIE["SQLiteManager_currentTheme"]); $localtheme = "default"; } include_once "./theme/" . $localtheme . "/define.php"; if (!CheckExtension('sqlite') && !(CheckExtension('pdo') && CheckExtension('pdo_sqlite'))) { displayError($traduct->get(6)); exit; } else { // Search SQLite versions (if available version2 and version3) $tabSQLiteVersion = array(); if (function_exists('sqlite_open')) { $tabSQLiteVersion[] = sqlite_libversion(); } if (class_exists('PDO') && in_array('sqlite', PDO::getavailabledrivers())) { $dbVersion = new PDO('sqlite::memory:', '', ''); $query = "SELECT sqlite_version();"; $res = $dbVersion->query($query); $tabSQLiteVersion[] = $res->fetchColumn(); unset($dbVersion); }
} } register_shutdown_function('LastAction'); if (isset($noframe)) { session_register("noframe"); $_SESSION["noframe"] = $noframe = true; } if (!file_exists("./theme/" . $localtheme . "/define.php")) { unset($_COOKIE["SQLiteManager_currentTheme"]); $localtheme = "default"; } include_once "./theme/" . $localtheme . "/define.php"; if (phpversion() < '5.3.0') { $bExtOk = CheckExtension('sqlite') || CheckExtension('pdo') && CheckExtension('pdo_sqlite'); } else { $bExtOk = CheckExtension('pdo_sqlite'); } if (!$bExtOk) { displayError($traduct->get(6)); exit; } else { // Search SQLite versions (if available version2 and version3) $tabSQLiteVersion = array(); if (function_exists('sqlite_open')) { $tabSQLiteVersion[] = sqlite_libversion(); } if (class_exists('PDO') && in_array('sqlite', PDO::getavailabledrivers())) { $dbVersion = new PDO('sqlite::memory:', '', ''); $query = "SELECT sqlite_version();"; $res = $dbVersion->query($query); $tabSQLiteVersion[] = $res->fetchColumn();
/** * This function will determine all version of all files in the current directory * and will fill the $versions array with this data * * @param string $directory */ function GrabLocalVersions($directory) { global $directories; if ($handle = @opendir($directory)) { while ($filename = readdir($handle)) { if (isset($filename) && !is_dir($directory . '/' . $filename) && CheckExtension($filename)) { // Increase the filecounter for this directory $directories[$directory]['localfiles']++; // Get the file versioning info and store it into the array GetFileVersionInfo($directory, $filename); } } closedir($handle); } }
<?php require_once 'web_api/config.php'; require_once 'web_api/db/idatabase.interface.php'; require_once 'web_api/db/mysql.class.php'; require_once 'web_api/db/db.class.php'; require_once 'web_api/lib/error.class.php'; require_once 'web_api/lib/errors.class.php'; echo "<h3>Installing the database</h3>"; $err = false; echo "Extension php_mysql_libmysql.dll: " . CheckExtension("mysql", $err) . "<br />"; echo "Extension php_soap.dll: " . CheckExtension("soap", $err) . "<br />"; echo "Extension xml: " . CheckExtension("xml", $err) . "<br />"; echo "Extension php_zip.dll: " . CheckExtension("zip", $err) . "<br />"; if ($err) { echo "<h4>Installing database failed. Check php.ini and try again. If the problem persists, please contact with your administrator.</h4>"; exit; } echo "<br />"; function CheckExtension($extension, $err) { if (extension_loaded($extension)) { return "ENABLED"; } else { $err = true; return "DISABLED"; } } try { Config::$SaveErrorToDataBase = false; $db = DataBase::GetDbInstance();