mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
40 lines
788 B
PHP
40 lines
788 B
PHP
<?php
|
|
|
|
|
|
// uniqu eitem editor saver,, needs more work
|
|
|
|
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);
|
|
} |