Compare commits

..

No commits in common. "2438e20db2c34c541619ad69c3574b78d66c95c3" and "a00620beef69e7eb60f975d6d140d4d513160fdc" have entirely different histories.

5 changed files with 23 additions and 16 deletions

View File

@ -1,14 +1,12 @@
<?php
$_SESSION["typeU"] = "comptable";
require_once(__DIR__ . '/../Class/class.gestionFiche.php');
$typeU = $_SESSION['uType'];
$gestionFiche = new Class_gestionFiche($pdo);
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
// Gestion du selecteur selon le type user
if ($typeU == "comptable") {
if ($_SESSION["typeU"] == "comptable") {
if (isset($_REQUEST['selVisiteur'])) {
$userId = $_REQUEST['selVisiteur'];
} else {
@ -18,7 +16,16 @@ if ($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 min-vh-100">
<div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 text-white ">
<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 dropdown-toggle">
<a href="#submenu1" 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></strong>
</a>
@ -46,7 +46,7 @@
</ul>
</li>
<li>
<a href="#" class="nav-link px-0 align-middle dropdown-toggle">
<a href="#" class="nav-link px-0 align-middle">
<strong><i class="fs-4 bi-table"></i> <span
class="ms-1 d-none d-sm-inline">Visites</span></a></strong>
</li>
@ -56,11 +56,9 @@
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>
<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>
<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 ($typeU != 'comptable') {
if ($_SESSION['typeU'] != 'comptable') {
echo '<h3>Gérer mes fiches de frais</h3>';
} else { ?>

View File

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