mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
Latest changes. Refactor. Multi row insertion. Querying working. DB creation of all txt files. Serialized config. TODO, configure multiple mod directory feature
This commit is contained in:
parent
4d4afd5be4
commit
b28a59c313
@ -1 +1 @@
|
|||||||
/home/stoned/code/d2/txt/
|
a:2:{s:4:"path";s:25:"/home/stoned/code/d2/txt/";s:7:"modname";s:7:"Ironman";}
|
14
includes.php
Normal file
14
includes.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
define('FILTER_PROPERTIES_FILE', 'filterProperties.txt');
|
||||||
|
|
||||||
|
$config = unserialize(file_get_contents("d2im.conf"));
|
||||||
|
|
||||||
|
define('DB_FILE', $config['modname'].".db");
|
||||||
|
define('TXT_PATH', $config['path']);
|
||||||
|
|
||||||
|
include "./_pdo.php";
|
||||||
|
require_once "./src/D2Functions.php";
|
||||||
|
require_once "./src/D2Database.php";
|
||||||
|
require_once './src/D2Files.php';
|
||||||
|
require_once './src/D2TxtParser.php';
|
53
index.php
53
index.php
@ -24,50 +24,29 @@ ini_set('display_errors', 1);
|
|||||||
error_reporting(1);
|
error_reporting(1);
|
||||||
ini_set('log_errors', 1);
|
ini_set('log_errors', 1);
|
||||||
|
|
||||||
define('FILTER_PROPERTIES_FILE', 'filterProperties.txt');
|
include "includes.php";
|
||||||
define('DB_FILE', 'db');
|
|
||||||
|
|
||||||
include "../_pdo.php";
|
if (file_exists("d2im.conf")) {
|
||||||
|
|
||||||
|
if (is_dir($config['path'])) {
|
||||||
$filename = 'd2im.conf';
|
define('TXT_PATH', $config['path']);
|
||||||
|
|
||||||
if (file_exists($filename)) {
|
|
||||||
|
|
||||||
$p = file_get_contents($filename);
|
|
||||||
if (is_dir($p)) {
|
|
||||||
$path = $p;
|
|
||||||
define('TXT_PATH', $p);
|
|
||||||
} else {
|
} else {
|
||||||
header('Location: /src/D2Config.php');
|
header('Location: /src/D2Config.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once "./src/D2Functions.php";
|
$db = new D2Database();
|
||||||
require_once "./src/D2Database.php";
|
|
||||||
require_once './src/D2Files.php';
|
|
||||||
require_once './src/D2TxtParser.php';
|
|
||||||
|
|
||||||
// parse txt data
|
|
||||||
$files = new D2Files();
|
|
||||||
|
|
||||||
$parser = new D2TxtParser();
|
$parser = new D2TxtParser();
|
||||||
|
|
||||||
$armor = $parser->parseFile($files->getFile('Armor'));
|
|
||||||
$gems = $parser->parseFile($files->getFile('Gems'));
|
|
||||||
$itypes = $parser->parseFile($files->getFile('ItemTypes'));
|
|
||||||
$misc = $parser->parseFile($files->getFile('Misc'));
|
|
||||||
$prop = $parser->parseFile($files->getFile('Properties'));
|
|
||||||
$setitems = $parser->parseFile($files->getFile('SetItems'));
|
|
||||||
$sets = $parser->parseFile($files->getFile('Sets'));
|
|
||||||
$uni = $parser->parseFile($files->getFile('UniqueItems'));
|
|
||||||
$weapon = $parser->parseFile($files->getFile('Weapons'));
|
|
||||||
|
|
||||||
$u = $files->getFile("UniqueItems");
|
|
||||||
$s = $files->getFile("SetItems");
|
|
||||||
|
|
||||||
|
$armor = PDO_FetchAll('SELECT * FROM armor WHERE `spawnable`=1');
|
||||||
|
$weapon = PDO_FetchAll('SELECT * FROM weapons WHERE `spawnable`=1');
|
||||||
|
|
||||||
|
$prop = $parser->parseFile('Properties.txt');
|
||||||
|
|
||||||
// If there's data, process it and save
|
// If there's data, process it and save
|
||||||
if (!empty($_POST)) {
|
if (!empty($_POST)) {
|
||||||
|
|
||||||
|
// save db name from post info conf file
|
||||||
|
|
||||||
require_once './src/D2SaveFile.php';
|
require_once './src/D2SaveFile.php';
|
||||||
$saver = new D2SaveFile();
|
$saver = new D2SaveFile();
|
||||||
|
|
||||||
@ -86,6 +65,8 @@ if (file_exists($filename)) {
|
|||||||
|
|
||||||
|
|
||||||
if ($_POST['formtype'] == "uniqueitems") {
|
if ($_POST['formtype'] == "uniqueitems") {
|
||||||
|
|
||||||
|
|
||||||
// if ladder or carry1 is 0, set empty field.
|
// if ladder or carry1 is 0, set empty field.
|
||||||
if (!$post['ladder']) {
|
if (!$post['ladder']) {
|
||||||
$post['ladder'] = '';
|
$post['ladder'] = '';
|
||||||
@ -97,10 +78,6 @@ if (file_exists($filename)) {
|
|||||||
$saver->saveTblEnries("UniqueItems.tbl.txt");
|
$saver->saveTblEnries("UniqueItems.tbl.txt");
|
||||||
}
|
}
|
||||||
if ($_POST['formtype'] == "setitems") {
|
if ($_POST['formtype'] == "setitems") {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$saver->save($s, $post);
|
$saver->save($s, $post);
|
||||||
$saver->saveTblEnries("SetItems.tbl.txt");
|
$saver->saveTblEnries("SetItems.tbl.txt");
|
||||||
}
|
}
|
||||||
|
32
processFiles.php
Normal file
32
processFiles.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include "includes.php";
|
||||||
|
|
||||||
|
if (file_exists("d2im.conf")) {
|
||||||
|
if (is_dir($config['path'])) {
|
||||||
|
define('TXT_PATH', $config['path']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$files = new D2Files();
|
||||||
|
|
||||||
|
$parser = new D2TxtParser();
|
||||||
|
$db = new D2Database();
|
||||||
|
|
||||||
|
foreach($files->files as $k => $v){
|
||||||
|
$data[$v] = $parser->parseFile($v);
|
||||||
|
}
|
||||||
|
foreach ($data as $k => $v) {
|
||||||
|
$db->createTables($k, $v);
|
||||||
|
$db->fillsTables($k, $v);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; URL=/" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
res/app.js
10
res/app.js
@ -44,17 +44,15 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.help').hover(function(){
|
$('.help').hover(function () {
|
||||||
$(".fa-help").remove();
|
$(".fa-help").remove();
|
||||||
$(this).next().fadeToggle("slow").css({
|
$(this).next().fadeToggle("slow").css({
|
||||||
"position": "absolute",
|
"position": "absolute",
|
||||||
"z-index":"1000",
|
"z-index": "1000",
|
||||||
"background": "#eee",
|
"background": "#eee",
|
||||||
"color": "black !important",
|
"color": "black !important",
|
||||||
"border": "1px solid #aaa",
|
"border": "1px solid #aaa",
|
||||||
"width": "600px",
|
"width": "300px",
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
@ -32,8 +32,6 @@ form input {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: black;
|
color: black;
|
||||||
display:none;
|
display:none;
|
||||||
-webkit-box-shadow: #FFF 0 -1px 4px, #ff0 0 -2px 10px, #ff8000 0 -10px 20px, red 0 -18px 40px, 5px 5px 6px 5px rgba(0,0,0,0);
|
|
||||||
box-shadow: #FFF 0 -1px 4px, #ff0 0 -2px 10px, #ff8000 0 -10px 20px, red 0 -18px 40px, 5px 5px 6px 5px rgba(0,0,0,0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
select,
|
select,
|
||||||
@ -60,7 +58,6 @@ option {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: url(/img/bg.jpg);
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
font-family:lato;
|
font-family:lato;
|
||||||
@ -74,6 +71,6 @@ h1,h2,h3,h4,h5,h6, div > p {
|
|||||||
font-family: lato !important;
|
font-family: lato !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.help:hover {
|
.fa-question-circle {
|
||||||
|
bottom: 0px;
|
||||||
}
|
}
|
@ -1,4 +0,0 @@
|
|||||||
.separator "\t"
|
|
||||||
.import txt/Armor.txt armor
|
|
||||||
select * from armors;
|
|
||||||
.output armor.db
|
|
@ -19,19 +19,30 @@
|
|||||||
along with D2IM. If not, see <http://www.gnu.org/licenses/>.
|
along with D2IM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once './D2Functions.php';
|
||||||
|
|
||||||
if (!empty($_POST)) {
|
if (!empty($_POST)) {
|
||||||
|
|
||||||
|
$modname = str_replace(' ', '', $_POST['modname']);
|
||||||
|
|
||||||
// write the d2im.conf file and replace \ with \\
|
// write the d2im.conf file and replace \ with \\
|
||||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||||
$path = rtrim($_POST['path'], "\\");
|
$path = rtrim($_POST['path'], "\\");
|
||||||
$path = str_replace("\\", "\\\\", $path);
|
$path = str_replace("\\", "\\\\", $path);
|
||||||
$path .= '\\\\data\\\\global\\\\excel\\\\';
|
$path .= '\\\\data\\\\global\\\\excel\\\\';
|
||||||
file_put_contents("../d2im.conf", $path);
|
|
||||||
|
$conf['path'] = $path;
|
||||||
|
$conf['modname'] = $modname;
|
||||||
|
|
||||||
|
file_put_contents("../d2im.conf", serialize($path));
|
||||||
} else {
|
} else {
|
||||||
|
$conf['path'] = $_POST['path'].DIRECTORY_SEPARATOR;
|
||||||
file_put_contents("../d2im.conf", $_POST['path'] . DIRECTORY_SEPARATOR);
|
$conf['modname'] = $modname;
|
||||||
|
|
||||||
|
file_put_contents("../d2im.conf", serialize($conf));
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: /wait.php');
|
header("Location: /processFiles.php");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
@ -40,26 +51,36 @@ if (!empty($_POST)) {
|
|||||||
/* Require the <head> section */
|
/* Require the <head> section */
|
||||||
require_once "head.php";
|
require_once "head.php";
|
||||||
?>
|
?>
|
||||||
<body style="text-align: center; background: white;">
|
<body style="background: white;">
|
||||||
<div class="container container-top">
|
<div class="center container container-top">
|
||||||
|
|
||||||
<h1><img src="/img/Diablo2.png" style="float:left">D2 Item Maker, v3. By HashCasper</h1>
|
<h1><img src="/img/Diablo2.png" style="float:left">D2 Item Maker, v3. By HashCasper</h1>
|
||||||
<a class="btn btn-outline-danger" style="color:red; font-size: 18px;float:right;" href="/">X</a>
|
<a class="btn btn-outline-danger" style="color:red; font-size: 18px;float:right;" href="/">X</a>
|
||||||
<hr style="margin: 60px;">
|
<hr style="margin: 60px;">
|
||||||
|
<div class="offset-2 col-8">
|
||||||
<h2>Select Mod folder</h2>
|
<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\you-mod-name\</p>
|
||||||
<p style="font-family: lato">Input path to D2 Mod Directory.</p>
|
<p style="font-family: lato">Input path to D2 Mod Directory.</p>
|
||||||
|
|
||||||
<div style="margin-top: 20px;" class="ctrl-config">
|
<div style="margin-top: 20px;" class="ctrl-config">
|
||||||
<form enctype="multipart/form-data" style="font-family: Lato; font-size: 14pt;" action="" method="post">
|
<form enctype="multipart/form-data" style="font-family: Lato; font-size: 14pt;" action="" method="post">
|
||||||
<label for="path">Choose PATH</label>
|
<p>
|
||||||
<input id="path" style="width: 420px;" required="required" name="path" type="text">
|
<label for="path">Enter Mod Name</label><br>
|
||||||
<input type="submit" value="Save" name="submit" class="btn-config">
|
<input id="path" style="width: 220px;" required="required" name="modname" type="text">
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="path">Enter PATH </label><span style="font-size:11px;">(D:\Diablo II\MODS\your-mod-name)</span><br>
|
||||||
|
<input id="path" style="width: 420px;" required="required" name="path" type="text">
|
||||||
|
<input type="submit" value="Save" name="submit" class="btn-config">
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div id="loading" style="">
|
</div>
|
||||||
|
<div id="loading" class="offset-2 col-8 alert alert-warning">
|
||||||
<p style="font-family: Lato;">After saving path, app will convert txt files to SQL database.</p>
|
<p style="font-family: Lato;">After saving path, app will convert txt files to SQL database.</p>
|
||||||
<p style="font-family: Lato;">This may take a few minutes depending on the size of your txt files. <br>Please be patient. Once done, app will load. <br>Each time you set a new mod path, txt files will be processed.</p>
|
<p style="font-family: Lato;">This may take a few minutes depending on the size of your txt files. <br>Please be patient. Once done, app will load. <br>Each time you set a new mod path, txt files will be processed.
|
||||||
|
<br> Every mod will be saved to ModName.db.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
class D2Database {
|
class D2Database {
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
PDO_Connect("sqlite:" . DB_FILE);
|
PDO_Connect("sqlite:" . DB_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createTables($file, $data) {
|
public function createTables($file, $data) {
|
||||||
@ -54,20 +54,23 @@ class D2Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql = rtrim($sql, ",");
|
$sql = rtrim($sql, ",");
|
||||||
$sql .= ") ";
|
$sql .= ") ";
|
||||||
|
}
|
||||||
$sql .= "VALUES (";
|
|
||||||
|
$sql .= "VALUES ";
|
||||||
|
|
||||||
|
foreach ($data as $d) {
|
||||||
|
$sql .= "(";
|
||||||
|
|
||||||
if (!empty($d)) {
|
if (!empty($d)) {
|
||||||
foreach ($d as $k => $v) {
|
foreach ($d as $k => $v) {
|
||||||
$sql .= '"' . $v . '"' . ",";
|
$sql .= '"' . $v . '"' . ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql = rtrim($sql, ",");
|
$sql = rtrim($sql, ",");
|
||||||
$sql .= ");";
|
$sql .= "), ";
|
||||||
|
|
||||||
PDO_Execute($sql);
|
|
||||||
}
|
}
|
||||||
}
|
$sql = rtrim($sql, ", ");
|
||||||
|
PDO_Execute($sql);
|
||||||
|
}
|
||||||
}
|
}
|
108
src/D2Files.php
108
src/D2Files.php
@ -21,112 +21,16 @@
|
|||||||
|
|
||||||
class D2Files {
|
class D2Files {
|
||||||
|
|
||||||
public $files = [
|
public $files = [];
|
||||||
"Aiparms" => "Aiparms.txt",
|
|
||||||
"Arena" => "Arena.txt",
|
|
||||||
"Armor" => "Armor.txt",
|
|
||||||
"ArmType" => "ArmType.txt",
|
|
||||||
"automagic" => "automagic.txt",
|
|
||||||
"AutoMap" => "AutoMap.txt",
|
|
||||||
"belts" => "belts.txt",
|
|
||||||
"bodylocs" => "bodylocs.txt",
|
|
||||||
"Books" => "Books.txt",
|
|
||||||
"CharStats" => "CharStats.txt",
|
|
||||||
"CharTemplate" => "CharTemplate.txt",
|
|
||||||
"colors" => "colors.txt",
|
|
||||||
"CompCode" => "CompCode.txt",
|
|
||||||
"Composit" => "Composit.txt",
|
|
||||||
"CubeMain" => "CubeMain.txt",
|
|
||||||
"CubeMod" => "CubeMod.txt",
|
|
||||||
"cubetype" => "cubetype.txt",
|
|
||||||
"DifficultyLevels" => "DifficultyLevels.txt",
|
|
||||||
"ElemTypes" => "ElemTypes.txt",
|
|
||||||
"Events" => "Events.txt",
|
|
||||||
"Experience" => "Experience.txt",
|
|
||||||
"gamble" => "gamble.txt",
|
|
||||||
"Gems" => "Gems.txt",
|
|
||||||
"hiredesc" => "hiredesc.txt",
|
|
||||||
"Hireling" => "Hireling.txt",
|
|
||||||
"HitClass" => "HitClass.txt",
|
|
||||||
"Inventory" => "Inventory.txt",
|
|
||||||
"ItemRatio" => "ItemRatio.txt",
|
|
||||||
"ItemStatCost" => "ItemStatCost.txt",
|
|
||||||
"ItemTypes" => "ItemTypes.txt",
|
|
||||||
"Levels" => "Levels.txt",
|
|
||||||
"lowqualityitems" => "lowqualityitems.txt",
|
|
||||||
"LvlMaze" => "LvlMaze.txt",
|
|
||||||
"LvlPrest" => "LvlPrest.txt",
|
|
||||||
"LvlSub" => "LvlSub.txt",
|
|
||||||
"LvlTypes" => "LvlTypes.txt",
|
|
||||||
"LvlWarp" => "LvlWarp.txt",
|
|
||||||
"MagicPrefix" => "MagicPrefix.txt",
|
|
||||||
"MagicSuffix" => "MagicSuffix.txt",
|
|
||||||
"Misc" => "Misc.txt",
|
|
||||||
"MissCalc" => "MissCalc.txt",
|
|
||||||
"Missiles" => "Missiles.txt",
|
|
||||||
"MonAi" => "MonAi.txt",
|
|
||||||
"MonEquip" => "MonEquip.txt",
|
|
||||||
"MonItemPercent" => "MonItemPercent.txt",
|
|
||||||
"MonLvl" => "MonLvl.txt",
|
|
||||||
"MonMode" => "MonMode.txt",
|
|
||||||
"MonName" => "MonName.txt",
|
|
||||||
"MonPlace" => "MonPlace.txt",
|
|
||||||
"MonPreset" => "MonPreset.txt",
|
|
||||||
"MonProp" => "MonProp.txt",
|
|
||||||
"MonSeq" => "MonSeq.txt",
|
|
||||||
"MonSounds" => "MonSounds.txt",
|
|
||||||
"MonStats2" => "MonStats2.txt",
|
|
||||||
"MonStats" => "MonStats.txt",
|
|
||||||
"MonType" => "MonType.txt",
|
|
||||||
"MonUMod" => "MonUMod.txt",
|
|
||||||
"Npc" => "Npc.txt",
|
|
||||||
"Objects" => "Objects.txt",
|
|
||||||
"objgroup" => "objgroup.txt",
|
|
||||||
"ObjMode" => "ObjMode.txt",
|
|
||||||
"ObjType" => "ObjType.txt",
|
|
||||||
"Overlay" => "Overlay.txt",
|
|
||||||
"PetType" => "PetType.txt",
|
|
||||||
"PlayerClass" => "PlayerClass.txt",
|
|
||||||
"PlrMode" => "PlrMode.txt",
|
|
||||||
"PlrType" => "PlrType.txt",
|
|
||||||
"Properties" => "Properties.txt",
|
|
||||||
"qualityitems" => "qualityitems.txt",
|
|
||||||
"RarePrefix" => "RarePrefix.txt",
|
|
||||||
"RareSuffix" => "RareSuffix.txt",
|
|
||||||
"Runes" => "Runes.txt",
|
|
||||||
"SetItems" => "SetItems.txt",
|
|
||||||
"Sets" => "Sets.txt",
|
|
||||||
"Shrines" => "Shrines.txt",
|
|
||||||
"SkillCalc" => "SkillCalc.txt",
|
|
||||||
"SkillDesc" => "SkillDesc.txt",
|
|
||||||
"Skills" => "Skills.txt",
|
|
||||||
"SoundEnviron" => "SoundEnviron.txt",
|
|
||||||
"Sounds" => "Sounds.txt",
|
|
||||||
"States" => "States.txt",
|
|
||||||
"StorePage" => "StorePage.txt",
|
|
||||||
"SuperUniques" => "SuperUniques.txt",
|
|
||||||
"TreasureClassEx" => "TreasureClassEx.txt",
|
|
||||||
"TreasureClass" => "TreasureClass.txt",
|
|
||||||
"UniqueAppellation" => "UniqueAppellation.txt",
|
|
||||||
"UniqueItems" => "UniqueItems.txt",
|
|
||||||
"UniquePrefix" => "UniquePrefix.txt",
|
|
||||||
"UniqueSuffix" => "UniqueSuffix.txt",
|
|
||||||
"UniqueTitle" => "UniqueTitle.txt",
|
|
||||||
"WeaponClass" => "WeaponClass.txt",
|
|
||||||
"Weapons" => "Weapons.txt"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
$this->files = array_diff(scandir(TXT_PATH), array('..', '.'));
|
||||||
}
|
|
||||||
|
|
||||||
public function getFiles(){
|
|
||||||
return $this->files;
|
return $this->files;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFile($name){
|
public function getFile($name) {
|
||||||
return $this->files[$name];
|
return $this->files[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,3 @@ function ddump($var) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFunc($arg1, $arg2) {
|
|
||||||
return !($arg1 == $arg2);
|
|
||||||
}
|
|
13
src/D2SM.php
13
src/D2SM.php
@ -138,24 +138,25 @@
|
|||||||
|
|
||||||
<div class="col-2" style="background: #ffc">
|
<div class="col-2" style="background: #ffc">
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
<input name="addfunc" type="radio" aria-describedby="addfuncHelpBlock" required="required" class="custom-control-input" value="0">
|
<input name="addfunc" id="addfunc_0" type="radio" class="custom-control-input" value="0" aria-describedby="addfuncHelpBlock" checked="checked">
|
||||||
<label for="addfunc_0" class="custom-control-label">0</label>
|
<label for="addfunc_0" class="custom-control-label">0</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
<input name="addfunc" type="radio" aria-describedby="addfuncHelpBlock" required="required" class="custom-control-input" value="1">
|
<input name="addfunc" id="addfunc_1" type="radio" class="custom-control-input" value="1" aria-describedby="addfuncHelpBlock">
|
||||||
<label for="addfunc_1" class="custom-control-label">1</label>
|
<label for="addfunc_1" class="custom-control-label">1</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
<input name="addfunc" type="radio" aria-describedby="addfuncHelpBlock" required="required" class="custom-control-input" value="2">
|
<input name="addfunc" id="addfunc_2" type="radio" class="custom-control-input" value="2" aria-describedby="addfuncHelpBlock">
|
||||||
<label for="addfunc_2" class="custom-control-label">2</label>
|
<label for="addfunc_2" class="custom-control-label">2</label>
|
||||||
</div><br> <span class="help"><i class="fa fa-question-circle" aria-hidden="true"></i></span>
|
</div>
|
||||||
<span style="font-family: Exocet;">Add Func</span>
|
<br>
|
||||||
|
<span class="help"><i class="fa fa-question-circle" aria-hidden="true"></i></span>AddFunc
|
||||||
<span class="form-text">add func: a property mode field that controls how the variable attributes will appear and be functional on a set item. See the appendix for further details about this field's effects.</span>
|
<span class="form-text">add func: a property mode field that controls how the variable attributes will appear and be functional on a set item. See the appendix for further details about this field's effects.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h3 style="color: blue;">Blue Attributes</h3>
|
<h3 style="color: #8888FF;">Blue Attributes</h3>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$html = '';
|
$html = '';
|
||||||
|
@ -235,6 +235,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php require_once 'optionSubmit.php'; ?>
|
<?php require_once 'optionSubmit.php'; ?>
|
||||||
|
<input type="hidden" name="item" value="">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -27,7 +27,6 @@ along with D2UM. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="https://bootswatch.com/4/lux/bootstrap.min.css">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="/res/style.css">
|
<link rel="stylesheet" href="/res/style.css">
|
||||||
|
59
wait.php
59
wait.php
@ -1,59 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once "./src/D2Functions.php";
|
|
||||||
require_once "./src/D2Database.php";
|
|
||||||
require_once './src/D2Files.php';
|
|
||||||
require_once './src/D2TxtParser.php';
|
|
||||||
|
|
||||||
define('FILTER_PROPERTIES_FILE', 'filterProperties.txt');
|
|
||||||
define('DB_FILE', 'db');
|
|
||||||
|
|
||||||
include "./_pdo.php";
|
|
||||||
|
|
||||||
$filename = 'd2im.conf';
|
|
||||||
|
|
||||||
if (file_exists($filename)) {
|
|
||||||
|
|
||||||
$p = file_get_contents($filename);
|
|
||||||
if (is_dir($p)) {
|
|
||||||
$path = $p;
|
|
||||||
define('TXT_PATH', $p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// parse txt data
|
|
||||||
$files = new D2Files();
|
|
||||||
$parser = new D2TxtParser();
|
|
||||||
$db = new D2Database();
|
|
||||||
|
|
||||||
$data['Armor'] = $parser->parseFile($files->getFile('Armor'));
|
|
||||||
$data['Gems'] = $parser->parseFile($files->getFile('Gems'));
|
|
||||||
$data['ItemTypes'] = $parser->parseFile($files->getFile('ItemTypes'));
|
|
||||||
$data['Misc'] = $parser->parseFile($files->getFile('Misc'));
|
|
||||||
$prop = $parser->parseFile($files->getFile('Properties'));
|
|
||||||
$data['SetItems'] = $parser->parseFile($files->getFile('SetItems'));
|
|
||||||
$data['Sets'] = $parser->parseFile($files->getFile('Sets'));
|
|
||||||
$data['UniqueItems'] = $parser->parseFile($files->getFile('UniqueItems'));
|
|
||||||
$data['Weapons'] = $parser->parseFile($files->getFile('Weapons'));
|
|
||||||
|
|
||||||
foreach ($data as $k => $v) {
|
|
||||||
|
|
||||||
$db->createTables($files->getFile($k), $v);
|
|
||||||
$db->fillsTables($files->getFile($k), $v);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<?php
|
|
||||||
/* Require the <head> section */
|
|
||||||
require_once "./src/head.php";
|
|
||||||
?>
|
|
||||||
<div class="container container-top">
|
|
||||||
<h1><img src="/img/Diablo2.png" style="float:left">Files Processed</h1>
|
|
||||||
<a class="btn btn-outline-danger" style="color:red; font-size: 18px;float:right;" href="/">X</a>
|
|
||||||
<hr style="margin: 60px;">
|
|
||||||
|
|
||||||
<h1><a href="/"> Click here to go to the main application.</a></h1>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user