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.
123 righe
5.2 KiB
123 righe
5.2 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"])) { |
|
$progetto = progetto::init($_GET["codice"]); |
|
if ($progetto !== false) { |
|
$record = $progetto->info; |
|
$breadcrumb = array(); |
|
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb[""] = __("Pannello"); |
|
include_once ($beRoot."/layout/top.php"); |
|
$alertManager = new alertManager("progetto-{$record["codice"]}") |
|
?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid clearfix"> |
|
<div class="btn-group flex-wrap float-right"> |
|
<? if ($_SESSION["utente"]->canAssignPermissions()) { ?> |
|
<button type="button" class="btn btn-danger" onClick="managePermessi('progetti','<?= $record["codice"] ?>','<?= $record["codice_ente"] ?>')"> |
|
<span class="fa fa-lock"></span> <?= __("Permessi") ?> |
|
</button> |
|
<? } ?> |
|
<? $alertManager->printAlertModalButton() ?> |
|
<button type="button" class="btn btn-primary" onClick="openChat('progetti','<?= $record["codice"] ?>','<?= $record["codice_ente"] ?>')"> |
|
<span class="fa fa-envelope"></span> <?= __("Chat interna") ?> |
|
<? $unread = Communicator::countUnreadInitiativeChat('progetti',$record["codice"]); ?> |
|
<span id="badge-chat" class="badge"><?= (!empty($unread)) ? $unread : "" ?></span> |
|
</button> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="mt-5"> |
|
<? |
|
$badge = ""; |
|
$class = ""; |
|
if ($record["stato_programmazione"] == "I") { |
|
$badge = "<small class='badge badge-warning'>" . __("Incompiuto") . "</small>"; |
|
$class = "text-warning"; |
|
} else if ($record["stato_programmazione"] == "A") { |
|
$badge = "<small class='badge badge-danger'>" . __("Non riproposto") . "</small>"; |
|
$class = "text-danger"; |
|
} |
|
?> |
|
<h1 class="<?= $class ?>"> |
|
<?= __("progetto") ?> #<?= $record["codice"] ?> <?= $badge ?> |
|
</h1> |
|
</div> |
|
<h3> |
|
<? if (!empty($record["cup"])) { ?> |
|
CUP: <?= $record["cup"] ?> |
|
<? } ?> |
|
<? if (!empty($record["cui"])) { ?> |
|
CUI: <?= $record["cui"] ?> |
|
<? } ?> |
|
</h3> |
|
<? |
|
$filtri = []; |
|
$ris_tipi = progetto::pannelli() ?? []; |
|
if (count($ris_tipi) > 0) { |
|
?> |
|
<div class="card card-body"> |
|
<div class="row"> |
|
<? |
|
foreach($ris_tipi AS $id_tipo => $rec_tipo) { |
|
$filtri["tipo"] = $id_tipo; |
|
$ris_comandi = progetto::getModuli($filtri); |
|
if (count($ris_comandi) > 0) { |
|
$class = 12 / count($ris_tipi); |
|
$class= "col-sm-".$class; |
|
$tipo = __($rec_tipo["titolo"]); |
|
?> |
|
<div class="col-12 <?= $class ?>"> |
|
<span class="h3"> |
|
<? echo ucfirst($tipo) ?> |
|
</span> |
|
<? |
|
foreach($ris_comandi AS $id_comando => $rec) { |
|
$badge = ""; |
|
$show = true; |
|
$folder = explode("/",$rec["link"]); |
|
$temp = array_pop($folder); |
|
$folder = implode("/",$folder); |
|
$hrefComando = $rec["link"]; |
|
$hrefComando .= (strpos($rec["link"], "?") === false) ? "?" : "&"; |
|
$hrefComando .= "codice={$record["codice"]}"; |
|
if (file_exists($root.$folder."/check.php")) { include($root.$folder."/check.php"); } |
|
$lock = $progetto->checkLock($id_comando); |
|
$status = ""; |
|
if (file_exists($root.$folder."/_status.php") && ($show || empty($rec["stato_minimo"]) || $rec["stato_minimo"] <= 20)) { |
|
include($root.$folder."/_status.php"); |
|
} |
|
if ($show && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_comando) && $_SESSION["utente"]->permission($rec["modulo_riferimento"])) { |
|
?> |
|
<a class="btn my-1 <?= $status ?> btn-block btn-<?=($lock==true) ? "secondary" : "info"?>" href="<?= $hrefComando ?>" title="<?= __($rec["descrizione"] ?? $rec["titolo"]) ?>"> |
|
<span class="float-left"><?= __($rec["titolo"]) ?></span> |
|
<? if ($rec["badge"] != "") { |
|
if (file_exists($root.$rec["badge"])) { include($root.$rec["badge"]); } |
|
} ?> |
|
<div class="clearfix"></div> |
|
</a> |
|
<? |
|
} |
|
} ?> |
|
</div> |
|
<? } |
|
} |
|
if (!empty($alertManager->alerts)) { |
|
$alertManager->printModal(); |
|
} |
|
?> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
include_once ($beRoot."/layout/bottom.php"); |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/backend/index.php">'; |
|
die(); |
|
} |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/backend/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|