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.
 
 
 
 
 

152 righe
8.3 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"])) {
$codice_round = $_GET["codice_round"];
$gara = gara::init($_GET["codice"],$codice_round);
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;
$secretata = $gara->getBustaSecretata($partecipante["codice"],$_GET["richiesta"],$_GET["derivazione"],true);
if ($secretata["open"] == "S") {
?>
<h2><a href="#" onclick="showCompany(<?= $infoOE["codice"] ?>)"><?= $infoOE["ragione_sociale"] ?></a></h2>
<div class="card mb-1">
<div class="card-body text-center">
<? if ($secretata["accettata"] == "S") {
alertManager::printSuccessCompact(__("Oscuramento accettato"));
} else if ($secretata["accettata"] == "N") {
alertManager::printAlertCompact(__("Oscuramento rifiutato"));
}
echo $secretata["descrizione"] ?>
</div>
<div class="card-footer">
<div class="row flex-row-reverse">
<? if ($secretata["accettata"] != "S") { ?>
<div class="ml-2 p-0 col-12 col-lg-4 col-xl-3">
<form action="/backend/gare/open/segreti/accetta.php" method="post" rel="validate" id="admit-form">
<input type="hidden" name="token" value="<?= tokenGen() ?>">
<input type="hidden" name="codice" value="<?= $record["codice"] ?>">
<input type="hidden" name="codice_round" value="<?= $round["codice"] ?>">
<input type="hidden" name="codice_lotto" value="<?= $lotto["codice"] ?>">
<input type="hidden" name="partecipante" value="<?= $partecipante["codice"] ?>">
<input type="hidden" name="derivazione" value="<?= $secretata["derivazione"] ?>">
<input type="hidden" name="richiesta" value="<?= $secretata["codice_richiesta"] ?>">
<button type="button" onclick="confirmBeforeSubmitForm('<?= __("Stai per accettare la richiesta di oscuramento") ?>','admit-form')" class="btn btn-block btn-success"><span class="fa fa-check"></span> <?= __("Accetta") ?></button>
</form>
</div>
<? } ?>
<? if ($secretata["accettata"] != "N") { ?>
<div class="ml-2 p-0 col-12 col-lg-4 col-xl-3">
<button type="button" onclick="$('.rifiuto').slideToggle('fast')" class="rifiuto btn btn-block btn-danger"><span class="fa fa-times"></span> <?= __("Rifiuta") ?></button>
</div>
<div class="clearfix"></div>
<div class="rifiuto collapse col-12">
<div class="card">
<div class="card-header text-right">
<button onclick="$('.rifiuto').slideToggle('fast')" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="card-body">
<form rel="validate" method="post" id="exclude-form" action="/backend/gare/open/segreti/rifiuta.php">
<input type="hidden" name="token" value="<?= tokenGen() ?>">
<input type="hidden" name="codice" value="<?= $record["codice"] ?>">
<input type="hidden" name="codice_round" value="<?= $round["codice"] ?>">
<input type="hidden" name="codice_lotto" value="<?= $lotto["codice"] ?>">
<input type="hidden" name="partecipante" value="<?= $partecipante["codice"] ?>">
<input type="hidden" name="derivazione" value="<?= $secretata["derivazione"] ?>">
<input type="hidden" name="richiesta" value="<?= $secretata["codice_richiesta"] ?>">
<div class="form-group">
<label for="motivazione">
<?= __("motivazione") ?>*
</label>
<textarea id="motivazione" class="form-control" rows="10" name="motivazione" title="<?= __("motivazione") ?>" rel="S;2;0;A"></textarea>
</div>
<button type="button" onClick="confirmBeforeSubmitForm('<?= __("Stai per rifiutare la richiesta di oscuramento") ?>','exclude-form')" class="btn btn-lg btn-danger btn-block"><?= __("Rifiuta") ?></button>
</form>
</div>
</div>
</div>
<? } ?>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h1>Hash</h1>
MD5: <strong><?= $secretata["md5"] ?></strong><br>
SHA1: <strong><?= $secretata["sha1"] ?></strong><br>
SHA256: <strong><?= $secretata["sha256"] ?></strong><br>
</div>
</div>
<?
$file_content = $secretata["content"];
$path = $config["chunk_folder"] . "/" . $_SESSION["utente"]->codice;
if (!is_dir($path)) { mkdir($path); }
$path .= "/" . $secretata["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();
}
?>