DescFunc 28,13 done, added ajax prop update, need work

This commit is contained in:
color.diff=auto
2021-05-03 00:27:13 -06:00
parent 2fcc98dddb
commit f008b24b1f
5 changed files with 97 additions and 40 deletions

View File

@@ -147,21 +147,21 @@ if ($cmd == "getUniqueItem") {
//var_dump($return);
// todo: put values in params, so I can get generated string for that prop
$counter = 1;
foreach ($props as $k => $v) { // for each property Prop1 Prop2
$value = $v['par1'] ?? $v['min1'];
$params = [
'string1' => $v['desc']['string1'],
'string2' => $v['desc']['string2'],
'descfunc' => $v['desc']['descfunc'],
'descval' => $v['desc']['descval'],
"par" => $return['par'.$counter],
"min" => $return['min'.$counter],
"max" => $return['max'.$counter]
"prop" => $return['prop' . $counter],
"par" => $return['par' . $counter],
"min" => $return['min' . $counter],
"max" => $return['max' . $counter]
];
if (!empty($v['desc'])) {
@@ -258,4 +258,24 @@ if ($cmd == 'search') {
}
}
echo $html;
}
/*
* @cmd = getString
*
*
*
*
*/
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']));
header('Content-Type: application/json');
echo json_encode($s, JSON_INVALID_UTF8_IGNORE);
}