mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
32 lines
513 B
PHP
32 lines
513 B
PHP
<?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>
|