AP44/include/menu.php

81 lines
4.2 KiB
PHP

<div class="col-auto col-md-3 col-xl-2 px-sm-2 px-0 bg-dark">
<div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 text-white min-vh-100">
<a href="http://localhost:2080/gsb/AP44/index.php?direction=home" class="d-flex align-items-center pb-3 mb-md-0 me-md-auto text-white text-decoration-none">
<strong><span class="fs-5 d-none d-sm-inline">GSB LABORATOIRE</span></strong>
</a>
<div class="dropdown pb-4">
<a href="#" class="d-flex align-items-center text-white text-decoration-none dropdown-toggle"
id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false">
<span class="d-none d-sm-inline mx-1">
<?= $_SESSION['uNom'] . ' (' . $_SESSION['uType'] . ')' ?>
</span>
</a>
<ul class="dropdown-menu dropdown-menu-dark text-small shadow" aria-labelledby="dropdownUser1">
<li><a class="dropdown-item" href="controleurs/c_deconnexion.php">Déconnexion</a></li>
</ul>
</div>
<ul class="nav nav-pills flex-column mb-sm-auto mb-0 align-items-center align-items-sm-start" id="menu">
<li class="nav-item">
<a href="index.php" class="nav-link align-middle px-0">
<i class="fs-4 bi-house"></i> <span class="ms-1 d-none d-sm-inline">Accueil</span>
</a>
</li>
<!--
Partie visiteur
-->
<?php
if ($_SESSION['uType'] == 'visiteur'):
?>
<li>
<a href="#submenu1" data-bs-toggle="collapse" class="nav-link px-0 align-middle dropdown-toggle">
<strong><i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de
frais</span></strong>
</a>
<ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu">
<li class="w-100">
<a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span
class="d-none d-sm-inline">Gérer ses fiches</span>
</a>
</li>
<li>
<a href="index.php?direction=nouvelleFiche&currentList" class="nav-link px-0"> <span
class="d-none d-sm-inline">Fiche du mois</span>
</a>
</li>
</ul>
</li>
<li>
<a href="#" class="nav-link px-0 align-middle dropdown-toggle">
<strong><i class="fs-4 bi-table"></i> <span
class="ms-1 d-none d-sm-inline">Visites</span></a></strong>
</li>
<?php endif;
if ($_SESSION['uType'] == 'comptable'): ?>
<!--
Partie comptable
-->
<li>
<strong>
<a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle dropdown-toggle">
<i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span>
</a>
</strong>
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
<li class="w-100">
<a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span
class="d-none d-sm-inline">gestion des fiches</span>
</a>
</li>
<li>
<a href="index.php?direction=ficheAvalider" class="nav-link px-0"> <span
class="d-none d-sm-inline">fiches à valider</span>
</a>
</li>
</ul>
</li>
<?php endif; ?>
</ul>
<hr>
</div>
</div>