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.
 
 
 
 
 

114 righe
6.3 KiB

<?
if (!empty($formInfo)) {
extract($formInfo);
$typePath = "";
$derivazione = null;
$formTitle = "Documento originale";
$qs = "codice={$record["codice"]}&codice_round={$round["codice"]}&codice_lotto={$lotto["codice"]}&partecipante={$partecipante["codice"]}&richiesta={$richiesta["codice"]}&token=" . tokenGen();
$qs .= (($valutazione) ? "&valutazione=true" : "");
if (isset($type)) {
switch($type) {
case "bustaSecretata":
$typePath = "/segreti";
$derivazione = "busta";
$formTitle = "Versione oscurata";
$checkAccettata = true;
break;
case "emendamento":
$typePath = "/emendamenti";
$formTitle = "Emendamento";
$checkAccettata = true;
break;
case "emendamentoSecretato":
$typePath = "/segreti";
$derivazione = "emendamento";
$formTitle = "Emendamento Oscurato";
$checkAccettata = true;
break;
default:
$checkAccettata = false;
break;
}
} else {
$checkAccettata = false;
}
if (!empty($derivazione)) {
$qs .= "&derivazione={$derivazione}";
}
$infoPathModal = "/backend/gare/open{$typePath}/info.php?{$qs}";
?>
<? if (!empty($formTitle)) { ?>
<strong><?= $formTitle ?></strong>
<? } ?>
<form
id="form-<?= $richiesta["codice"] ?>-<?= $partecipante["codice"] ?>-<?= $type ?>"
class="m-0 p-0"
method="POST"
action="/backend/gare/open<?= $typePath ?>/decrypt.php"
rel="validate"
<? if ($busta["open"] == "S") { ?>target="_blank"<? } ?>
>
<input type="hidden" name="token" value="<?= tokenGen() ?>">
<input type="hidden" name="type" value="<?= $type ?>">
<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"] ?>">
<? if ($valutazione) { ?><input type="hidden" name="valutazione" value="true"><? } ?>
<? if ($derivazione) { ?><input type="hidden" name="derivazione" value="<?= $derivazione ?>"><? } ?>
<input type="hidden" name="openP7M" value="N" id="openP7M-<?= $richiesta["codice"] ?>-<?= $partecipante["codice"] ?>-<?= $type ?>">
<? if ($busta["open"] == "N") { ?><input type="hidden" name="private" title="<?= __("chiave privata") ?>" class="private" rel="S;0;0;A"><? } ?>
<input type="hidden" name="partecipante" value="<?= $partecipante["codice"] ?>">
<input type="hidden" name="richiesta" value="<?= $richiesta["codice"] ?>">
<button id="btn-<?= $richiesta["codice"] ?>-<?= $partecipante["codice"] ?>" onclick="$('#openP7M-<?= $richiesta["codice"] ?>-<?= $partecipante["codice"] ?>').val('N');" class="btn mb-1 btn-block btn-sm btn-<?= ($busta["open"] == "S") ? "success" : "danger" ?>">
<span class="fa fa-<?= ($busta["open"] == "S") ? $icon : "lock" ?>"></span> <?= ($busta["open"] == "S") ? __($label) : __("Apri") ?>
</button>
<? if ($busta["open"] == "S") { ?>
<div class="<?= ($p7m && !$checkAccettata) ? "btn-group d-flex" : "" ?> mb-1">
<?
if ($p7m) {
?><button class="btn btn-block btn-sm btn-primary" onclick="$('#openP7M-<?= $richiesta["codice"] ?>-<?= $partecipante["codice"] ?>-<?= $type ?>').val('S');"><span class="fa fa-file-export"></span> <?= __("estrai contenuto") ?></button><?
}
addBypassCheckURL($infoPathModal);
$classBtn = "info";
$labelInformazioni = __("Informazioni");
$iconInformazioni = "info-circle";
if ($checkAccettata) {
switch($busta["accettata"]) {
case "S":
$classBtn = "success";
$labelInformazioni = __("Richiesta accettata");
$iconInformazioni = "check";
break;
case "N":
$classBtn = "danger";
$labelInformazioni = __("Richiesta rifiutata");
$iconInformazioni = "times";
break;
default:
$classBtn = "warning";
$labelInformazioni = __("Valuta richiesta");
$iconInformazioni = "exclamation-triangle";
}
}
?>
<button type="button" class="btn <?= (!$p7m || $checkAccettata) ? "btn-block" : "" ?> btn-sm btn-<?= $classBtn ?>" onclick="showModalWithURL('<?= $infoPathModal ?>'); return false;">
<span class="fa fa-<?= $iconInformazioni ?>"></span> <?= (!$p7m || $checkAccettata) ? $labelInformazioni : "" ?>
</button>
<div class="clearfix"></div>
</div>
<? } else {
$unlock = true;
} ?>
</form>
<?
if ($busta["open"] == "S" && $richiesta["locked"] == "S") {
$infoFormModal = "/backend/gare/open/form.php?codice={$record["codice"]}&codice_round={$round["codice"]}&codice_lotto={$lotto["codice"]}" . (($valutazione) ? "&valutazione=true" : "") . "&token=" . tokenGen() . "&partecipante={$partecipante["codice"]}&richiesta={$richiesta["codice"]}";
addBypassCheckURL($infoFormModal);
?>
<button type="button" class="btn mb-1 btn-block btn-sm btn-warning" onclick="showModalWithURL('<?= $infoFormModal ?>'); return false;">
<span class="fa fa-search"></span> <?= __("Visualizza form") ?>
</button>
<?
}
}
?>