$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
$error_detail = "";
$id_modulo = "open";
$cmd_info = gara::getInfoModulo($id_modulo);
$error = true;
if (!empty($_SESSION["utente"]) && ($_SESSION["utente"]->permission($cmd_info["modulo_riferimento"],$_GET["codice"],$id_modulo) || !empty($_GET["valutazione"])) && !empty($_GET["codice_round"]) && !empty($_GET["partecipante"]) && !empty($_GET["richiesta"]) && !empty($_GET["codice_lotto"])) {
$valutazione = (empty($_GET["valutazione"])) ? NULL : "commissione";
$codice_round = $_GET["codice_round"];
$gara = gara::init($_GET["codice"],$codice_round,$valutazione);
if (!empty($gara) && $gara->setLotto($_GET["codice_lotto"])) {
$record = $gara->info;
$round = $gara->round;
$lotto = $gara->lotto;
$lock = $gara->checkLock($cmd_info["id"]);
$partecipante = $gara->getPartecipante($_GET["partecipante"]);
if (!empty($partecipante)) {
$infoOE = oeManager::getOE($partecipante["codice_operatore"]);
$aggiuntive = false;
$emendamento = $gara->getEmendamento($partecipante["codice"],$_GET["richiesta"],true);
if ($emendamento["open"] == "S") {
?>
if ($emendamento["accettata"] == "S") {
alertManager::printSuccessCompact(__("Emendamento accettato"));
} else if ($emendamento["accettata"] == "N") {
alertManager::printAlertCompact(__("Emendamento rifiutato"));
}
echo $emendamento["descrizione"] ?>
if (!$valutazione) { ?>
} ?>
Hash
MD5: = $emendamento["md5"] ?>
SHA1: = $emendamento["sha1"] ?>
SHA256: = $emendamento["sha256"] ?>
$file_content = $emendamento["content"];
$path = $config["chunk_folder"] . "/" . $_SESSION["utente"]->codice;
if (!is_dir($path)) { mkdir($path); }
$path .= "/" . $emendamento["nomeFile"];
file_put_contents($path, $file_content);
if (file_exists($path)) {
$p7m = new P7Manager($path);
if ($p7m != false) {
$firme = $p7m->extractSignatures();
if (is_array($firme)) {
$firme = array_filter($firme);
if (!empty($firme)) {
$col = "col-12";
if (count($firme) > 1) { $col .= " col-sm-6"; }
?>
foreach ($firme AS $esito) {
?>
$data = $esito;
if (isset($data["subject"]["commonName"])) { echo "
" . $data["subject"]["commonName"] . "
"; }
if (isset($data["subject"]["organizationName"])) { echo "" . $data["subject"]["organizationName"] . "
"; }
if (isset($data["subject"]["title"])) { echo $data["subject"]["title"] . "
"; }
if (isset($data["issuer"]["organizationName"])) { echo " " . $data["issuer"]["organizationName"] . ""; }
if (!empty($data['validFrom_time_t']) && !empty($data['validTo_time_t'])) {
$validFrom = date('d-m-Y H:i:s', $data['validFrom_time_t']);
$validTo = date('d-m-Y H:i:s', $data['validTo_time_t']);
echo "
" . $validFrom . "
" . $validTo . "";
}
?>
}
?>
}
}
}
$error = false;
?>
}
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>