mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
Added check for db file as well as config file. cleaned up process
This commit is contained in:
parent
b28a59c313
commit
ac7682b62c
@ -26,7 +26,7 @@ ini_set('log_errors', 1);
|
||||
|
||||
include "includes.php";
|
||||
|
||||
if (file_exists("d2im.conf")) {
|
||||
if (file_exists("d2im.conf") && (file_exists($config['modname'].".db"))){
|
||||
|
||||
if (is_dir($config['path'])) {
|
||||
define('TXT_PATH', $config['path']);
|
||||
|
@ -2,12 +2,6 @@
|
||||
|
||||
include "includes.php";
|
||||
|
||||
if (file_exists("d2im.conf")) {
|
||||
if (is_dir($config['path'])) {
|
||||
define('TXT_PATH', $config['path']);
|
||||
}
|
||||
}
|
||||
|
||||
$files = new D2Files();
|
||||
|
||||
$parser = new D2TxtParser();
|
||||
@ -20,7 +14,9 @@ foreach ($data as $k => $v) {
|
||||
$db->createTables($k, $v);
|
||||
$db->fillsTables($k, $v);
|
||||
}
|
||||
|
||||
// put in html redirect as backup, because
|
||||
// for some odd reason windows gives
|
||||
// an error on header() but linux does not.
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
@ -1,11 +1,5 @@
|
||||
<div class="form-group row options" style="background: none;">
|
||||
<div class="col-4" style="background: none;">
|
||||
<p style="display:inline;margin-left: 20px;">
|
||||
<input style="width: auto;" type="checkbox" class="op1" name="opt-hide-disabled">
|
||||
<label for="op1">Hide 'unspawnable' </label>
|
||||
</p>
|
||||
</div>
|
||||
<div class="offset-9 col-3" style="background: none;">
|
||||
<div class="offset-10 col-3" style="background: none;">
|
||||
<button style="" name="submit" type="submit" class="btn btn-success">Save Item</button>
|
||||
<button name="submit" type="reset" class="btn btn-danger">Clear</button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user