mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
Update/clean
This commit is contained in:
@@ -49,18 +49,7 @@ include "./_pdo.php";
|
||||
include "./config.php";
|
||||
|
||||
function processFilesManuallyInSqlite() {
|
||||
|
||||
$bin = getcwd() . DIRECTORY_SEPARATOR . "bin" . DIRECTORY_SEPARATOR . "sqlite3.exe ";
|
||||
$dbfile = getcwd() . DIRECTORY_SEPARATOR . DB_FILE;
|
||||
$cubemain = TXT_PATH . "cubemain.txt";
|
||||
$misc = TXT_PATH . "Misc.txt";
|
||||
exec("$bin $dbfile \".separator \\\"\\t\\\"\" \".import \\\"$cubemain\\\" cubemain\"");
|
||||
exec("$bin $dbfile \".separator \\\"\\t\\\"\" \".import \\\"$misc\\\" misc\"");
|
||||
}
|
||||
|
||||
function processFilesManuallyInSqliteLinux() {
|
||||
|
||||
$bin = "/usr/bin/sqlite3";
|
||||
$bin = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? getcwd() . DIRECTORY_SEPARATOR . "bin" . DIRECTORY_SEPARATOR . "sqlite3.exe" : "/usr/bin/sqlite3";
|
||||
$dbfile = getcwd() . DIRECTORY_SEPARATOR . DB_FILE;
|
||||
$cubemain = TXT_PATH . "CubeMain.txt";
|
||||
$misc = TXT_PATH . "Misc.txt";
|
||||
@@ -105,7 +94,6 @@ if (file_exists(APP_DB)) {
|
||||
|
||||
// Process Files Manually In Sqlite
|
||||
processFilesManuallyInSqlite();
|
||||
processFilesManuallyInSqliteLinux();
|
||||
|
||||
function toPngAll() {
|
||||
$q = realpath("bin\qdc6.exe");
|
||||
@@ -159,6 +147,8 @@ if (file_exists(APP_DB)) {
|
||||
// if config db does not exist, go to configure page
|
||||
header("Location: /src/D2Config.php");
|
||||
}
|
||||
require_once './src/D2Strings.php';
|
||||
new D2Strings();
|
||||
|
||||
|
||||
// put in html redirect as backup, because
|
||||
|
Reference in New Issue
Block a user