Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 579 Rev 580
Line 5... Line 5...
5
*( BDTFX, BDAFX, BDBFX ) et d'un numéro nomenclatural ( différent de 0 ).
5
*( BDTFX, BDAFX, BDBFX ) et d'un numéro nomenclatural ( différent de 0 ).
6
*  fin d'url possibles :
6
*  fin d'url possibles :
7
*  /informations/#bdnt.nn:#num_nomen --> retourne tous les champs pour un BDNT et un num_nomen
7
*  /informations/#bdnt.nn:#num_nomen --> retourne tous les champs pour un BDNT et un num_nomen
8
*  /informations/#bdnt.nn:#num_nomen?champs=description --> retourne champs description pour un BDNT et un num_nomen
8
*  /informations/#bdnt.nn:#num_nomen?champs=description --> retourne champs description pour un BDNT et un num_nomen
9
*  /informations/#bdnt.nn:#num_nomen?champs=ecologie --> retourne champs ecologiques pour un BDNT et un num_nomen
9
*  /informations/#bdnt.nn:#num_nomen?champs=ecologie --> retourne champs ecologiques pour un BDNT et un num_nomen
10
*  
-
 
-
 
10
*   /informations/#bdnt.nn:#num_nomen/relations/catminat --> donne les num nomen et les bdnt pour tous 
-
 
11
*   les taxons qui ont le même code catminat ( code milieu ) que celui entré 
11
*
12
*
12
* Encodage en entrée : utf8
13
* Encodage en entrée : utf8
13
* Encodage en sortie : utf8
14
* Encodage en sortie : utf8
14
* @package eflore-projets
15
* @package eflore-projets
15
* @author Mathilde SALTHUN-LASSALLE <mathilde@tela-botanica.org>
16
* @author Mathilde SALTHUN-LASSALLE <mathilde@tela-botanica.org>
Line 164... Line 165...
164
		if ($this->ressources[1] == 'relations'){
165
		if ($this->ressources[1] == 'relations'){
165
			switch ($this->ressources[2]) {
166
			switch ($this->ressources[2]) {
166
				case 'catminat' :
167
				case 'catminat' :
167
					$this->requete_condition[] = "catminat_code = ( SELECT catminat_code from ".$this->table_version[0]." WHERE "
168
					$this->requete_condition[] = "catminat_code = ( SELECT catminat_code from ".$this->table_version[0]." WHERE "
168
					." num_nomen = ".$id." AND BDNT = '".$ref. "' ) ";
169
					." num_nomen = ".$id." AND BDNT = '".$ref. "' ) ";
169
					$this->champs_recherches = " catminat_code, num_nomen, BDNT ";
170
					$this->champs_recherches = " catminat_code, num_nomen, BDNT, idiotaxon ";
170
					break;
171
					break;
171
				default :
172
				default :
172
					$e = 'Erreur dans l\'url de votre requête : </br> Le type de relation " '
173
					$e = 'Erreur dans l\'url de votre requête : </br> Le type de relation " '
173
				.$this->ressources[2].' " n\'existe pas.';
174
				.$this->ressources[2].' " n\'existe pas.';
174
				throw new Exception($e, RestServeur::HTTP_CODE_MAUVAISE_REQUETE);
175
				throw new Exception($e, RestServeur::HTTP_CODE_MAUVAISE_REQUETE);