Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1381 | Rev 1477 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1381 Rev 1452
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe mère du module Liste.
4
 * Classe mère du module Liste.
5
 *
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
10
 * @copyright	2011 Tela-Botanica
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Fiche extends aControleur {
15
class Fiche extends aControleur {
16
 
16
 
17
	private $onglet = 'synthese';
17
	private $onglet = 'synthese';
18
	private $parametres = array();
18
	private $parametres = array();
19
	private $conteneur = null;
19
	private $conteneur = null;
20
	private $num_nom = 0;
20
	private $num_nom = 0;
21
	private $nom_retenu = '';
21
	private $nom_retenu = '';
22
	private $nom_selectionne = null;
22
	private $nom_selectionne = null;
23
	private $nom_appele_html = null; // le nom et l'auteur par lesquels on est arrivés sur la fiche, en cas de synonymie
23
	private $nom_appele_html = null; // le nom et l'auteur par lesquels on est arrivés sur la fiche, en cas de synonymie
24
	private $url;
24
	private $url;
25
 
25
 
26
 
26
 
27
	public function initialiser() {
27
	public function initialiser() {
28
		$this->capturerParametres();
28
		$this->capturerParametres();
29
		$this->conteneur = new Conteneur($this->parametres);
29
		$this->conteneur = new Conteneur($this->parametres);
30
		$nom_courant = $this->conteneur->getNomCourant();
30
		$nom_courant = $this->conteneur->getNomCourant();
31
		$this->nom_selectionne = $nom_courant->getNomSelectionne();
31
		$this->nom_selectionne = $nom_courant->getNomSelectionne();
32
		$this->url = $this->conteneur->getAppUrls();
32
		$this->url = $this->conteneur->getAppUrls();
33
		$this->nom_retenu = $nom_courant->getNomRetenu();
33
		$this->nom_retenu = $nom_courant->getNomRetenu();
34
		if ($this->nom_retenu->get('id') != $this->nom_selectionne->get('id')) {
34
		if ($this->nom_retenu->get('id') != $this->nom_selectionne->get('id')) {
35
			$this->nom_appele_html = $this->nom_selectionne->get('nom_sci_html').' '.$this->nom_selectionne->get('auteur');
35
			$this->nom_appele_html = $this->nom_selectionne->get('nom_sci_html').' '.$this->nom_selectionne->get('auteur');
36
		}
36
		}
37
		spl_autoload_register(array($this, 'chargerClassesOnglets'));
37
		spl_autoload_register(array($this, 'chargerClassesOnglets'));
38
	}
38
	}
39
 
39
 
40
	private function capturerParametres() {
40
	private function capturerParametres() {
41
		if (isset($_GET['num_nom'])) {
41
		if (isset($_GET['num_nom'])) {
42
			$this->parametres['num_nom'] = $_GET['num_nom'];
42
			$this->parametres['num_nom'] = $_GET['num_nom'];
43
		}
43
		}
44
		if (isset($_GET['nom'])) {
44
		if (isset($_GET['nom'])) {
45
			$this->parametres['nom'] = $_GET['nom'];
45
			$this->parametres['nom'] = $_GET['nom'];
46
		}
46
		}
47
		if (isset($_GET['type_nom'])) {
47
		if (isset($_GET['type_nom'])) {
48
			$this->parametres['type_nom'] = $_GET['type_nom'];
48
			$this->parametres['type_nom'] = $_GET['type_nom'];
49
		}
49
		}
50
		if (isset($_GET['referentiel'])) {
50
		if (isset($_GET['referentiel'])) {
51
			$this->parametres['referentiel'] = $_GET['referentiel'];
51
			$this->parametres['referentiel'] = $_GET['referentiel'];
52
			Registre::set('parametres.referentiel', $_GET['referentiel']);
52
			Registre::set('parametres.referentiel', $_GET['referentiel']);
53
		}
53
		}
54
		if (isset($_GET['niveau'])) {
54
		if (isset($_GET['niveau'])) {
55
			Registre::set('parametres.niveau', $_GET['niveau']);
55
			Registre::set('parametres.niveau', $_GET['niveau']);
56
		}
56
		}
57
		if (isset($_GET['onglet'])) {
57
		if (isset($_GET['onglet'])) {
58
			$this->onglet = $_GET['onglet'];
58
			$this->onglet = $_GET['onglet'];
59
		}
59
		}
60
	}
60
	}
61
 
61
 
62
	private function chargerClassesOnglets($classe) {
62
	private function chargerClassesOnglets($classe) {
63
		$base = dirname(__FILE__).DS;
63
		$base = dirname(__FILE__).DS;
64
		$cheminFormateurs = $base.'formateurs'.DS;
64
		$cheminFormateurs = $base.'formateurs'.DS;
65
		$dossiers = array($base, $cheminFormateurs);
65
		$dossiers = array($base, $cheminFormateurs);
66
		foreach ($dossiers as $chemin) {
66
		foreach ($dossiers as $chemin) {
67
			$fichierATester = $chemin.$classe.'.php';
67
			$fichierATester = $chemin.$classe.'.php';
68
			if (file_exists($fichierATester)) {
68
			if (file_exists($fichierATester)) {
69
				include_once $fichierATester;
69
				include_once $fichierATester;
70
				return null;
70
				return null;
71
			}
71
			}
72
		}
72
		}
73
	}
73
	}
74
 
74
 
75
	public function executerActionParDefaut() {
75
	public function executerActionParDefaut() {
76
		$this->executerFiche();
76
		$this->executerFiche();
77
	}
77
	}
78
 
78
 
79
	public function executerFiche(){
79
	public function executerFiche(){
80
 
80
 
81
		$squelette = 'fiche_'.$this->onglet;
81
		$squelette = 'fiche_'.$this->onglet;
82
 
82
 
83
		//Gestion du niveau
83
		//Gestion du niveau
84
		$niveau = isset($_GET['niveau']) ? $_GET['niveau'] : 2;
84
		$niveau = isset($_GET['niveau']) ? $_GET['niveau'] : 2;
85
		if ($this->onglet == 'synthese' && $niveau != null) {
85
		if ($this->onglet == 'synthese' && $niveau != null) {
86
			$squelette .= '_niveau'.$niveau;
86
			$squelette .= '_niveau'.$niveau;
87
		}
87
		}
88
 
88
 
89
		// Récupération parametres et données
89
		// Récupération parametres et données
90
		$donnees = array_merge($this->obtenirDonnees(), $this->parametres);
90
		$donnees = array_merge($this->obtenirDonnees(), $this->parametres);
91
		$donnees['i18n'] = I18n::get('Fiche');
91
		$donnees['i18n'] = I18n::get('Fiche');
92
		$verna = isset($donnees['ethnobotanique']['nomsVerna']) && count($donnees['ethnobotanique']['nomsVerna']) ? $donnees['ethnobotanique']['nomsVerna'][0]['nom_vernaculaire'] : "";
92
		$verna = isset($donnees['ethnobotanique']['nomsVerna']) && count($donnees['ethnobotanique']['nomsVerna']) ? $donnees['ethnobotanique']['nomsVerna'][0]['nom_vernaculaire'] : "";
93
 
93
 
94
		// titre, description et tag de la page
94
		// titre, description et tag de la page
95
		$this->setSortie('titre', $this->nom_retenu->get('nom_sci'));
95
		$this->setSortie('titre', $this->nom_retenu->get('nom_sci'));
96
        // ( <meta name="description" ...> )
96
        // ( <meta name="description" ...> )
97
		$this->setSortie('description', sprintf("Fiche descriptive de %s %s (%s)", $this->nom_retenu->get('nom_sci'), $verna ? ('/ ' . $verna) : '', $donnees['description']['titre']));
97
		$this->setSortie('description', sprintf("Fiche descriptive de %s %s (%s)", $this->nom_retenu->get('nom_sci'), $verna ? ('/ ' . $verna) : '', $donnees['description']['titre']));
98
 
98
 
99
		$this->setSortie('tags', $this->nom_retenu->get('nom_sci').",".$verna.
99
		$this->setSortie('tags', $this->nom_retenu->get('nom_sci').",".$verna.
100
			",botanique,plante,description,ecologie,reconnaitre,fiche espece");
100
			",botanique,plante,description,ecologie,reconnaitre,fiche espece");
101
 
101
 
102
		$nom_sci_html = $this->nom_retenu->get('nom_sci_html');
102
		$nom_sci_html = $this->nom_retenu->get('nom_sci_html');
103
		// la recherche avancée à partir du clic sur le nom ne fonctionne pas sur les hybrides
103
		// la recherche avancée à partir du clic sur le nom ne fonctionne pas sur les hybrides
104
		$nom_sci_html = strpos($nom_sci_html, 'class="hyb"') === false ?
104
		$nom_sci_html = strpos($nom_sci_html, 'class="hyb"') === false ?
105
							$this->formaterLiensNomsHtml($nom_sci_html) : $nom_sci_html;
105
							$this->formaterLiensNomsHtml($nom_sci_html) : $nom_sci_html;
106
		
106
		
107
		// titre de la fiche
107
		// titre de la fiche
108
		$donnees['nom_retenu_html'] = $nom_sci_html.' '.$this->nom_retenu->get('auteur');
108
		$donnees['nom_retenu_html'] = $nom_sci_html.' '.$this->nom_retenu->get('auteur');
109
		
109
		
110
		$donnees['nom_retenu'] = $this->nom_retenu->get('nom_sci');
110
		$donnees['nom_retenu'] = $this->nom_retenu->get('nom_sci');
111
		$donnees['num_tax'] = $this->nom_selectionne->get('num_taxonomique');
111
		$donnees['num_tax'] = $this->nom_selectionne->get('num_taxonomique');
112
		$donnees['nom_appele_html'] = $this->nom_appele_html;
112
		$donnees['nom_appele_html'] = $this->nom_appele_html;
113
		$famille = $this->nom_retenu->getTaxonSupRang('180');
113
		$famille = $this->nom_retenu->getTaxonSupRang('180');
114
		$donnees['lien_recherche_famille'] = html_entity_decode($this->url->obtenirUrlRechercheAvancee(array("fam" => $famille)));
114
		$donnees['lien_recherche_famille'] = html_entity_decode($this->url->obtenirUrlRechercheAvancee(array("fam" => $famille)));
115
		$donnees['famille'] = $famille;
115
		$donnees['famille'] = $famille;
116
		
116
		
117
		$donnees['nom_vernaculaire'] = $verna;
117
		$donnees['nom_vernaculaire'] = $verna;
118
 
118
 
119
		// moteur de recherche
119
		// moteur de recherche
120
		$this->executerAction('Recherche', 'executerAccueil', $this->parametres);
120
		$this->executerAction('Recherche', 'executerAccueil', $this->parametres);
121
 
121
 
122
		// page synthese
122
		// page synthese
123
		$blocs_niveaux = $this->conteneur->getParametreTableau('blocs_fiche_defaut');
123
		$blocs_niveaux = $this->conteneur->getParametreTableau('blocs_fiche_defaut');
124
		$donnees['blocs'] = '"'.str_replace('|', '","', $blocs_niveaux[Registre::get('parametres.niveau')]).'"';
124
		$donnees['blocs'] = '"'.str_replace('|', '","', $blocs_niveaux[Registre::get('parametres.niveau')]).'"';
125
 
125
 
126
		// onglet
126
		// onglet
127
		$donnees['onglet'] = $this->onglet;
127
		$donnees['onglet'] = $this->onglet;
128
		$donnees['niveau'] = $niveau;
128
		$donnees['niveau'] = $niveau;
129
		$donnees['base_url_onglets'] = Config::get('base_url_application_onglets');
129
		$donnees['base_url_onglets'] = Config::get('base_url_application_onglets');
130
		
130
		
131
		$taxons = new Taxons();
131
		$taxons = new Taxons();
132
		$referentiel = $this->conteneur->getParametre('referentiel');
132
		$referentiel = $this->conteneur->getParametre('referentiel');
133
		
133
 
-
 
134
		$donnees['prod'] = Config::get('info.prod');
-
 
135
 
134
		$donnees['permalien_num_nom'] = $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns());
136
		$donnees['permalien_num_nom'] = $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns());
135
		$donnees['entete'] = $this->getVue('fiche_entete', $donnees);
137
		$donnees['entete'] = $this->getVue('fiche_entete', $donnees);
136
		$donnees['contenu_onglet'] = $this->getVue($squelette, $donnees);
138
		$donnees['contenu_onglet'] = $this->getVue($squelette, $donnees);
137
		
139
 
138
		$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_accueil_niveau'.$niveau, $donnees), true);
140
		$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_accueil_niveau'.$niveau, $donnees), true);
139
		$this->ajouterPiedDePage();
141
		$this->ajouterPiedDePage();
140
	}
142
	}
