mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-09-18 01:22:08 +00:00
Refactored into classes, now just need to display data, and later create editing form
This commit is contained in:
@@ -51,20 +51,25 @@ if (!empty($_POST)) {
|
||||
$modname = str_replace(' ', '', $_POST['modname']);
|
||||
$_SESSION['modname'] = $modname;
|
||||
$time = time();
|
||||
$savePath = '';
|
||||
// write the D2Modder.db file and replace \ with \\
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$path = rtrim($_POST['path'], "\\");
|
||||
$path = str_replace("\\", "\\\\", $path);
|
||||
|
||||
$savePath .= $path . '\\\\save\\\\';
|
||||
$tbl = $path.'\\\\data\\\\local\\\\lng\\\\eng\\\\';
|
||||
|
||||
$path .= '\\\\data\\\\global\\\\excel\\\\';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PDO_Connect("sqlite:../D2Modder.db");
|
||||
$sql = "CREATE TABLE IF NOT EXISTS D2Modder (
|
||||
modname VARCHAR(255),
|
||||
path VARCHAR(255),
|
||||
path VARCHAR(255),
|
||||
tbl VARCHAR(255),
|
||||
lastused INT,
|
||||
theme INT
|
||||
@@ -80,6 +85,7 @@ ERROR: INVALID PATH</h1></center>';
|
||||
// set this mod to active mod in session
|
||||
$_SESSION['path'] = $path;
|
||||
$_SESSION['tbl'] = $tbl;
|
||||
$_SESSION['savePath'] = $savePath;
|
||||
// Don't yell at me, security is the least of my considerations atm
|
||||
// check modname in db
|
||||
$sql = "SELECT * FROM D2Modder WHERE modname=?";
|
||||
|
Reference in New Issue
Block a user