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.
71 righe
2.1 KiB
71 righe
2.1 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) { |
|
include_once ($beRoot."/layout/top.php"); |
|
|
|
function printModuleButton(string $href, string $icon, string $titolo) : void { |
|
?> |
|
<div class="col-6 col-sm-3 mb-4"> |
|
<a class="btn btn-primary btn-block py-3 text-center" href="<?=$href?>"> |
|
<span class="<?= $icon ?> fa-2x"></span><br> |
|
<?= $titolo ?> |
|
</a> |
|
</div> |
|
<? |
|
} |
|
|
|
?> |
|
<div class="container-fluid pt-5 pb-3"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<h2> |
|
<?= Modulo::header($radice) ?> |
|
</h2> |
|
</div> |
|
</div> |
|
<? |
|
$avanzate = jsonToArray("{$config["jsonFolder"]}/impostazioni-avanzate.json"); |
|
if (!empty($avanzate)) { |
|
?> |
|
<div class="row pt-5"> |
|
<? |
|
foreach($avanzate AS $radice) { |
|
|
|
$modulo = Modulo::getInfo($radice); |
|
if ((!isset($_SESSION["ente"]) || $_SESSION["ente"]->hasModulo($modulo["id"])) && $_SESSION["utente"]->permission($radice)) { |
|
|
|
$show = $modulo["ente"]; |
|
if (! isset($_SESSION["ente"])) { |
|
$show = $modulo["admin"]; |
|
} |
|
|
|
if ($show) { |
|
$href = "/backend/{$radice}/index.php"; |
|
printModuleButton($href, $modulo["icon"], $modulo["titolo"]); |
|
} |
|
} |
|
} |
|
|
|
if($_SESSION["utente"]->ruolo == "SAD"): |
|
foreach($_SESSION["ente"] ?? [] as $key => $integrazione): |
|
if($integrazione instanceof Integrazione): |
|
printModuleButton("/backend/integrazione/{$integrazione->slug()}", "fa fa-cog", $integrazione->name); |
|
endif; |
|
endforeach; |
|
endif; |
|
?> |
|
</div> |
|
<? |
|
} else { |
|
alertManager::printWarningBox(__("Nessun risultato")); |
|
} |
|
?> |
|
</div> |
|
<? |
|
include_once ($beRoot."/layout/bottom.php"); |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|