Compare commits

..

2 Commits

Author SHA1 Message Date
pierre renaudot
2438e20db2 Merge branch 'main' of https://gitea.lyc-lecastel.fr/pierre.renaudot/AP44 2024-01-12 11:12:38 +01:00
pierre renaudot
08f7cea2dc correction bug / netoyage du code 2024-01-12 11:12:03 +01:00
5 changed files with 16 additions and 23 deletions

View File

@ -1,12 +1,14 @@
<?php
$_SESSION["typeU"] = "comptable";
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
if ($_SESSION["typeU"] == "comptable") {
// Gestion du selecteur selon le type user
if ($typeU == "comptable") {
if (isset($_REQUEST['selVisiteur'])) {
$userId = $_REQUEST['selVisiteur'];
} else {
@ -16,16 +18,7 @@ if ($_SESSION["typeU"] == "comptable") {
$userId = $_SESSION['uId'];
}
//Pagination
if(isset($_GET['page']) && !empty($_GET['page'])){
$currentPage = (int) strip_tags($_GET['page']);
}else{
$currentPage = 1;
}
$pages = ceil($gestionFiche->get_nbRemboursement($userId) / $gestionFiche::$NB_LIGNES_PAGINATION);
$lesFiches = $gestionFiche->get_Page($currentPage, $userId);
include("vues/v_gestionFiches.php");

View File

@ -1,3 +1,3 @@
<?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="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">
<strong><span class="fs-5 d-none d-sm-inline">GSB LABORATOIRE</span></strong>
</a>
@ -28,7 +28,7 @@
if ($_SESSION['uType'] == 'visiteur'):
?>
<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
frais</span></strong>
</a>
@ -46,7 +46,7 @@
</ul>
</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
class="ms-1 d-none d-sm-inline">Visites</span></a></strong>
</li>
@ -56,9 +56,11 @@
Partie comptable
-->
<li>
<a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span>
</a>
<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

View File

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

View File

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