Line 125... |
Line 125... |
125 |
//on initialise la condition de la requete sql et le format de réponse
|
125 |
//on initialise la condition de la requete sql et le format de réponse
|
126 |
$this->requete_condition = array(); //on vide la table dans le cas de plusieurs version
|
126 |
$this->requete_condition = array(); //on vide la table dans le cas de plusieurs version
|
127 |
$this->requete_condition[] = 'num_nom = '.$this->getBdd()->proteger($this->ressources[0]);
|
127 |
$this->requete_condition[] = 'num_nom = '.$this->getBdd()->proteger($this->ressources[0]);
|
128 |
$this->format_reponse = $this->service.'/id';
|
128 |
$this->format_reponse = $this->service.'/id';
|
129 |
if (isset($this->ressources[1]) && !empty($this->ressources[1])) {
|
129 |
if (isset($this->ressources[1]) && !empty($this->ressources[1])) {
|
130 |
// requete de type noms/#id/#champ+#champ
|
- |
|
131 |
if (($this->ressources[1] != 'relations')) {
|
130 |
if ($this->ressources[1] == 'relations') {
|
132 |
$this->requete_champ = ' *, nom_sci ';
|
- |
|
133 |
$this->format_reponse .= '/champ';
|
- |
|
134 |
// requete de type noms/#id/relations/#relations
|
- |
|
135 |
} elseif ($this->ressources[1] == 'relations') {
|
- |
|
136 |
$this->traiterRessourceIdRelations();
|
131 |
$this->traiterRessourceIdRelations();
|
137 |
} else {
|
132 |
} else {
|
138 |
$e = 'Erreur dans votre requête </br> Ressources disponibles : <br/>
|
133 |
$e = 'Erreur dans votre requête </br> Ressources disponibles : <br/>
|
139 |
<li> noms/#id/relations </li> <li> noms/#id/#champ+#champ </li>
|
134 |
<li> noms/#id/relations </li> <li> noms/#id/#champ+#champ </li>
|
140 |
<li> noms/#id/relations/synonymie </li> <li> noms/#id/relations/flores </li>
|
135 |
<li> noms/#id/relations/synonymie </li> <li> noms/#id/relations/flores </li>
|
Line 304... |
Line 299... |
304 |
$reponse = $this->formaterRelations($resultat[0]);
|
299 |
$reponse = $this->formaterRelations($resultat[0]);
|
305 |
break;
|
300 |
break;
|
306 |
case 'noms/id' : //ds CommunNomsTaxons
|
301 |
case 'noms/id' : //ds CommunNomsTaxons
|
307 |
$reponse = $this->formaterId($resultat[0]);
|
302 |
$reponse = $this->formaterId($resultat[0]);
|
308 |
break;
|
303 |
break;
|
309 |
case 'noms/id/champ' : //ds CommunNomsTaxons
|
- |
|
310 |
$reponse = $this->formaterIdChamp($resultat[0]);
|
- |
|
311 |
break;
|
- |
|
312 |
case 'noms/id/relations' :
|
304 |
case 'noms/id/relations' :
|
313 |
$reponse = $this->formaterIdRelations($resultat[0]);
|
305 |
$reponse = $this->formaterIdRelations($resultat[0]);
|
314 |
break;
|
306 |
break;
|
315 |
case 'noms/id/relations/synonymie' :
|
307 |
case 'noms/id/relations/synonymie' :
|
316 |
$reponse = $this->formaterIdSynonymie($resultat);
|
308 |
$reponse = $this->formaterIdSynonymie($resultat);
|