    <?php 
       /*
        *
        * copyright (c) 2013-2022 Heliac Technologies
        * license http://opensource.org/licenses/gpl-license.php GNU GPL v3 
        *
        * linee guida per l'utilizzo del logo http://www.geecom.org/index.php?alias=linee-guida-per-luso-del-logo-geecom
        */
    
        $datiGeecomDoc = $geecomDb->leggiSingolaRiga("geec_prodotti",3);
    ?>
    <div class="admin-bar d-flex align-items-center">
        <ul class="list-group">
            <li class="list-group-item">
                <a class="active" href="<?php echo $impostazioni["urlPiattaforma"]."/".str_replace("../","",$datiGeecomDoc["percorso"])."/home.php" ?>" ><img src="template/geecom_icona.png" alt="geecom"></a>
                <div class="baloon d-flex align-items-center text-muted small">Torna alla Dashboard</div>
            </li>
            
            <li class="list-group-item">
                <a class="active" href="<?php echo $impostazioni["urlSito"]."/".str_replace("../","",$datiGeecomDoc["percorso"])."/impostazioni.php" ?>" ><i class="fas fa-sliders-h"></i></a>
                <div class="baloon d-flex align-items-center text-muted small">Impostazioni</div>
            </li>
            
            <li class="list-group-item">
                <a class="active" href="<?php echo $impostazioni["urlSito"]."/".str_replace("../","",$datiGeecomDoc["percorso"])."/statistiche.php" ?>" ><i class="fas fa-chart-area"></i></a>
                <div class="baloon d-flex align-items-center text-muted small">Statistiche</div>
            </li>
            <?php 
                if(isset($pagina)) {

                    $linkModificaPagina = ($pagina["tipo"]=="elementoPortfolio") ? "componenti/portfolio/creaElemento.php?id={$pagina["id"]}" :"creaContenuto.php?id={$pagina["id"]}";
                    $linkModifica = $impostazioni["urlPiattaforma"]."/".str_replace("../","",$datiGeecomDoc["percorso"])."/$linkModificaPagina";
                    $tipoElemento = ($pagina["tipo"]=="elementoPortfolio") ? "elemento portfolio" : $pagina["tipo"];
            ?>
            <li class="list-group-item">
                <a  href="<?php echo $linkModifica ?>"><i class="fas fa-edit"></i></a><div class="baloon d-flex align-items-center text-muted small"><div>Modifica <?php echo $tipoElemento." <br><strong>".$pagina["titolo"] ?></strong></div></div>
            </li>
            <?php 
                }
                
                if(isset($categoria)) {
                    $linkModifica = $impostazioni["urlPiattaforma"]."/".str_replace("../","",$datiGeecomDoc["percorso"])."/creaCategoria.php?id={$categoria["id"]}";
            ?>
            <li class="list-group-item">
                <a  href="<?php echo $linkModifica ?>"><i class="fas fa-edit"></i></a><div class="baloon d-flex align-items-center text-muted small"><div>Modifica categoria <br><strong><?php $categoria["nome"] ?></strong></div></div>
            </li>
            <?php 
                }
            ?>
            <li class="list-group-item">
                <a href="<?php echo $impostazioni["urlPiattaforma"]."/".str_replace("../","",$datiGeecomDoc["percorso"])."/logout.php" ?>" ><i class="fas fa-sign-out-alt"></i></a>
                <div class="baloon d-flex align-items-center text-muted small">Esci</div>
            </li>
        </ul>
    </div>