$exist = false; $to = 1; unset($valori); if (isset($_POST["id"]) && isset($_POST["target"])) { $configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); $json = json_decode(file_get_contents(__DIR__."/definition.json"),true); $id_repeat = $_SESSION["id_repeat"] + 1; $sql_form = "SELECT * FROM b_dgue_settings WHERE uuid = :uuid AND version = '2023-36'"; $ris_form = $pdo->go($sql_form,array(":uuid"=>substr($_POST["target"],6))); if ($ris_form->rowCount() > 0) { $criterio = $ris_form->fetchAll(PDO::FETCH_ASSOC)[0]; } } else { $exist = true; } if (isset($criterio)) { $valori[0] = DGUE::findValues(@$dgue["ccv:Criterion"][$criterio["uuid"]],$json); if (!empty($dgue["ccv:Criterion"][$criterio["uuid"]][0])) { $i_element = 0; foreach($dgue["ccv:Criterion"][$criterio["uuid"]] AS $elemento) { $valori[$i_element] = DGUE::findValues($elemento,$json); $i_element++; } $to = $i_element; } for ($count_element = 0;$count_element < $to;$count_element++) { if (!empty($valori[$count_element])) { $values = $valori[$count_element]; } if ($exist) { $id_repeat = $count_element; } ?>