<div id="aggiungi-componente" class="modal fade" tabindex="-1" aria-labelledby="aggiungi un componente" aria-hidden="true" role="dialog">
  <div class="modal-dialog modal-xl" role="document">

    <!-- Modal content-->
    <div class="modal-content">
        <div class="modal-header">
            <h5 class="modal-title">Aggiungi un componente</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Chiudi">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
        <div class="modal-body py-1">
            <div class="row d-flex align-items-stretch">
            <?php 
                $queryComponenti = "SELECT * FROM geecD_componenti WHERE tipo LIKE 'componenteDinamico' OR tipo LIKE 'componenteDinamicoPagine' OR tipo LIKE 'pagine'";
                $risComponenti = $geecomDb->eseguiQueryLettura($queryComponenti);
                while($componente = $risComponenti->fetch_assoc()) {
                    echo"<div class=\"col-6 col-sm-4 col-lg-3 col-xl-1 p-1 mb-1\">
                        <a href=\"../controller/controllerContenuti.php?operazione=aggiungiComponentePagina&idPagina={$contenuto->getId()}&idComponente={$componente["id"]}\" class=\"btn btn-light btn-block\">"
                        . "<img class=\"img-fluid\" src=\"{$componente["icona"]}\">"
                        . "<h6>{$componente["nome"]}</h6>
                        </a>
                    </div>";
                }
            ?>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">Annulla</button>
        </div>
    </div>
  </div>
</div>