gestione gare pubbliche
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

94 righe
4.2 KiB

<?
$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;
$busta = $gara->getBusta($partecipante["codice"],$_GET["richiesta"],$aggiuntive,true);
if ($busta["open"] == "S") {
?>
<h2><a href="#" onclick="showCompany(<?= $infoOE["codice"] ?>)"><?= $infoOE["ragione_sociale"] ?></a></h2>
<div class="card">
<div class="card-body">
<h1>Hash</h1>
MD5: <strong><?= $busta["md5"] ?></strong><br>
SHA1: <strong><?= $busta["sha1"] ?></strong><br>
SHA256: <strong><?= $busta["sha256"] ?></strong><br>
</div>
</div>
<?
$file_content = $busta["content"];
$path = $config["chunk_folder"] . "/" . $_SESSION["utente"]->codice;
if (!is_dir($path)) { mkdir($path); }
$path .= "/" . $busta["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"; }
?>
<div class="row">
<?
foreach ($firme AS $esito) {
?>
<div class="<?= $col ?>">
<div class="card">
<div class="card-body">
<?
$data = $esito;
if (isset($data["subject"]["commonName"])) { echo "<h1><span class='fa fa-user'></span> " . $data["subject"]["commonName"] . "</h1>"; }
if (isset($data["subject"]["organizationName"])) { echo "<strong>" . $data["subject"]["organizationName"] . "</strong><br>"; }
if (isset($data["subject"]["title"])) { echo $data["subject"]["title"] . "<br>"; }
if (isset($data["issuer"]["organizationName"])) { echo "<span class='fa fa-university'></span><strong> " . $data["issuer"]["organizationName"] . "</strong>"; }
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 "<br><span class='fa fa-calendar-alt'></span><strong> " . $validFrom . "</strong><br><span class='fa fa-calendar-alt'></span><strong>" . $validTo . "</strong>";
}
?>
</div>
</div>
</div>
<?
}
?>
</div>
<?
}
}
}
$error = false;
?>
</div>
<?
}
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>