mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
switchmods fixed session vars, saved to db in d2config class. Need to test d2s editor with modifyBit() function. need to fix app.js uniqueitems editor required fields on misc/weapons/armor
This commit is contained in:
38
saveD2ModderEditorData.php
Normal file
38
saveD2ModderEditorData.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
set_time_limit(-1);
|
||||
ini_set('max_input_time', '-1');
|
||||
ini_set('max_execution_time', '0');
|
||||
session_start();
|
||||
ob_start();
|
||||
|
||||
|
||||
include "./_pdo.php";
|
||||
include "./config.php";
|
||||
require_once "./vendor/autoload.php";
|
||||
require_once "./src/D2Functions.php";
|
||||
|
||||
PDO_Connect("sqlite:" . $_SESSION['modname'].".db");
|
||||
$post = $_POST;
|
||||
|
||||
// IF record exists, UPDATE,
|
||||
// ELSE new record, INSERT
|
||||
|
||||
if ($_POST['formtype'] == "uniqueitems") {
|
||||
|
||||
unset($post['formtype']);
|
||||
unset($post['submit']);
|
||||
unset($post['item']);
|
||||
|
||||
// if ladder or carry1 is 0, set empty field.
|
||||
if (!$post['ladder']) {
|
||||
$post['ladder'] = '';
|
||||
}
|
||||
if (!$post['carry1']) {
|
||||
$post['carry1'] = '';
|
||||
}
|
||||
|
||||
ddump($post);
|
||||
}
|
Reference in New Issue
Block a user