141
	
143
	
142
	public function executerTemplateAjax() {
144
	public function executerTemplateAjax() {
143
		$classe = ucfirst($this->onglet);
145
		$classe = ucfirst($this->onglet);
144
		$onglet = new $classe($this->conteneur);
146
		$onglet = new $classe($this->conteneur);
145
		$action = 'obtenir'.ucfirst($_GET['sous_action']);
147
		$action = 'obtenir'.ucfirst($_GET['sous_action']);
146
		$html_ajax = $onglet->$action();
148
		$html_ajax = $onglet->$action();
147
		header('Content-type : text/html');
149
		header('Content-type : text/html');
148
		echo $html_ajax;
150
		echo $html_ajax;
149
		exit;
151
		exit;
150
	}
152
	}
151
	
153
	
152
	private function formaterLiensNomsHtml($nom_sci_html) {		
154
	private function formaterLiensNomsHtml($nom_sci_html) {		
153
		$app_urls = new AppUrls();
155
		$app_urls = new AppUrls();
154
		$params = array();
156
		$params = array();
155
		$classes_recherche = array("fam" => "fam", "gen" => "gen", "sp" => "sp", "infra-sp" => "ssp");
157
		$classes_recherche = array("fam" => "fam", "gen" => "gen", "sp" => "sp", "infra-sp" => "ssp");
156
		
158
		
157
		$doc = new DOMDocument();
159
		$doc = new DOMDocument();
158
		$doc->loadHTML($nom_sci_html);
160
		$doc->loadHTML($nom_sci_html);
159
		$spans = $doc->getElementsByTagName('span');
161
		$spans = $doc->getElementsByTagName('span');
160
		$abbrs = $doc->getElementsByTagName('abbr');
162
		$abbrs = $doc->getElementsByTagName('abbr');
161
		
163
		
162
		$params_subsp = array();
164
		$params_subsp = array();
163
		
165
		
164
		$i18n =  I18n::get('Fiche');
166
		$i18n =  I18n::get('Fiche');
165
		
167
		
166
		//TODO: c'est un peu moche, la fonction est surement factorisable
168
		//TODO: c'est un peu moche, la fonction est surement factorisable
167
		if ($spans->length > 0) {
169
		if ($spans->length > 0) {
168
			foreach($spans as $span) {
170
			foreach($spans as $span) {
169
				$classe = $span->getAttribute('class');
171
				$classe = $span->getAttribute('class');
170
				if(in_array($classe, array_keys($classes_recherche))) {
172
				if(in_array($classe, array_keys($classes_recherche))) {
171
					
173
					
172
					$params[$classes_recherche[$classe]] = $span->nodeValue;	
174
					$params[$classes_recherche[$classe]] = $span->nodeValue;	
173
					if($classe == "sp") {
175
					if($classe == "sp") {
174
						$params_subsp = $params;
176
						$params_subsp = $params;
175
					}				
177
					}				
176
					$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params));
178
					$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params));
177
					$texte_lien = $span->nodeValue;	
179
					$texte_lien = $span->nodeValue;	
178
					
180
					
179
					$span->nodeValue = "";
181
					$span->nodeValue = "";
180
					$text = $doc->createElement('a', $texte_lien);
182
					$text = $doc->createElement('a', $texte_lien);
181
					$text->setAttribute('href', $lien_tpl);
183
					$text->setAttribute('href', $lien_tpl);
182
					$text->setAttribute('title', $i18n["lien-recherche-hier-".$classe]);
184
					$text->setAttribute('title', $i18n["lien-recherche-hier-".$classe]);
183
					$text->setAttribute('class', 'lien_recherche_hier');
185
					$text->setAttribute('class', 'lien_recherche_hier');
184
					$span->appendChild($text);
186
					$span->appendChild($text);
185
				}
187
				}
186
			}
188
			}
