mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-09-18 01:22:08 +00:00
In memory images/invfiles, general sql cleanup
This commit is contained in:
@@ -82,12 +82,12 @@ ERROR: INVALID PATH</h1></center>';
|
||||
$_SESSION['tbl'] = $tbl;
|
||||
// Don't yell at me, security is the least of my considerations atm
|
||||
// check modname in db
|
||||
$sql = "SELECT * FROM `D2Modder` WHERE `modname`='$modname'";
|
||||
$res = PDO_FetchAll($sql);
|
||||
$sql = "SELECT * FROM D2Modder WHERE modname=?";
|
||||
$res = PDO_FetchAll($sql, [$modname]);
|
||||
|
||||
if (empty($res)) {
|
||||
$sql = "INSERT INTO D2Modder(`modname`,`path`,`tbl`,`lastused`) VALUES(\"$modname\",\"$path\",\"$tbl\",$time)";
|
||||
PDO_Execute($sql);
|
||||
$sql = "INSERT INTO D2Modder(`modname`,`path`,`tbl`,`lastused`) VALUES(?, ?, ?, ?)";
|
||||
PDO_Execute($sql, [$modname, $path, $tbl, $time]);
|
||||
}
|
||||
header("Location: /processFiles.php");
|
||||
}
|
||||
@@ -123,11 +123,11 @@ ERROR: INVALID PATH</h1></center>';
|
||||
$_SESSION['tbl'] = $path;
|
||||
// Don't yell at me, security is the least of my considerations atm
|
||||
// check modname in db
|
||||
$sql = "SELECT * FROM `D2Modder` WHERE modname='$modname'";
|
||||
$res = PDO_FetchAll($sql);
|
||||
$sql = "SELECT * FROM D2Modder WHERE modname=?";
|
||||
$res = PDO_FetchAll($sql, [$modname]);
|
||||
if (empty($res)) {
|
||||
$sql = "INSERT INTO `D2Modder` (`modname`,`path`,`tbl`,`lastused`) VALUES(\"$modname\",\"$path\",\"$path\",$time)";
|
||||
PDO_Execute($sql);
|
||||
$sql = "INSERT INTO D2Modder (`modname`,`path`,`tbl`,`lastused`) VALUES(?, ?, ?, ?)";
|
||||
PDO_Execute($sql, [$modname, $path, $tbl, $time]);
|
||||
}
|
||||
header("Location: /processFiles.php");
|
||||
}
|
||||
@@ -143,7 +143,7 @@ require_once "head.php";
|
||||
<body style="background: white;">
|
||||
<div class="center container container-top">
|
||||
|
||||
<img src="/img/Diablo2.png" style="float:left"><h1 syle="display:inline; font-weight: 900"><?php echo $title . " " . $version; ?><span style="font-family: Lato !important; font-size: 14px;"> <?php echo " By" . $author ?></span></h1>
|
||||
<img src="/img/Diablo2.png" style="float:left"><h1 syle="display:inline; font-weight: 900"><?php echo $title . " " . $version; ?><span style="font-family: Lato !important; font-size: 14px;"> <?php echo " By: " . $author ?></span></h1>
|
||||
<a class="btn btn-outline-danger" style="color:red; font-size: 18px;float:right;" href="/">X</a>
|
||||
<hr style="margin: 60px;">
|
||||
<div class="offset-2 col-8">
|
||||
|
Reference in New Issue
Block a user