mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-09-19 01:52:09 +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:
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>
|
Reference in New Issue
Block a user