<?php
if (isset($_SESSION['login']) && isset($_SESSION['pwd'])) {
?>  
<div class="p-1">
    <a class="dropdown-item" href="#" onclick="item_ajouter()">Ajouter un item</a>
    <a class="dropdown-item" href="#" onclick="ajouter_items()">Ajouter des items</a>
    <a class="dropdown-item" href="#" onclick="ajouter_zip()">Ajouter des items en zip</a>
    <a class="dropdown-item" href="#" onclick="modifier_items();">Modifier plusieurs items</a>
    <a class="dropdown-item" href="#" onclick="supprimer_items();">Supprimer plusieurs items</a>

    <?php if($menu_header["Action"]["display"]){ ?>
    <hr class="my-1">
    <a class="dropdown-item" href="#" onclick="collection_edit('')">Ajouter une collection</a>
    <?php } ?>

    <a class="dropdown-item" href="#" onclick="ajouter_page()">Ajouter une page</a>
    <hr class="my-1">
    <a class="dropdown-item" href="#" onclick="vider_cache('items')">Vider le cache</a>
    <a class="dropdown-item" href="#" onclick="vider_cache('vignettes')">Vider le cache image</a> 
    <hr class="my-1">
    <a class="dropdown-item" href="#" onclick="logout()">Logout</a>
</div>
<?php
                                                          } else {
?>
<form method="post" class="form-small form-login">
    <fieldset class="p-1" id="login">
        <label class="small mb-1" for="login">Login</label>
        <input class="form-control form-control-sm" name="login" value="" type="text">
        <label class="small mb-1 mt-2" for="pwd">Password</label>
        <input class="form-control form-control-sm" name="pwd" value="" type="password"> 
        <input type="submit" class="mt-1 btn btn-primary btn-sm" name="identify" value="Go">
    </fieldset>
</form>
<?php
}
if(isset($retour)){
    echo "<div class='small text-danger p-1'>".$retour."</div>";
}
?>