Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 164 Rev 180
Line 116... Line 116...
116
			if ($this->recherche == 'floue') {
116
			if ($this->recherche == 'floue') {
117
				$this->requete_condition[] = '(SOUNDEX('.$nom_champ.') = SOUNDEX(\''.$valeur.'\')'
117
				$this->requete_condition[] = '(SOUNDEX('.$nom_champ.') = SOUNDEX(\''.$valeur.'\')'
118
					.' OR SOUNDEX(REVERSE('.$nom_champ.')) = SOUNDEX(REVERSE(\''.$valeur.'\'))) ';
118
					.' OR SOUNDEX(REVERSE('.$nom_champ.')) = SOUNDEX(REVERSE(\''.$valeur.'\'))) ';
119
			} else {
119
			} else {
120
				if ($this->recherche == 'etendue') {
120
				if ($this->recherche == 'etendue') {
121
					$valeur = str_replace(' ','% ', $valeur);
121
					$valeur = '%'.str_replace(' ','% ', $valeur);
122
					$valeur .= '%';
122
					$valeur .= '%';
123
				}
123
				}
124
				$this->requete_condition[] = $nom_champ.' LIKE '.$this->getBdd()->proteger($valeur);
124
				$this->requete_condition[] = $nom_champ.' LIKE '.$this->getBdd()->proteger($valeur);
125
			}
125
			}
126
		}
126
		}
Line 329... Line 329...
329
			$table_retour_json['entete']['href.precedent'] = $url['precedent'];
329
			$table_retour_json['entete']['href.precedent'] = $url['precedent'];
330
		}
330
		}
331
		if (isset($url['suivant']) && $url['suivant']   != '') {
331
		if (isset($url['suivant']) && $url['suivant']   != '') {
332
			$table_retour_json['entete']['href.suivant']   = $url['suivant'];
332
			$table_retour_json['entete']['href.suivant']   = $url['suivant'];
333
		}
333
		}
334
	
334
 
335
		//on remplie la table $table_retour_json['resultat']
-
 
336
		if (isset($this->parametres['masque.nv'])) {
-
 
337
			$resultat = $this->trierRechercheFloue($this->parametres['masque.nv'], $resultat, 'nom_vernaculaire');
-
 
338
		}
-
 
339
		if (isset($this->parametres['masque'])) {
-
 
340
			$resultat = $this->trierRechercheFloue($this->parametres['masque'], $resultat, 'nom_vernaculaire');
-
 
341
		}
-
 
342
		foreach ($resultat as $tab) {
335
		foreach ($resultat as $tab) {
343
			$resultat_json[$tab['num_nom_vernaculaire']]['id'] = $tab['id'];
336
			$resultat_json[$tab['num_nom_vernaculaire']]['id'] = $tab['id'];
344
			$resultat_json[$tab['num_nom_vernaculaire']]['nom_vernaculaire'] = $tab['nom_vernaculaire'];
337
			$resultat_json[$tab['num_nom_vernaculaire']]['nom_vernaculaire'] = $tab['nom_vernaculaire'];
345
			$resultat_json[$tab['num_nom_vernaculaire']]['langue.code'] = $tab['code_langue'];
338
			$resultat_json[$tab['num_nom_vernaculaire']]['langue.code'] = $tab['code_langue'];
346
			$resultat_json[$tab['num_nom_vernaculaire']]['taxon.code'] = 'bdtfx.nt:'.$tab['num_taxon'];
339
			$resultat_json[$tab['num_nom_vernaculaire']]['taxon.code'] = 'bdtfx.nt:'.$tab['num_taxon'];