Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 801 → Rev 802

/trunk/modules/liste_fancy_box_phytosocio/squelettes/liste-fancy-box-ref.tpl.html
New file
0,0 → 1,7
<div>
 
<h3> Références de la dernière bibliographie</h3>
<?=empty($liste) ? "Pas de données" : $liste?>
 
</div>
/trunk/modules/liste_fancy_box_phytosocio/squelettes/liste-fancy-box-taxons.tpl.html
New file
0,0 → 1,15
<div>
 
<h3>Taxons du milieu : <?=$catminat?> </h3>
<? if (!empty($liste)) : ?>
<?php foreach ($liste 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;?>
<? else : ?>
Pas de données.
<? endif; ?>
</div>
/trunk/modules/liste_fancy_box_phytosocio/squelettes/liste-fancy-box-synonymes.tpl.html
New file
0,0 → 1,14
<div>
 
<h3>synonymes </h3>
<? if (!empty($liste)) : ?>
<?php foreach ($liste as $cle => $element ) : ?>
<ul>
<li><?=$element['syntaxon']?> </li>
</ul>
<?endforeach;?>
<? else : ?>
Pas de données.
<? endif; ?>
</div>
/trunk/modules/liste_fancy_box_phytosocio/ListeFancyBoxPhytosocio.php
New file
0,0 → 1,115
<?php
/**
* Cette classe est le contrôleur pour l'affichage de listes dans des fancy box.(fenêtres)
*/
 
 
class ListeFancyBoxPhytosocio 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->syntaxons = $this->conteneur->getApiSyntaxons();
$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'];
}
if (isset($_GET['catminat'])) {
$this->catminat= trim(urldecode($_GET['catminat']));
}
}
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 = '';
$squelette = dirname(__FILE__).'/squelettes/liste-fancy-box';
if ($this->type == 'catminat_taxons') {
$donnees = $this->getListeCatminatTaxons();
$squelette .= '-taxons';
 
} elseif ($this->type == 'catminat_synonymes') {
$donnees = $this->getListeCatminatSynonymes();
$squelette .= '-synonymes';
} elseif ($this->type == 'catminat_ref') {
$donnees = $this->getListeCatminatRef();
$squelette .= '-ref';
}
if ($donnees['liste'] !== '') {
$donnees['urls'] = $this->appUrls;
$html = $this->getVue($squelette, $donnees);
}
return $html;
}
public function getListeCatminatTaxons() {
$Catminat = array();
$this->informations ->setProjet('baseflor');
$this->informations ->setBdnt($this->referentiel);
$this->informations ->setNum_nom($this->num_nom);
$this->informations ->setDepart(0);
$this->informations ->setLimite('*');
$informations = $this->informations->getInformationsRelationCatminat();
if($informations != ""){
$Catminat['liste'] = $informations['resultat'];
$Catminat['catminat'] = $informations['resultat'][0]['catminat_code'];
}
return $Catminat;
}
public function getListeCatminatSynonymes() {
$Catminat = array();
$this->syntaxons->setProjet('baseveg');
$this->syntaxons->setCatminat($this->catminat);
$syntaxons = $this->syntaxons->getSyntaxonsSynonymes();
if (is_array($syntaxons)) {
$Catminat['liste'] = $syntaxons['resultat'];
$Catminat['catminat'] = $syntaxons['resultat'][0]['code_catminat'];
}
return $Catminat;
}
public function getListeCatminatRef() {
$ref = array();
$this->syntaxons->setProjet('baseveg');
$this->syntaxons->setCatminat($this->catminat);
$syntaxons = $this->syntaxons->getSyntaxonsCatminat();
if (is_array($syntaxons)) {
$ref['liste'] = $syntaxons['resultat'][0]['ref_der_biblio'];
}
return $ref;
}
}
?>