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.
265 righe
12 KiB
265 righe
12 KiB
<? if (isset($_SESSION["utente"])) { |
|
include($root."/profilo/verify.php"); |
|
?> |
|
<!DOCTYPE HTML> |
|
<html lang="it"> |
|
<head> |
|
<meta charset="utf-8"> |
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
<link rel="apple-touch-icon" sizes="57x57" href="/src/img/favicon.ico/apple-icon-57x57.png"> |
|
<link rel="apple-touch-icon" sizes="60x60" href="/src/img/favicon.ico/apple-icon-60x60.png"> |
|
<link rel="apple-touch-icon" sizes="72x72" href="/src/img/favicon.ico/apple-icon-72x72.png"> |
|
<link rel="apple-touch-icon" sizes="76x76" href="/src/img/favicon.ico/apple-icon-76x76.png"> |
|
<link rel="apple-touch-icon" sizes="114x114" href="/src/img/favicon.ico/apple-icon-114x114.png"> |
|
<link rel="apple-touch-icon" sizes="120x120" href="/src/img/favicon.ico/apple-icon-120x120.png"> |
|
<link rel="apple-touch-icon" sizes="144x144" href="/src/img/favicon.ico/apple-icon-144x144.png"> |
|
<link rel="apple-touch-icon" sizes="152x152" href="/src/img/favicon.ico/apple-icon-152x152.png"> |
|
<link rel="apple-touch-icon" sizes="180x180" href="/src/img/favicon.ico/apple-icon-180x180.png"> |
|
<link rel="icon" type="image/png" sizes="192x192" href="/src/img/favicon.ico/android-icon-192x192.png"> |
|
<link rel="icon" type="image/png" sizes="32x32" href="/src/img/favicon.ico/favicon-32x32.png"> |
|
<link rel="icon" type="image/png" sizes="96x96" href="/src/img/favicon.ico/favicon-96x96.png"> |
|
<link rel="icon" type="image/png" sizes="16x16" href="/src/img/favicon.ico/favicon-16x16.png"> |
|
<link rel="manifest" href="/manifest.json"> |
|
<meta name="msapplication-TileColor" content="#ffffff"> |
|
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> |
|
<meta name="theme-color" content="#ffffff"> |
|
<meta http-equiv="Cache-control" content="no-cache"> |
|
<title><?= $_SESSION["config"]["nome_sito"] ?></title> |
|
<meta name="title" content="<?= $_SESSION["config"]["nome_sito"] ?>"/> |
|
<meta name=description content="Procurement - appalti"> |
|
<meta name="keywords" content="Procurement - appalti" /> |
|
<!--[if lt IE 9]> |
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|
<![endif]--> |
|
<? |
|
$default_themes = getThemes(); |
|
if ((!empty($_GET["theme"]) && !empty($default_themes[$_GET["theme"]])) || !empty($_SESSION["currentTheme"]) || !empty($_SESSION["utente"]->getInfo()["theme"])) { |
|
if ((empty($_GET["theme"])) || (!empty($_GET["theme"]) && $_GET["theme"] != "-")) { |
|
$themeName = $_GET["theme"] ?? $_SESSION["currentTheme"] ?? $_SESSION["utente"]->getInfo()["theme"] ?? "-"; |
|
$themePath = $config["themesFolder"].$themeName.".css"; |
|
if (file_exists($root.$themePath)) { |
|
$theme = $default_themes[$themeName] ?? null; |
|
if (!empty($theme)) { |
|
$required_css[] = $themePath; |
|
$_SESSION["currentTheme"] = $themeName; |
|
} |
|
} |
|
} else { |
|
unset($_SESSION["currentTheme"]); |
|
} |
|
} |
|
if (!empty($required_css)) foreach($required_css AS $css) { ?> |
|
<link rel="stylesheet" type="text/css" href="<?= $css ?>"> |
|
<? } ?> |
|
<? |
|
if (!empty($required_js)) foreach($required_js AS $js) { ?> |
|
<script type="text/javascript" src="<?= $js ?>"></script> |
|
<? } |
|
$json_dict_path = "/dictionary/IT.json"; |
|
if (file_exists($beRoot."/dictionary/".$_SESSION["language"].".json")) { $json_dict_path = "/dictionary/".$_SESSION["language"].".json"; } ?> |
|
<script> |
|
var js_dict |
|
$.getJSON('<?= $json_dict_path ?>', function(data) { |
|
js_dict = data; |
|
}); |
|
</script> |
|
<style> |
|
.ck-editor__main * { |
|
color: #212529; |
|
} |
|
<? |
|
if (!empty($theme["style"])) { echo $theme["style"]; } |
|
if (!empty($_SESSION["ente"])) { |
|
$_SESSION["ente"]->getInfo()["interfaccia_menu"] = (!empty($_SESSION["ente"]->getInfo()["interfaccia_menu"])) ? $_SESSION["ente"]->getInfo()["interfaccia_menu"] : "254f8f"; |
|
$_SESSION["ente"]->getInfo()["interfaccia_menu_top"] = (!empty($_SESSION["ente"]->getInfo()["interfaccia_menu_top"])) ? $_SESSION["ente"]->getInfo()["interfaccia_menu_top"] : "002E7A"; |
|
$_SESSION["ente"]->getInfo()["interfaccia_bottom"] = (!empty($_SESSION["ente"]->getInfo()["interfaccia_bottom"])) ? $_SESSION["ente"]->getInfo()["interfaccia_bottom"] : "666666"; |
|
?> |
|
<? if ($_SESSION["ente"]->getInfo()["interfaccia_menu"] != "") { |
|
$toolBg = color_luminance($_SESSION["ente"]->getInfo()["interfaccia_menu"],-0.2); |
|
|
|
$textColor = (evaluateColorContrast($_SESSION["ente"]->getInfo()["interfaccia_menu"],"000000")["ratio"] > 7) ? "black" : "white"; |
|
?> |
|
#topBar, #logo-container { background-color: #<? echo $_SESSION["ente"]->getInfo()["interfaccia_menu"]; ?> !important } |
|
#topBar > * { color: <? echo $textColor; ?> } |
|
#topBar a { color: <? echo $textColor; ?> } |
|
<? |
|
$textColor = (evaluateColorContrast($toolBg,"000000")["ratio"] > 7) ? "black" : "white"; |
|
?> |
|
#main-tools { background-color: #<? echo $toolBg; ?> !important} |
|
#main-tools > * { color: <? echo $textColor; ?> } |
|
#main-tools a { color: <? echo $textColor; ?> } |
|
<? } |
|
if ($_SESSION["ente"]->getInfo()["interfaccia_bottom"] != "") { |
|
$textColor = $BottomTextColorStyle = (evaluateColorContrast($_SESSION["ente"]->getInfo()["interfaccia_bottom"],"000000")["ratio"] > 7) ? "black" : "white"; |
|
?> |
|
#bottom { background-color: #<? echo $_SESSION["ente"]->getInfo()["interfaccia_bottom"]; ?> !important } |
|
#bottom > * { color: <? echo $textColor; ?> } |
|
#bottom a { color: <? echo $textColor; ?> } |
|
<? } ?> |
|
<? |
|
} |
|
?> |
|
</style> |
|
<script> |
|
function asideShowCookie() { |
|
status = leggiCookie("asideClose"); |
|
console.log(status); |
|
if (status != "1") { |
|
document.cookie = "asideClose=1; path=/"; |
|
} else { |
|
document.cookie = "asideClose=0; path=/"; |
|
} |
|
} |
|
</script> |
|
</head> |
|
<? |
|
$asideClose = (!empty($_COOKIE["asideClose"])) ? "drawer-out" : ""; |
|
?> |
|
<body class="<?= empty($hide_menu) ? null : 'h-100' ?> <?= $asideClose ?>"> |
|
<? |
|
if(empty($hide_menu)) { |
|
?> |
|
<header> |
|
<nav id="topBar" class="navbar <?= (!empty($_SESSION["ente"]) && $_SESSION["ente"]->getInfo()["ambienteTest"] == "S") ? "progress-bar-striped" : "" ?> fixed-top text-white justify-content-start"> |
|
<button type="button" data-toogle="drawer" class="btn btn-sm btn-outline-light mr-3 drawer-toogle" onClick="asideShowCookie()"><i class="fa fa-bars"></i></button> |
|
<span class="lead d-none d-sm-inline text-truncate" style="max-width:25%"><?= (!empty($_SESSION["ente"])) ? $_SESSION["ente"]->getInfo()["denominazione"] : $config["nome_sito"] ?></span> |
|
<ul class="nav ml-auto flex-row align-items-center"> |
|
<? |
|
include($beRoot."/utenti/tools.php"); |
|
$utente = $_SESSION["utente"]->getInfo(); |
|
if ($_SESSION["utente"]->isSupportoOrRoot() && isset($_SESSION["ente"])) { |
|
?> |
|
<li class="nav-item px-2"> |
|
<div class="badge badge-primary p-2 float-right"> |
|
ID Tenant: <?= $_SESSION["ente"]->codice ?> |
|
</div> |
|
</li> |
|
<? |
|
} |
|
?> |
|
<li class="nav-item px-2"> |
|
<div class="badge badge-info p-2 float-right"> |
|
Sessione: <strong><?= substr(session_id(),0,6) ?></strong> |
|
</div> |
|
</li> |
|
<? |
|
$changelogs = []; |
|
|
|
if (!empty($_SESSION["utente"])) { |
|
$changelog_parser->templateWrapper->renderBtn( |
|
$changelog_parser->countUnviewedChangelogs( |
|
$_SESSION["utente"]->codice, DateTime::createFromFormat('Y-m-d H:i:s', $_SESSION["utente"]->getInfo()["inizio_changelog"]) |
|
), |
|
"/backend/changelogs/endpoint.php" |
|
); |
|
} |
|
include __DIR__."/docs.php"; |
|
include(__DIR__."/user.php"); |
|
if ($_SESSION["utente"]->qualificato) { |
|
?> |
|
<li class="nav-item px-2"> |
|
<a class="nav-link first-level" data-toggle="collapse" href="#main-tools" role="button" aria-expanded="false" aria-controls="main-tools"> |
|
<i class="fa fa-cog"></i><span class="d-none d-sm-inline"> <?= __("Strumenti") ?></span><span class="badge badge-danger ml-2" id="badge-count-total"></span> |
|
</a> |
|
</li> |
|
<? |
|
} |
|
if(! empty($_SESSION["utente"]) && is_a($_SESSION["utente"], "Utente")) { |
|
?> |
|
<li class="nav-item bg-danger px-2"> |
|
<a class="nav-link first-level" href="/logout.php" title="<?= __("logout") ?>"> |
|
<i class="fa fa-power-off"></i> |
|
</a> |
|
</li> |
|
<? |
|
} |
|
?> |
|
</ul> |
|
</nav> |
|
</header> |
|
<aside> |
|
<div class="d-flex flex-column h-100"> |
|
<div id="logo-container" class="text-center pb-1"> |
|
<a href="/" title="Dashboard" style="cursor: pointer;"> |
|
<? |
|
$pathLogo = "/src/img/logo-srl-blu.png"; |
|
if (isset($_SESSION["ente"]) && !empty($_SESSION["ente"]->getInfo()["logo"])) { |
|
$pathLogo = "/documenti/enti/{$_SESSION["ente"]->getInfo()["logo"]}"; |
|
} |
|
?> |
|
<img class="drawer-logo" src="<?= $pathLogo ?>" alt="Logo"> |
|
</a> |
|
</div> |
|
<div class="flex-fill d-flex flex-row align-items-stretch"> |
|
<ul class="list-unstyled w-100 scrollable text-center pt-5"> |
|
<? $dashBoardActive = ($_SERVER['REQUEST_URI'] == "/") ? ' class="active"' : "" ?> |
|
<li <?= $dashBoardActive ?>> |
|
<a href="/backend/index.php" class="btn btn-link"> |
|
<i class="fa fa-tachometer-alt fa-2x"></i><br> |
|
DASHBOARD |
|
</a> |
|
</li> |
|
<? |
|
if(! empty($tools)) { |
|
foreach ($tools as $id_tool => $tool) { |
|
?> |
|
<li id="preferito-<?= $id_tool ?>" class="<?= !$tool["preferito"] ? 'd-none ' : (($radice == $id_tool) ? ' active' : null) ?> position-relative"> |
|
<? |
|
if (file_exists($beRoot."/".$id_tool."/badge.php")) { |
|
?> |
|
<div class="badge-container position-absolute" style="top:0; right:5px" data-target="/<?= $id_tool; ?>/badge.php"> |
|
<? include($beRoot."/". $id_tool ."/badge.php"); ?> |
|
</div> |
|
<? |
|
} |
|
?> |
|
<a href="<?= "/backend/{$id_tool}/" ?>" class="d-block" title="<?= $tool["descrizione"] ?>"> |
|
<?if (!empty($tool["icon"])) { echo "<i class='".$tool["icon"]." fa-2x'></i>"; } ?><br> |
|
<span class="text-uppercase"><?= __($tool["titolo"]) ?></span> |
|
</a> |
|
</li> |
|
<? |
|
} |
|
} |
|
?> |
|
</ul> |
|
</div> |
|
</div> |
|
</aside> |
|
<main data-sps-offset> |
|
<? |
|
if(! empty($__layout_main_tools)) echo $__layout_main_tools; |
|
echo '<div class="main-container">'; |
|
} |
|
if (!empty($breadcrumb) && is_array($breadcrumb)) { |
|
?> |
|
<nav aria-label="breadcrumb"> |
|
<ol class="breadcrumb"> |
|
<? foreach($breadcrumb AS $link => $label) { ?> |
|
<li class="breadcrumb-item <?= empty($link) ? " active" : "" ?>"> |
|
<?if (!empty($link)) { echo '<a href="/backend'. $link .'">'; } ?> |
|
<?= $label ?> |
|
<? if (!empty($link)) echo '</a>' ?> |
|
</li> |
|
<? } ?> |
|
</ol> |
|
</nav> |
|
<? |
|
} |
|
?> |
|
<noscript> |
|
<div class="alert alert-warning"> |
|
<h3 class="text-center"> |
|
<span class="fa fa-exclamation-circle"></span><br> |
|
<?= __('js-alert') ?> |
|
</h3> |
|
</div> |
|
</noscript> |
|
<div id="__manageArea"> |
|
<? |
|
if (isset($_SESSION["ente"]) && !$_SESSION["ente"]->checkPEC()) { |
|
alertManager::printAlertBox(__("La piattaforma non è in grado di inviare PEC"),($_SESSION["utente"]->gerarchia <= 10) ? (__("Verificare la configurazione") . " <a href='/backend/pec/index.php'>PEC</a>") : _("Contattare un utente amministratore")); |
|
} |
|
}
|