Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 772 → Rev 773

/trunk/modules/liste_fancy_box/squelettes/liste-fancy-box.tpl.html
New file
0,0 → 1,15
<div>
 
<h3>code catminat du milieu : <?=$catminat?> </h3>
<?php foreach ($listecatminat as $cle => $element ) : ?>
<ul>
<a title="cliquez pour accéder à la fiche de ce taxon" href="<?= $urls->obtenirUrlFiche($element['num_nomen'],'nom_scientifique'); ?>">
<li><?=$element['idiotaxon']?> </li>
</a>
</ul>
<?endforeach;?>
</div>
/trunk/modules/liste_fancy_box/ListeFancyBox.php
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;
}
}
?>