From 6d57767987a98ff97548e7ba39a59481c02428bb Mon Sep 17 00:00:00 2001 From: pierre renaudot Date: Fri, 12 Jan 2024 11:16:29 +0100 Subject: [PATCH] corec bug --- controleurs/c_ficheAvalider.php | 8 ++++++++ controleurs/c_gestionFiche.php | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/controleurs/c_ficheAvalider.php b/controleurs/c_ficheAvalider.php index 68c5d2f..7ed5e18 100644 --- a/controleurs/c_ficheAvalider.php +++ b/controleurs/c_ficheAvalider.php @@ -16,7 +16,15 @@ 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_nbFicheAvalider() / $gestionFiche::$NB_LIGNES_FICHEAVALIDER); +$lesFiches = $gestionFiche->get_ficheAvalider($currentPage); include("vues/v_fichesAvalider.php"); diff --git a/controleurs/c_gestionFiche.php b/controleurs/c_gestionFiche.php index 1d19c29..ef6a2e1 100644 --- a/controleurs/c_gestionFiche.php +++ b/controleurs/c_gestionFiche.php @@ -18,7 +18,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");