testing changes

This commit is contained in:
color.diff=auto
2021-05-07 03:18:29 -06:00
parent 54ecb62674
commit 776e9d31c6
1020 changed files with 2894 additions and 274500 deletions

View File

@@ -3,7 +3,9 @@
include "./config.php";
require_once "../src/D2Functions.php";
require_once '../src/D2ItemData.php';
require_once '../src/D2ItemDesc.php';
$idata = new D2ItemData();
$idesc = new D2ItemDesc();
/*
Copyright (C) 2021 Hash Borgir
@@ -149,18 +151,42 @@ if ($cmd == 'search') {
/*
* @cmd = getString
*
*
* @arg = property, par, min, max
*
*
*/
if ($cmd == 'getString') {
$prop = $_GET['prop'];
$sql = "SELECT stat1,stat2,stat3,stat4,stat5,stat6,stat7 FROM `properties` WHERE `code` = '$prop'";
$stat = array_filter(PDO_FetchRow($sql));
$s = array_filter(getIscStrings($stat['stat1']));
$s = array_filter($idata->getIscStrings($stat['stat1']));
// now combine isc strings with par, min, max
$params = array_merge($_GET, $s);
$return = $idesc->getDesc($params);
/*
* This goes into D2ItemDesc->getDesc();
*
$s1 = $params['string1'];
$s2 = $params['string2'];
$prop = $params['prop'];
$par = $params['par'];
$min = (int) $params['min'];
*
* @return string
*/
header('Content-Type: application/json');
echo json_encode($s, JSON_INVALID_UTF8_IGNORE);
echo json_encode($return, JSON_INVALID_UTF8_IGNORE);
}