Update/clean

This commit is contained in:
Hash Borgir
2023-06-04 23:01:07 -06:00
parent d9c7eb2d58
commit 4315b08b56
3 changed files with 142 additions and 72 deletions

View File

@@ -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