function mostraNotifiche()
{
    $fi = new FacadeGestioneImmobili();
    $ft = new FacadeGestioneTrattative();
    $immobili = $fi->getImmobili();
    $trattative = $ft->getTrattative();
    $stringa = "";
    $view = "";
    if ($_SESSION['tipo'] == 'amministratore') {
        //caso amministratore
        $stringa = "<form method='GET' action='indexAmministratore.php' ><div>";
        $view = file_get_contents('indexAmministratore.html');
        foreach ($immobili as $value) {
            if ($value->getAgente() == null) {
                $id = $value->getId();
                $stringa = $stringa . "C'è un nuovo immobile da assegnare<br><button type='submit' name='id' value='{$id}'>Visualizza</button><br><br>";
            }
        }
        foreach ($trattative as $value) {
            if ($value->getAgente() == null) {
                $stringa = $stringa . "Ci sono nuove Trattative da assegnare<br><button type='submit' name='bar' value='trattative'>Visualizza</button><br><br>";
                break;
            }
        }
    } else {
        if ($_SESSION['tipo'] == 'agente') {
            //caso agente
            $stringa = "<form method='GET' action='indexAgente.php' ><div>";
            $view = file_get_contents('indexAgente.html');
            foreach ($immobili as $value) {
                if ($value->getApprovato() == 0 && $value->getAgente() == $_SESSION['cod']) {
                    $id = $value->getId();
                    $stringa = $stringa . "Ti è stato assegnato un nuovo Immobile<br><button type='submit' name='id' value='{$id}'>Visualizza</button><br><br>";
                }
            }
            foreach ($trattative as $value) {
                if ($value->getApprovata() == 0 && $value->getAgente() == $_SESSION['cod']) {
                    $stringa = $stringa . "Ci sono nuove Trattative da approvare<br><button type='submit' name='bar' value='trattative'>Visualizza</button><br><br>";
                    break;
                }
            }
        }
    }
    $stringa = $stringa . "</div></form>";
    $view_xhtml_valorizzata = str_replace('{CATALOGO}', $stringa, $view);
    echo $view_xhtml_valorizzata;
}