37 lines
931 B
PHP
37 lines
931 B
PHP
<?php
|
|
|
|
class Class_gestionFiche
|
|
{
|
|
private $pdo = null;
|
|
|
|
public function __construct(PdoGsb $pDO)
|
|
{
|
|
$this->pdo = $pDO->getPdoGsb();
|
|
}
|
|
|
|
public function getLesUtilisateurs(): array
|
|
{
|
|
$req = 'SELECT "uId", "uNom", "uPrenom" FROM utilisateur WHERE "uStatut"!=0 ORDER BY "uNom" ASC;';
|
|
$result = $this->pdo->prepare($req);
|
|
$result ->execute();
|
|
|
|
return $result->fetchAll();
|
|
}
|
|
|
|
public function get_ListesFiches(string $idUtilisateur): array
|
|
{
|
|
$req = 'SELECT "rMois", "rEtat","rNbJustificatifs","rMontantValide","eLibelle"
|
|
FROM remboursement
|
|
INNER JOIN etat ON etat."eId"=remboursement."rEtat"
|
|
WHERE "rVisiteur"= :userId
|
|
ORDER BY "rMois" DESC';
|
|
|
|
$result = $this->pdo->prepare($req);
|
|
$result ->bindParam("userId", $idUtilisateur);
|
|
$result ->execute();
|
|
|
|
return $result->fetchAll();
|
|
}
|
|
|
|
|
|
} |