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 "" . $badge . ""; } } } ?>