This commit is contained in:
KONE SOREL 2026-03-31 12:45:56 +00:00
parent 79cc1c4d7f
commit ee25952839
2 changed files with 15 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class ControleurRoles extends Controleur
}
public function index()
{
$profil = $this->utilisateur->getListeProfilCode();
$profil = $this->utilisateur->getListeProfilCodeRh();
$this->genererVue(array('profil' => $profil));
}

View File

@ -662,4 +662,18 @@ class Utilisateur extends Modele {
$email, $hash, $codeLangue, $actVisible, $AffectionVisible, $user));
}
public function getListeProfilCodeRh()
{
if (est_anglophone())
{
$sql = 'SELECT codeProfil AS `code`, CONCAT(libelleEng, " ( ", codeProfil, " )") AS libelle FROM c_profil WHERE (codeSociete=?) ORDER BY libelleEng';
}
else
{
$sql = 'SELECT codeProfil AS `code`, CONCAT(libelle, " ( ", codeProfil, " )") AS libelle FROM c_profil WHERE (codeSociete=?) ORDER BY libelle';
}
$liste = $this->executerRequete($sql, array($_SESSION['codeSociete']));
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
}