permission($radice, $_GET["codice"])) { $ted = new TedEsender($_GET["form"], $_GET["codice"], $settings, "{$_cdir}/config/xml"); $ted->setMode("download"); $ted->debug = $config["developEnv"]; $s = TedEsender::getStati(); $stati = array_flip(array_column($s, 'title')); $stato = $s[$stati[$ted->info["stato"]]]; if( $stato["status"] >= 20 ) { $error = false; $send = $ted->info["version"] === "eForms" ? $ted->pdf() : $ted->pdf_legacy(); } } if($error) { header('Location: /backend/guue'); die(); } ?>