mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
38 lines
741 B
PHP
38 lines
741 B
PHP
|
<?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);
|
||
|
}
|