187
		}
189
		}
188
			
190
			
189
		if ($abbrs->length > 0) {
191
		if ($abbrs->length > 0) {
190
			foreach($abbrs as $abbr) {
192
			foreach($abbrs as $abbr) {
191
				$classe = $abbr->getAttribute('class');
193
				$classe = $abbr->getAttribute('class');
192
				$params_subsp["type"] = $abbr->nodeValue;
194
				$params_subsp["type"] = $abbr->nodeValue;
193
				$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params_subsp));
195
				$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params_subsp));
194
				$texte_lien = $abbr->nodeValue;
196
				$texte_lien = $abbr->nodeValue;
195
					
197
					
196
				$abbr->nodeValue = "";
198
				$abbr->nodeValue = "";
197
				$text = $doc->createElement('a', $texte_lien);
199
				$text = $doc->createElement('a', $texte_lien);
198
				$text->setAttribute('href', $lien_tpl);
200
				$text->setAttribute('href', $lien_tpl);
199
				$text->setAttribute('title', $i18n["lien-recherche-hier-ssp"]);
201
				$text->setAttribute('title', $i18n["lien-recherche-hier-ssp"]);
200
				$text->setAttribute('class', 'lien_recherche_hier');
202
				$text->setAttribute('class', 'lien_recherche_hier');
