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.
64 righe
2.5 KiB
64 righe
2.5 KiB
<? |
|
$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html")) . "/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "monitoraggio"; |
|
$cmd_info = progetto::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"], $_GET["codice"], $id_modulo) && !empty($_GET["tipo"])) { |
|
$progetto = progetto::init($_GET["codice"]); |
|
if (!empty($progetto)) { |
|
$scheda = mop::tipologiaSchede()[$_GET["tipo"]] ?? null; |
|
if (!empty($scheda)) { |
|
$record = $progetto->info; |
|
$lock = $progetto->checkLock($cmd_info["id"]); |
|
$titolo_modulo = __($cmd_info["titolo"]) . " - " . $scheda["titolo"]; |
|
$breadcrumb = array(); |
|
$breadcrumb["/" . $radice . "/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb["/" . $radice . "/panel.php?codice=" . $record["codice"]] = __("Pannello"); |
|
$breadcrumb[""] = $titolo_modulo; |
|
|
|
include_once($beRoot . "/layout/top.php"); |
|
?><h1><?= $titolo_modulo ?></h1><? |
|
$datiRichiesti = $scheda["dati-richiesti"] ?? null; |
|
if (!empty($datiRichiesti) || !empty($scheda["resume"])) { |
|
$tipoScheda = substr($_GET["tipo"],0,4); |
|
if (empty($lock)) { ?> |
|
<form rel="validate" method="post" action="save.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice_progetto" type="hidden" name="codice_progetto" value="<?= $record["codice"] ?>"> |
|
<input id="tipo" type="hidden" name="tipo" value="<?= $tipoScheda ?>"> |
|
<? } else { ?> |
|
<div id="edit-form"> |
|
<? } |
|
if (!empty($datiRichiesti)) { |
|
$progetto->printFormWithKeys($datiRichiesti,$lock); |
|
} else { |
|
include(__DIR__."/resumes/{$scheda["resume"]}.php"); |
|
} |
|
if (empty($lock)) { ?> |
|
<button class="btn btn-success btn-block mt-2"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
</form> |
|
<? |
|
} else { |
|
?> |
|
</div> |
|
<script>$(":input","#edit-form").not(".ignore-lock").attr("disabled","disabled").trigger("chosen:updated");</script> |
|
<? |
|
} |
|
} else { |
|
alertManager::printAlertBox(__("Errore configurazione")); |
|
} |
|
include_once($beRoot . "/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(); |
|
} |
|
|
|
?>
|