Added check for db file as well as config file. cleaned up process

This commit is contained in:
color.diff=auto 2021-03-26 08:45:33 -06:00
parent b28a59c313
commit ac7682b62c
3 changed files with 5 additions and 15 deletions

View File

@ -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']);

View File

@ -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">

View File

@ -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>