201
				$abbr->appendChild($text);
203
				$abbr->appendChild($text);
202
			}
204
			}
203
		}
205
		}
204
		
206
		
205
		return $doc->SaveXml();
207
		return $doc->SaveXml();
206
	}
208
	}
207
	
209
	
208
	private function formaterLienRechercheSurPartieNomSci(&$noeud, &$params) {
210
	private function formaterLienRechercheSurPartieNomSci(&$noeud, &$params) {
209
		
211
		
210
	}
212
	}
211
 
213
 
212
	public function ajouterLienModuleExport() {
214
	public function ajouterLienModuleExport() {
213
		$donnees['lien'] = $this->url->obtenirUrlPdfExport($this->parametres['num_nom']);
215
		$donnees['lien'] = $this->url->obtenirUrlPdfExport($this->parametres['num_nom']);
214
		$export = $this->getVue('fiche_pdf_lien', $donnees);
216
		$export = $this->getVue('fiche_pdf_lien', $donnees);
215
		return $export;
217
		return $export;
216
	}
218
	}
217
 
219
 
218
	public function ajouterPiedDePage() {
220
	public function ajouterPiedDePage() {
219
		$description = new Description($this->conteneur);
221
		$description = new Description($this->conteneur);
220
		$taxons = new Taxons();
222
		$taxons = new Taxons();
221
		$referentiel = $this->conteneur->getParametre('referentiel');
223
		$referentiel = $this->conteneur->getParametre('referentiel');
222
		$urlMobile = $this->url->obtenirUrlMobile($this->parametres['num_nom']);
224
		$urlMobile = $this->url->obtenirUrlMobile($this->parametres['num_nom']);
223
		$donnees = array('wikipedia' => $description->getUrlWikipedia(),
225
		$donnees = array('wikipedia' => $description->getUrlWikipedia(),
224
			'export_pdf' => $this->ajouterLienModuleExport(),
226
			'export_pdf' => $this->ajouterLienModuleExport(),
225
			'permalien_num_nom' => $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns()),
227
			'permalien_num_nom' => $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns()),
226
			'permalien_taxon' => $taxons->getUrlPermalienTaxon($referentiel, 1, $this->conteneur->getNomCourant()->getNt()),
228
			'permalien_taxon' => $taxons->getUrlPermalienTaxon($referentiel, 1, $this->conteneur->getNomCourant()->getNt()),
227
			'nn' => $this->conteneur->getNomCourant()->getNns(),
229
			'nn' => $this->conteneur->getNomCourant()->getNns(),
228
			'nt' => $this->conteneur->getNomCourant()->getNt(),
230
			'nt' => $this->conteneur->getNomCourant()->getNt(),
229
			'nnr' => $this->conteneur->getNomCourant()->getNnr(),
231
			'nnr' => $this->conteneur->getNomCourant()->getNnr(),
230
			'inpn' => $this->conteneur->getNomCourant()->getInpn(),
232
			'inpn' => $this->conteneur->getNomCourant()->getInpn(),
231
			'wiki' => $description->getLienWikini(),
233
			'wiki' => $description->getLienWikini(),
232
			'nom_retenu' => $this->nom_retenu->get('nom_sci'),
234
			'nom_retenu' => $this->nom_retenu->get('nom_sci'),
233
			'mobile' => $urlMobile,
235
			'mobile' => $urlMobile,
234
			'qr_code_png' => $this->obtenirUrlQrCode($urlMobile)
236
			'qr_code_png' => $this->obtenirUrlQrCode($urlMobile)
235
		);
237
		);
