Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 818 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 818 Rev 885
Line 5... Line 5...
5
	// Méthodes
5
	// Méthodes
6
	protected $nom = null;
6
	protected $nom = null;
7
	protected $type_nom = 'nom_scientifique';
7
	protected $type_nom = 'nom_scientifique';
8
	protected $type_resultat = '';
8
	protected $type_resultat = '';
9
	protected $submit = '';
9
	protected $submit = '';
-
 
10
	protected $acces_fiche = false;
10
	private $recherche_avancee;
11
	private $recherche_avancee;
11
	private $param;
12
	private $param;
12
	private $i18n =  array();
13
	private $i18n =  array();
Line 13... Line 14...
13
	
14
	
Line 115... Line 116...
115
		$approche = '';
116
		$approche = '';
116
		$res = $noms->getRechercheEtendue($this->nom, $this->type_resultat);
117
		$res = $noms->getRechercheEtendue($this->nom, $this->type_resultat);
117
		$form = I18n::get('Recherche-form-nom');
118
		$form = I18n::get('Recherche-form-nom');
118
		if ($res == false || $res['entete']['total'] == 0) { // recherche nom approché
119
		if ($res == false || $res['entete']['total'] == 0) { // recherche nom approché
119
			$approche = $this->rechercherNomApproche($noms);
120
			$approche = $this->rechercherNomApproche($noms);
120
		} elseif ($res['entete']['total'] == 1 || $this->submit == $form['fiche']) { // renvoie à la fiche
121
		} elseif ($res['entete']['total'] == 1 || $this->acces_fiche) { // renvoie à la fiche
121
			$approche = $this->traiterAccesFiche($res);
122
			$approche = $this->traiterAccesFiche($res);
122
		} else { // affiche les résultats
123
		} else { // affiche les résultats
123
			$res['type'] = $this->type_nom;
124
			$res['type'] = $this->type_nom;
124
			Registre::set('resultats', $res);
125
			Registre::set('resultats', $res);
125
			$approche = 'ok';
126
			$approche = 'ok';
Line 172... Line 173...
172
			$this->type_nom = $_GET['type_nom'];
173
			$this->type_nom = $_GET['type_nom'];
173
		}
174
		}
174
		if (isset($_GET['submit'])) {
175
		if (isset($_GET['submit'])) {
175
			$this->submit = urldecode($_GET['submit']);
176
			$this->submit = urldecode($_GET['submit']);
176
		}
177
		}
-
 
178
		if(isset($_GET['acces_fiche'])) {
-
 
179
			$this->acces_fiche = true;
-
 
180
		}
177
		if (isset($_GET['niveau'])) {
181
		if (isset($_GET['niveau'])) {
178
			Registre::set('parametres.niveau', $_GET['niveau']);
182
			Registre::set('parametres.niveau', $_GET['niveau']);
179
		}
183
		}
180
		if (isset($_GET['resultat'])) {
184
		if (isset($_GET['resultat'])) {
181
			$this->type_resultat = urldecode($_GET['resultat']);
185
			$this->type_resultat = urldecode($_GET['resultat']);