correction bug / netoyage du code

This commit is contained in:
pierre renaudot 2024-01-12 11:12:03 +01:00
parent c5796a4bf2
commit 08f7cea2dc
5 changed files with 16 additions and 16 deletions

View File

@ -1,12 +1,14 @@
<?php <?php
$_SESSION["typeU"] = "comptable";
require_once(__DIR__ . '/../Class/class.gestionFiche.php'); require_once(__DIR__ . '/../Class/class.gestionFiche.php');
$gestionFiche = new Class_gestionFiche($pdo);
$typeU = $_SESSION['uType'];
$gestionFiche = new Class_gestionFiche($pdo);
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS $LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
if ($_SESSION["typeU"] == "comptable") { // Gestion du selecteur selon le type user
if ($typeU == "comptable") {
if (isset($_REQUEST['selVisiteur'])) { if (isset($_REQUEST['selVisiteur'])) {
$userId = $_REQUEST['selVisiteur']; $userId = $_REQUEST['selVisiteur'];
} else { } else {
@ -18,6 +20,4 @@ if ($_SESSION["typeU"] == "comptable") {
$lesFiches = $gestionFiche->get_ListesFiches($userId); $lesFiches = $gestionFiche->get_ListesFiches($userId);
include("vues/v_gestionFiches.php"); include("vues/v_gestionFiches.php");

View File

@ -1,3 +1,3 @@
<?php <?php
include(__DIR__ . '/../vues/v_homePage.php'); include(__DIR__ . '/../vues/v_homePage.php');

View File

@ -1,5 +1,5 @@
<div class="col-auto col-md-3 col-xl-2 px-sm-2 px-0 bg-dark"> <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 "> <div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 text-white min-vh-100">
<a href="/" class="d-flex align-items-center pb-3 mb-md-0 me-md-auto text-white text-decoration-none"> <a href="/" 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> <strong><span class="fs-5 d-none d-sm-inline">GSB LABORATOIRE</span></strong>
</a> </a>
@ -28,7 +28,7 @@
if ($_SESSION['uType'] == 'visiteur'): if ($_SESSION['uType'] == 'visiteur'):
?> ?>
<li> <li>
<a href="#submenu1" data-bs-toggle="collapse" class="nav-link px-0 align-middle"> <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 <strong><i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de
frais</span></strong> frais</span></strong>
</a> </a>
@ -46,7 +46,7 @@
</ul> </ul>
</li> </li>
<li> <li>
<a href="#" class="nav-link px-0 align-middle"> <a href="#" class="nav-link px-0 align-middle dropdown-toggle">
<strong><i class="fs-4 bi-table"></i> <span <strong><i class="fs-4 bi-table"></i> <span
class="ms-1 d-none d-sm-inline">Visites</span></a></strong> class="ms-1 d-none d-sm-inline">Visites</span></a></strong>
</li> </li>
@ -56,9 +56,11 @@
Partie comptable Partie comptable
--> -->
<li> <li>
<a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle"> <strong>
<i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span> <a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle dropdown-toggle">
</a> <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"> <ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
<li class="w-100"> <li class="w-100">
<a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span <a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span

View File

@ -2,7 +2,7 @@
<div class="col-3 mb-4"> <div class="col-3 mb-4">
<br> <br>
<?php <?php
if ($_SESSION['typeU'] != 'comptable') { if ($typeU != 'comptable') {
echo '<h3>Gérer mes fiches de frais</h3>'; echo '<h3>Gérer mes fiches de frais</h3>';
} else { ?> } else { ?>

View File

@ -1,6 +1,4 @@
<h4>BONJOUR VOUS ETES <h4 class="d-block mx-auto my-2 text-align-center">BONJOUR <?= strtoupper($_SESSION['uPrenom']) ?> NOUS SOMMES LE <?= date('d-m-Y') ?></h4>
<?= strtoupper($_SESSION['uType']) ?>
</h4>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">