Testing on windows

This commit is contained in:
color.diff=auto 2021-03-26 13:09:05 -06:00
parent daf501785e
commit 04ddcce846
7 changed files with 8 additions and 9 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
db
*.db
txt/
txt2/

View File

@ -1,2 +0,0 @@
db
txt/

View File

@ -45,7 +45,7 @@ if (file_exists("d2im.db") && (file_exists($_SESSION['modname'].".db"))){
// If there's data, process it and save
if (!empty($_POST)) {
// save db name from post info conf file
// save db name from post into conf file
require_once './src/D2SaveFile.php';
$saver = new D2SaveFile();

View File

@ -3,7 +3,7 @@ include "includes.php";
if (file_exists("d2im.db")) {
unlink(DB_FILE);
if(file_exists(DB_FILE)) unlink(DB_FILE);
$files = new D2Files();
$parser = new D2TxtParser();

View File

@ -106,7 +106,7 @@ require_once "head.php";
<hr style="margin: 60px;">
<div class="offset-2 col-8">
<h2>Select Mod folder</h2>
<p style="font-family: lato">Example: D:\Diablo II\MODS\you-mod-name\</p>
<p style="font-family: lato">Example: D:\Diablo II\MODS\your-mod-name\</p>
<p style="font-family: lato">Input path to D2 Mod Directory.</p>
<div style="margin-top: 20px;" class="ctrl-config">

View File

@ -46,6 +46,7 @@ class D2Database {
$tableName = basename($file);
$tableName = strtolower(substr($tableName, 0, -4));
$sql = '';
foreach ($data as $d) {
$sql = "INSERT INTO `$tableName` (";
if (!empty($d)) {

View File

@ -55,12 +55,11 @@ class D2TxtParser {
}
, file($file));
$header = array_shift($rows);
$data = null;
foreach ($rows as $row) {
$data[] = @array_combine($header, $row);
}
return $data;
}
}
?>