executerRequete($sql); return $liste->fetchAll(PDO::FETCH_ASSOC); } public function getListeTous() { if (est_anglophone()) { $sql = 'SELECT codeTarifActe as `code`, libelleEng as libelle FROM p_tarifacte order by libelle'; } else { $sql = 'SELECT codeTarifActe as `code`, libelle FROM p_tarifacte order by libelle'; } $liste = $this->executerRequete($sql); return $liste->fetchAll(PDO::FETCH_ASSOC); } public function getListeCreation() { $actesHarmonises = $_SESSION['actesHarmonises']; if( isset($actesHarmonises) && ($actesHarmonises=="1") ) { if (est_anglophone()) { $sql = 'SELECT "ST" as `code`, "None" libelle'; } else { $sql = 'SELECT "ST" as `code`, "Aucun" libelle'; } } else { if (est_anglophone()) { $sql = 'SELECT "ST" as `code`, "None" libelle UNION ALL SELECT codeTarifActe as `code`, libelleEng as libelle FROM p_tarifacte where (estTarif="1") order by libelle'; } else { $sql = 'SELECT "ST" as `code`, "Aucun" libelle UNION ALL SELECT codeTarifActe as `code`, libelle FROM p_tarifacte where (estTarif="1") order by libelle'; } } $liste = $this->executerRequete($sql); return $liste->fetchAll(PDO::FETCH_ASSOC); } public function creertarifactes($libelle, $libelleEng) { $codeSociete = $_SESSION['codeSociete']; $user = $_SESSION['login']; $sql = 'call sp_creer_tarif_actes(?, ?, ?, ?)'; $this->executerRequete($sql, array($codeSociete, $libelle, $libelleEng, $user)); } public function getListeTarif() { $codeSociete = $_SESSION['codeSociete']; $sql = 'SELECT * FROM p_tarifacte where codeSociete=? and (estTarif="1") order by libelle'; $liste = $this->executerRequete($sql, array($codeSociete)); return $liste->fetchAll(PDO::FETCH_ASSOC); } public function getunptarif($idTarif) { $sql = 'call sp_afficher_un_tarif_acte(?)'; $resultat = $this->executerRequete($sql, array($idTarif)); return $resultat->fetch(PDO::FETCH_ASSOC); } public function enregistrermodif($idTarif, $libelle, $libelleEng) { $user = $_SESSION['login']; $sql = 'call sp_modifier_tarif_acte(?, ?, ?, ?)'; $this->executerRequete($sql, array($idTarif, $libelle, $libelleEng, $user)); } public function supprimer($idTarif) { $user = $_SESSION['login']; $sql = 'call sp_supprimer_tarif_acte(?, ?)'; $this->executerRequete($sql, array($idTarif, $user)); } }