d2tools/saveD2ModderEditorData.php

40 lines
788 B
PHP
Raw Normal View History

<?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);
}