""){ $sql = "Select * From regle Where IDTXT=".$id; $result = runquery($sql); $answer = mysql_fetch_row($result); $this->IDTXT=$answer[0]; $this->typetxt=$answer[1]; $this->libelletxt=stripslashes($answer[2]); $this->preambuletxt=stripslashes($answer[3]); } } //property function getTypetxt(){return $this->typetxt;} function getLibelletxt(){return $this->libelletxt;} //methodes function setRegle($id, $type, $libelle, $preambule){ $this->idtxt=$id; $this->typetxt=$type; $this->libelletxt=stripslashes($libelle); $this->preambuletxt=stripslashes($preambule); } function getRegle(){ $p ="
typetxt))."'>".strtoupper($this->typetxt)." : $this->libelletxt"; $p.= "
$this->preambuletxt"; $p.= "

"; return $p; } } //***************************** class Regles extends Regle { var $items; function Regles($typeRegle = ''){ if (empty($typeRegle)) { $sql = "Select * From regle"; } else { $sql = "Select * From regle Where typeTexte='".$typeRegle."'"; } $result = runquery($sql); while ($answer = mysql_fetch_array($result)) { $item = new regleMembre; $item->setRegle($answer[0], $answer[1], $answer[2], $answer[3]); $this->items[] = $item; } } function lireRegles(){ $content = ""; if ( !isset($this->items)) return; foreach ($this->items as $i => $value) { $content .= $this->items[$i]->getRegle(); } return $content; } function lireRegleDetail($IDR){ $oRegl = new regleMembre($IDR); $p = "

 "; $p .= "".strtoupper($oRegl->getTypetxt())." : ".$oRegl->getLibelletxt()."

getTypetxt()))."'>Retour Textes Complet
"; $p .= "

"; $chap = new Chapitres($IDR); $p .= $chap->lireChapitres(); return $p; } } //************************************************* class baseChapitre { function baseChapitre(){} function setChapitre($id, $regle, $code, $libelle){} function getChapitre(){} } //************* class Chapitre extends baseChapitre { var $IDCHAP; // type : int var $IDTXT; // type : int var $CodeChap; // type : string var $LibelleChap; // type : string function Chapitre($idChap=''){ if ($idChap <> ""){ $sql = "Select * From chapitre Where IDCHAP=".$idChap; $result = runquery($sql); $answer = mysql_fetch_row($result); $this->IDCHAP=$answer[0]; $this->IDTXT=$answer[1]; $this->CodeChap=stripslashes($answer[2]); $this->LibelleChap=stripslashes($answer[3]); } } //properties function getCode(){ return $this->CodeChap;} function getLibelle(){ return $this->LibelleChap;} function getRegle(){ return $this->IDTXT;} //methodes function setChapitre($id, $regle, $code, $libelle){ $this->IDCHAP=$id; $this->IDTXT=$regle; $this->CodeChap=stripslashes($code); $this->LibelleChap=stripslashes($libelle); } function getChapitre(){ global $Z; $p = "

"; $p .= "$this->CodeChap : $this->LibelleChap"; $p .= "

"; return $p; } } //**************** class Chapitres extends baseChapitre { var $items; function Chapitres($regle){ $sql = "Select * From chapitre Where IDTXT=".$regle." Order By CodeChap"; $result = runquery($sql); while ($answer = mysql_fetch_array($result)) { $item = new Chapitre; $item->setChapitre($answer[0], $answer[1], $answer[2], $answer[3]); $this->items[] = $item; } } function lireChapitres(){ $content = ""; if ( !isset($this->items)) return; foreach ($this->items as $i => $value) { $content .= $this->items[$i]->getChapitre(); } return $content; } function lireChapitreDetail($chap){ global $Z, $Lib; $oChap = new Chapitre($chap); $p = "

 "; $p .= "".$oChap->getCode()." : ".$oChap->getLibelle()."

Retour Textes Complet
"; $p .= "

"; $arts = new Articles($chap); $p .= $arts->lireArticles(); $artSec = new Sections($chap); $p .= $artSec->lireSections($chap); return $p; } } //**************** class Article { var $IDART; // type : int var $IDSEC; // type : int var $IDCHAP; // type : int var $CodeArt; // type : string var $ContenuArt; // type : string function Article(){} function setArticle($id, $section, $chapitre, $code, $content){ $this->IDART=$id; $this->IDSEC=$section; $this->IDCHAP=$chapitre; $this->CodeArt=stripslashes($code); $this->ContenuArt=stripslashes($content); } function getArticle(){ $p = "
"; $p .= "$this->CodeArt : "; $p .= "$this->ContenuArt
"; return $p; } } //******************** class Articles { var $items; function Articles($chapitre, $section=''){ if ($section != '') { $sql = "Select * From article Where (IDCHAP=".$chapitre." and IDSEC=".$section.") Order by CodeArt"; }else{ $sql = "Select * From article Where (IDCHAP=".$chapitre." and IDSEC=0) Order by CodeArt"; } $result = runquery($sql); while ($answer = mysql_fetch_array($result)) { $item = new Article; $item->setArticle($answer[0], $answer[1], $answer[2], $answer[3], $answer[4]); $this->items[] = $item; } } function lireArticles(){ $content = ""; if ( !isset($this->items)) return; foreach ($this->items as $i => $value) { $content .= $this->items[$i]->getarticle(); } return $content; } } //**************** class Section { var $IDSEC; // type : int var $IDCHAP; // type : int var $CodeSec; // type : string var $LibelleSec; // type : string function Section(){} function setSection($id, $chapitre, $code, $content){ $this->IDSEC=$id; $this->IDCHAP=$chapitre; $this->CodeSec=stripslashes($code); $this->LibelleSec=stripslashes($content); } function getSection($chap){ $p = "
"; $p .= "      $this->CodeSec : "; $p .= "$this->LibelleSec
"; $arts = new Articles($chap, $this->IDSEC); $p .= $arts->lireArticles(); $p .= "
"; return $p; } } //************************* class Sections { var $items; function Sections($chapitre){ $sql = "Select * From section Where (IDCHAP=".$chapitre.") Order By CodeSec"; $result = runquery($sql); while ($answer = mysql_fetch_array($result)) { $item = new Section; $item->setSection($answer[0], $answer[1], $answer[2], $answer[3]); $this->items[] = $item; } } function lireSections($chapitre){ $content = ""; if ( !isset($this->items)) return; foreach ($this->items as $i => $value) { $content .= $this->items[$i]->getSection($chapitre); } return $content; } } ?> Pharmacie du Point G
 
République du Mali
un Peuple - un But - une Foi
   
Autres Rubriques