Import initial du projet Production
This commit is contained in:
59
Modele/Raisonconsultation.php
Executable file
59
Modele/Raisonconsultation.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
require_once 'Framework/Modele.php';
|
||||
|
||||
class Raisonconsultation extends Modele {
|
||||
|
||||
public function getListe()
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT codeRaisonConsultation as `code`, libelleEng as libelle FROM p_raisonconsultation order by ordre, libelle';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT codeRaisonConsultation as `code`, libelle FROM p_raisonconsultation order by ordre, libelle';
|
||||
}
|
||||
|
||||
$liste = $this->executerRequete($sql);
|
||||
|
||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeFiltre()
|
||||
{
|
||||
$tab_lien_maternite = array("A", "C");
|
||||
$codeLienParente = $_SESSION['codeLienParente_C'];
|
||||
$sexe = $_SESSION['sexe_C'];
|
||||
$maternitePossible = (in_array($codeLienParente, $tab_lien_maternite) && ($sexe=="F") );
|
||||
|
||||
if(!$maternitePossible)
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT codeRaisonConsultation as `code`, libelleEng as libelle
|
||||
FROM p_raisonconsultation where codeRaisonConsultation != "MAT" order by ordre, libelle';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT codeRaisonConsultation as `code`, libelle
|
||||
FROM p_raisonconsultation where codeRaisonConsultation != "MAT" order by ordre, libelle';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT codeRaisonConsultation as `code`, libelleEng as libelle
|
||||
FROM p_raisonconsultation order by ordre, libelle';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT codeRaisonConsultation as `code`, libelle
|
||||
FROM p_raisonconsultation order by ordre, libelle';
|
||||
}
|
||||
}
|
||||
|
||||
$liste = $this->executerRequete($sql);
|
||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user