<?php  
include("../includes/inc-config.php");
include(CHEMIN."/includes/inc-fonctions.php");

include(CHEMIN."includes/Spyc.php");
include(CHEMIN."includes/yaml-readwriteclass.php");
$zine=new yamlreadwrite(); 

// traiter le formulaire
$source=CHEMIN.DOSSIER_CONTENUS."/config_site.yaml";
$zine->yamlread($source);
$zine->yamlfrompost(true);

include(CHEMIN."/includes/inc-header.php");

include("inc-admin-header.php");

$messages="";

echo "<div aria-live='polite' aria-atomic='true' class='position-relative'>
<div class='toast-container position-absolute top-0 end-0 p-3'>";
echo $messages;
echo "</div></div>";
?>

<main id="main" class="container-fluid px-4">
    <div class="row my-4">
        <div class="col-12 texte mb-4">
            <h3>Configuration du site</h3>
            <div>Configurez le site et ses options.</div>
        </div>


        <div class="col-12 col-sm-9 col-lg-6">
            <form method="post">
                <?php
                $zine->yamltoform("Updater");
                ?>
            </form>
        </div>

        <div class='col-12 col-sm-3 col-lg-6'>
            <div class="border rounded p-3">
                <h2 class="titre-small mb-2">A propos</h2>
                <div class="texte">
                    Attention lors du changement du password. 
                
                
                
                </div>
            </div>

        </div>
    </div>
</main>

<?php 
include("inc-admin-footer.php");
include("../includes/inc-footer.php");
?>
