mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-09-19 01:52:09 +00:00
Config DB renamed/refactored to D2Modder.db
This commit is contained in:
@@ -41,38 +41,37 @@
|
||||
|
||||
*/
|
||||
|
||||
// Second step after D2Config. If we made it here, d2im.db should
|
||||
// Second step after D2Config. If we made it here, D2Modder.db should
|
||||
// have been created. Config writes active mod to session.
|
||||
|
||||
session_start();
|
||||
include "./_pdo.php";
|
||||
include "./config.php";
|
||||
function processCubeMain(){
|
||||
|
||||
$bin = getcwd().DIRECTORY_SEPARATOR."bin".DIRECTORY_SEPARATOR."sqlite3.exe ";
|
||||
$dbfile = getcwd().DIRECTORY_SEPARATOR.DB_FILE;
|
||||
$cubemain = TXT_PATH."cubemain.txt";
|
||||
|
||||
// D:\Documents\D2IM\www\bin\sqlite3.exe D:\Documents\D2IM\www\ZyEl4.5.db ".separator \"\t"\" ".import \"D:\\Diablo II\\MODS\\D2SE_Zy-El mod v4.5 HiRes\\data\\global\\excel\\cubemain.txt\" cubemain"
|
||||
|
||||
exec("$bin $dbfile \".separator \\\"\\t\\\"\" \".import \\\"$cubemain\\\" cubemain\"");
|
||||
}
|
||||
// check to see if config db exists or if for some reason it doesn't exist
|
||||
if (file_exists("d2im.db")) {
|
||||
if (file_exists(APP_DB)) {
|
||||
if (file_exists($_SESSION['modname'] . ".db")) {
|
||||
unlink($_SESSION['modname'] . ".db"); // delete old mod db file
|
||||
}
|
||||
// Set CONSTANTS (if d2im.db exists, D2Config set the session mod correctly)
|
||||
// Set CONSTANTS (if D2Modder.db exists, D2Config set the session mod correctly)
|
||||
define('FILTER_PROPERTIES_FILE', 'filterProperties.txt');
|
||||
define('DB_FILE', $_SESSION['modname'] . ".db");
|
||||
define('TXT_PATH', $_SESSION['path']);
|
||||
|
||||
// require D2IM src
|
||||
// require src
|
||||
require_once "./src/D2Functions.php";
|
||||
require_once "./src/D2Database.php";
|
||||
require_once './src/D2Files.php';
|
||||
require_once './src/D2TxtParser.php';
|
||||
|
||||
// Create D2IM objects
|
||||
// Create objects
|
||||
$files = new D2Files();
|
||||
$parser = new D2TxtParser();
|
||||
$db = new D2Database();
|
||||
|
Reference in New Issue
Block a user