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.
124 righe
5.1 KiB
124 righe
5.1 KiB
<? |
|
if (isset($_SESSION["ente"])) { |
|
if (!isset($_searchString)) { $bandi = publicAlboFornitori::getList(["b_bandi_albo.stato"=>20],[],0,-1); } |
|
if (!empty($bandi)) { |
|
$risultati = []; |
|
foreach($bandi AS $bando) { |
|
$insert = true; |
|
if (!isset($_searchString) && !empty($bando["scadenza"]) && strtotime($bando["scadenza"]) < time()) { |
|
$insert = false; |
|
} |
|
if ($insert) { |
|
$risultati[$bando["tipologia"]][] = $bando; |
|
} |
|
} |
|
$icone = [ |
|
"I" => "fa fa-bullseye", |
|
"S" => "fa fa-list", |
|
"M" => "fa fa-store", |
|
]; |
|
|
|
foreach($risultati AS $type => $elenchi) { |
|
if (!empty($elenchi)) { |
|
if (!isset($_searchString)) { |
|
$linkHP = ""; |
|
switch($type) { |
|
case "I": |
|
$createButton = false; |
|
$titleHp = __("Indagini di mercato ante 31/12/2023"); |
|
$linkHP = "archivio_indagini"; |
|
break; |
|
case "S": |
|
$createButton = true; |
|
$titleHp = __("S.D.A."); |
|
$linkHP = "archivio_sda"; |
|
break; |
|
case "M": |
|
$createButton = true; |
|
$titleHp = __("Mercato elettronico"); |
|
$linkHP = "archivio_mercato"; |
|
break; |
|
case "F": |
|
$createButton = true; |
|
$titleHp = __("Albi fornitori"); |
|
$linkHP = "archivio_albo"; |
|
break; |
|
case "P": |
|
$createButton = true; |
|
$titleHp = __("Albi professionisti"); |
|
$linkHP = "archivio_professionisti"; |
|
break; |
|
default: |
|
$createButton = false; |
|
$linkHP = ""; |
|
$titleHp = __("Elenco"); |
|
break; |
|
} |
|
if ($createButton) { |
|
$icon = $icone[$type] ?? "fa fa-users"; |
|
$badge = count($elenchi); |
|
$elementiDx[] = "<div class=\"btn btn-block text-left hp-button px-3 py-4 mb-1 btn-lg\"><a href=\"/{$linkHP}/index.php\"><span class=\"{$icon} mr-3\"></span> {$titleHp} <span class=\"float-right badge badge-danger\">{$badge}</span></a></div>"; |
|
continue; |
|
} |
|
?> |
|
<div class="px-4 mb-5"> |
|
<? if (!empty($linkHP)) { ?><a href="/<?= $linkHP ?>/index.php" class="float-right"><span class="fa fa-search"></span> <?= __("Vedi tutti") ?></a><? } ?> |
|
<h2 class="border-bottom mb-3 text-uppercase"><?= $titleHp ?></h2> |
|
<? } ?> |
|
<div class="row"> |
|
<? |
|
foreach($elenchi AS $bando) { |
|
$icon = $icone[$bando["tipologia"]] ?? "fa fa-users"; |
|
$href = "/albo_fornitori/dettaglio.php?codice={$bando["codice"]}"; |
|
?> |
|
<div class="col-12 my-2"> |
|
<div class="card"> |
|
<div class="card-body"> |
|
<div class="d-flex align-items-center"> |
|
<div class="align-middle text-center d-none d-lg-block col-lg-1"> |
|
<span class="<?= $icon ?> fa-2x"></span> |
|
</div> |
|
<div class="align-middle col-12 col-lg-7"> |
|
<strong class="h5 text-uppercase"> |
|
<a href="<?= $href ?>"><?= strip_tags($bando["oggetto"]) ?></a> |
|
</strong> |
|
</div> |
|
<div class="align-middle d-none d-lg-block col-lg-2 text-center"> |
|
<? if (!empty($bando["scadenza"])) { ?> |
|
<span class="fa fa-clock fa-2x"></span><br> |
|
<strong><?= mysql2datetime($bando["scadenza"]) ?></strong> |
|
<?= __("Scadenza") ?> |
|
<? } else { ?> |
|
<span class="fa fa-box-open fa-2x"></span><br> |
|
<strong><?= __("Partecipazione aperta") ?></strong> |
|
<? } ?> |
|
</div> |
|
<div class="align-middle d-none d-lg-block col-lg-2 text-center hp-button p-3"> |
|
<a href="<?= $href ?>"><span class="fa fa-search fa-2x"></span><br><?= __("Vedi dettagli") ?></a> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="card-footer text-right d-lg-none"> |
|
<small> |
|
<? if (!empty($bando["scadenza"])) { ?> |
|
<span class="fa fa-clock"></span> <?= mysql2datetime($bando["scadenza"]) ?> |
|
<?= __("Scadenza") ?> |
|
<? } else { ?> |
|
<span class="fa fa-box-open"></span> <?= __("Partecipazione aperta") ?> |
|
<? } ?> |
|
</small> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
?> |
|
</div> |
|
<? if (!isset($_searchString)) { ?> |
|
</div> |
|
<? } |
|
} |
|
} |
|
} |
|
} |
|
?>
|