236
		$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_pied_page', $donnees), true);
238
		$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_pied_page', $donnees), true);
237
	}
239
	}
238
 
240
 
239
	private function obtenirUrlQrCode($urlMobile) {
241
	private function obtenirUrlQrCode($urlMobile) {
240
		$qr = $this->conteneur->getQrCode();
242
		$qr = $this->conteneur->getQrCode();
241
		$qr->setUrl(htmlspecialchars_decode($urlMobile));
243
		$qr->setUrl(htmlspecialchars_decode($urlMobile));
242
		$idQrCode = $this->conteneur->getParametre('referentiel') . '-' .$this->conteneur->getNomCourant()->getNns();
244
		$idQrCode = $this->conteneur->getParametre('referentiel') . '-' .$this->conteneur->getNomCourant()->getNns();
243
		$urlQrCode = $qr->dessiner($idQrCode);
245
		$urlQrCode = $qr->dessiner($idQrCode);
244
		return $urlQrCode;
246
		return $urlQrCode;
245
	}
247
	}
246
 
248
 
247
	public function executerOnglet(){
249
	public function executerOnglet(){
248
		$this->viderSorties();
250
		$this->viderSorties();
249
		$donnees = $this->obtenirDonnees();
251
		$donnees = $this->obtenirDonnees();
250
		$squelette_onglet = $this->onglet;
252
		$squelette_onglet = $this->onglet;
251
		// onglet
253
		// onglet
252
		$donnees['i18n'] = I18n::get('Fiche');
254
		$donnees['i18n'] = I18n::get('Fiche');
253
		$donnees['onglet'] = $this->onglet;
255
		$donnees['onglet'] = $this->onglet;
254
		$taxons = new Taxons();
256
		$taxons = new Taxons();
255
		$referentiel = $this->conteneur->getParametre('referentiel');
257
		$referentiel = $this->conteneur->getParametre('referentiel');
256
		$donnees['permalien_num_nom'] = $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns());
258
		$donnees['permalien_num_nom'] = $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns());
