    <?php

	/*
	* copyright (c) 2013-2021 Heliac Technologies
	* license http://opensource.org/licenses/gpl-license.php GNU GPL v3 
	*
	* linee guida per l'utilizzo del logo http://www.geecom.org/articolo.php?id=34&alias=linee-guida-per-l%27uso-del-logo-geecom
	*/
    
        $arrayColori = array(""=>"Trasparente","bg-primary"=>"Primary","bg-secondary"=>"Secondary","bg-success"=>"Success","bg-info"=>"Info","bg-warning"=>"Warning","bg-danger"=>"Danger","bg-light"=>"Light","bg-dark"=>"Dark","bg-white"=>"Bianco");
        $coloreMenu = array("navbar-dark"=>"Chiaro","navbar-light"=>"Scuro");
    ?>

    <h4 class="mb-4 title">Barra superiore</h4>
    <form class="form-horizontal" role="form" name="formSettaggiBarraSuperiore" action="../controller/controllerImpostazioni.php" method="post" enctype="multipart/form-data">
        <input type="text" class="d-none" name="operazione" value="aggiornaImpostazioniBarraSuperiore">
        <div class="row mt-5">
            <div class="col-12">
                <div class="form-row">
                    <div class="form-group col-md-4">
                        <label for="InputFile" >Colore di sfondo</label>
                        <select class="form-control" name="coloreBarraSuperiore">
                        <?php 
                            foreach($arrayColori as $classe=>$colore) {
                                if($impostazioni["coloreBarraSuperiore"]==$classe) {
                                    echo"<option value=\"$classe\" selected>$colore</option>";
                                }
                                else {
                                    echo"<option value=\"$classe\">$colore</option>";
                                }
                            }
                        ?>
                        </select>
                    </div>

                    <div class="form-group col-md-4">
                        <label for="InputFile" >Colore testi</label>
                        <select class="form-control" name="coloreTestoBarraSuperiore">
                        <?php 
                            foreach($coloreMenu as $classe=>$colore) {
                                if($impostazioni["coloreTestoBarraSuperiore"]==$classe) {
                                    echo"<option value=\"$classe\" selected>$colore</option>";
                                }
                                else {
                                    echo"<option value=\"$classe\">$colore</option>";
                                }
                            }
                        ?>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="footer">
            <button type="button" class="btn btn-primary float-right" onclick=document.formSettaggiBarraSuperiore.submit()><i class="fas fa-check"></i> Salva</button>
        </div>

    </form>