New file |
0,0 → 1,79 |
<?php |
/** |
* Cette classe est le contrôleur pour l'affichage de listes dans des fancy box. |
*/ |
|
|
class ListeFancyBox extends aControleur { |
|
private $type = ''; |
private $informations; |
private $appUrls; |
private $conteneur; |
private $referentiel; |
private $num_nom; |
|
|
public function __construct() { |
$this->capturerParametres(); |
$this->conteneur = new Conteneur($this->parametres); |
$this->informations = $this->conteneur->getApiInformations(); |
$this->appUrls = $this->conteneur->getAppUrls(); |
} |
|
|
private function capturerParametres() { |
if (isset($_GET['type'])) { |
$this->type = $_GET['type']; |
} |
if (isset($_GET['referentiel'])) { |
$this->referentiel = $_GET['referentiel']; |
} |
if (isset($_GET['num_nom'])) { |
$this->num_nom = $_GET['num_nom']; |
} |
} |
|
public function executerActionParDefaut() { |
$this->executerLister(); |
} |
|
public function executerLister($donnees) { |
header('Content-type: text/html'); |
$html = $this->chargerListeHtml(); |
echo $html; |
exit; |
} |
|
public function chargerListeHtml() { |
$donnees['liste'] = ''; |
$html = ''; |
if ($this->type == 'catminat') { |
$donnees = $this->getListeCatminat('0','*'); |
$donnees['urls'] = $this->appUrls; |
|
} |
if ($donnees != '') { |
$html = $this->getVue(dirname(__FILE__).'/squelettes/liste-fancy-box', $donnees); |
} |
return $html; |
} |
|
|
public function getListeCatminat($depart, $limite) { |
$Catminat = array(); |
$this->informations ->setProjet('baseflor'); |
$this->informations ->setBdnt($this->referentiel); |
$this->informations ->setNum_nom($this->num_nom); |
$this->informations ->setDepart($depart); |
$this->informations ->setLimite($limite); |
$informations = $this->informations->getInformationsRelationCatminat(); |
if($informations != ""){ |
$Catminat['listecatminat'] = $informations['resultat']; |
$Catminat['catminat'] = $informations['resultat'][0]['catminat_code']; |
} |
return $Catminat; |
} |
|
} |
?> |