-
 
259
		$donnees['prod'] = Config::get('info.prod');
-
 
260
 
257
		// cas particulier de l'onglet synthese qui possède 3 niveaux
261
		// cas particulier de l'onglet synthese qui possède 3 niveaux
258
		// et dont le nom n'est donc pas directement celui de son squelette
262
		// et dont le nom n'est donc pas directement celui de son squelette
259
		if($this->onglet == "synthese") {
263
		if($this->onglet == "synthese") {
260
			$niveau = isset($_GET['niveau']) ? $_GET['niveau'] : 2;
264
			$niveau = isset($_GET['niveau']) ? $_GET['niveau'] : 2;
261
			$squelette_onglet .= '_niveau'.$niveau;
265
			$squelette_onglet .= '_niveau'.$niveau;
262
			$entete = $this->getVue('fiche_entete', $donnees);
266
			$entete = $this->getVue('fiche_entete', $donnees);
263
			$vue = $entete.$this->getVue('fiche_'.$squelette_onglet, $donnees);
267
			$vue = $entete.$this->getVue('fiche_'.$squelette_onglet, $donnees);
264
		} else {
268
		} else {
265
			$vue = $this->getVue('fiche_'.$squelette_onglet, $donnees);
269
			$vue = $this->getVue('fiche_'.$squelette_onglet, $donnees);
266
		}
270
		}
267
		
271
		
268
		header('Content-type: text/html');
272
		header('Content-type: text/html');
269
		$this->setSortie(self::RENDU_CORPS, $vue);
273
		$this->setSortie(self::RENDU_CORPS, $vue);
270
	}
274
	}
271
 
275
 
272
	private function obtenirDonnees() {
276
	private function obtenirDonnees() {
273
		$classe = ucfirst($this->onglet);
277
		$classe = ucfirst($this->onglet);
274
		$onglet = new $classe($this->conteneur); // grep-friendly: new Synthese()
278
		$onglet = new $classe($this->conteneur); // grep-friendly: new Synthese()
275
		return $onglet->obtenirDonnees();
279
		return $onglet->obtenirDonnees();
276
	}
280
	}
277
}
281
}
278
?>
282
?>