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.
27 righe
1.1 KiB
27 righe
1.1 KiB
<? |
|
if (!isset($root)) { |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!$_SESSION["utente"]->check(true)) { die(); } |
|
} |
|
if (!empty($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) { |
|
$manager = new publicRichiesteOE(); |
|
$total = $manager->getRichieste("S",[],[],[],0,-1); |
|
if (!empty($total)) { |
|
$checkStato = $pdo->prepare("SELECT timestamp_trasmissione FROM r_richieste_oe WHERE codice_richiesta = :richiesta AND codice_operatore = :operatore AND timestamp_trasmissione IS NULL"); |
|
$checkStato->bindValue(":operatore",$_SESSION["utente"]->oe["codice"]); |
|
$badge = 0; |
|
foreach($total AS $ricBadge) { |
|
if (strtotime($ricBadge["scadenza"]) > time()) { |
|
$checkStato->bindValue(":richiesta",$ricBadge["codice"]); |
|
$checkStato->execute(); |
|
if ($checkStato->rowCount()) { $badge++; } |
|
} |
|
} |
|
if ($badge > 0) { |
|
echo "<span data-target='/comunicazioni/badge.php' class='float-right m-1 badge badge-danger badge-count'>" . $badge . "</span>"; |
|
} |
|
} |
|
} |
|
|
|
?>
|
|
|