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.
 
 
 
 
 

88 righe
4.1 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) {
if (!empty($_POST["modulo"])) { $_GET = $_POST; }
if (!empty($_GET["modulo"]) && !empty($_GET["codice_elemento"])) {
$dgue = new DGUE($_GET["modulo"],$_GET["codice_elemento"]);
if (!empty($dgue)) {
$dgue->checkAdminPermission();
$pannello = !empty($_GET["pannello"]);
$breadcrumb["/{$dgue->modulo}/"] = Modulo::getInfo($dgue->modulo)["titolo"];
$breadcrumb = $dgue->getBreadcrumb($breadcrumb,$pannello);
$breadcrumb[""] = __("DGUE");
include_once ($root."/layout/top.php");
$content = [];
$compilato = $dgue->getMyDGUE()[0] ?? NULL;
$printForm = $_GET["printForm"] ?? NULL;
$setGeneral = true;
if (!empty($compilato) && empty($_GET["codice"]) && empty($_GET["filechunk"])) {
if (!isset($printForm)) {
$printForm = true;
}
$compilato = DGUE::staticgetMyDGUE("","",["codice"=>$compilato["codice"]])[0] ?? null;
$setGeneral = false;
} else {
if (!empty($_GET["filechunk"])) {
if (strpos($_GET["filechunk"], "../")===false) {
$chunkPath = $config["chunk_folder"]."/".$_SESSION["utente"]->codice."/".$_GET["filechunk"];
$content = DGUE::getDGUEFromXML(file_get_contents($chunkPath));
}
} else if (!empty($_GET["codice"])) {
$compilato = DGUE::staticgetMyDGUE("","",["codice"=>$_GET["codice"]])[0] ?? null;
}
}
?>
<div class="container-fluid">
<h1>
<?= __("Compilazione DGUE") ?><br>
<small><?= $dgue->id_appalto; ?> <?= $dgue->oggetto ?></small>
</h1>
<? if (empty($printForm)) {
?>
<div class="d-flex">
<? if (!empty($compilato)) { ?>
<a href="edit.php?<?= ($pannello) ? "pannello=1&" : "" ?>modulo=<?= $dgue->modulo ?>&codice_elemento=<?= $dgue->elemento ?>&printForm=1&codice=<?= $compilato["codice"] ?>" class="btn btn-success h-100 col m-2 py-5">
<span class="fa fa-edit fa-3x"></span><br>
<?= __("Continua compilazione") ?>
</a>
<? } else { ?>
<a href="edit.php?<?= ($pannello) ? "pannello=1&" : "" ?>modulo=<?= $dgue->modulo ?>&codice_elemento=<?= $dgue->elemento ?>&printForm=1" class="btn btn-primary h-100 col m-2 py-5">
<span class="fa fa-edit fa-3x"></span><br>
<?= __("Nuova compilazione") ?>
</a>
<? } ?>
<button type="button" onClick="showModalWithURL('/dgue/upload.php?<?= ($pannello) ? "pannello=1&" : "" ?>modulo=<?= $dgue->modulo ?>&codice_elemento=<?= $dgue->elemento ?>')" class="btn btn-info h-100 col m-2 py-5">
<span class="fa fa-code fa-3x"></span><br>
<?= __("Importa XML") ?>
</button>
<button type="button" onClick="showModalWithURL('/dgue/list.php?<?= ($pannello) ? "pannello=1&" : "" ?>modulo=<?= $dgue->modulo ?>&codice_elemento=<?= $dgue->elemento ?>')" class="btn btn-warning h-100 col m-2 py-5">
<span class="fa fa-list fa-3x"></span><br>
<?= __("Importa da lista") ?>
</button>
<?
} else {
if (!empty($compilato["json"])) {
$content = json_decode($compilato["json"],true);
}
if ($setGeneral) { $content = $dgue->fillContent($content); }
$dgue->showForm($content,$pannello);
}
?>
</div>
<?
include_once ($root."/layout/bottom.php");
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
?>