| Line 148... |
Line 148... |
| 148 |
return $requete_auteur;
|
148 |
return $requete_auteur;
|
| 149 |
}
|
149 |
}
|
| Line 150... |
Line 150... |
| 150 |
|
150 |
|
| 151 |
private function formaterRetourJson($photographies) {
|
151 |
private function formaterRetourJson($photographies) {
|
| - |
|
152 |
$resultat = array();
|
| 152 |
$resultat = array();
|
153 |
if(is_array($photographies)) {
|
| Line 153... |
Line 154... |
| 153 |
foreach ($photographies as $photo) {
|
154 |
foreach ($photographies as $photo) {
|
| 154 |
|
155 |
|
| 155 |
$image = array();
|
156 |
$image = array();
|
| 156 |
$url = $this->getUrlPhotoPourInitiales($photo['Initiales'], $photo['NumPhoto'], $this->format);
|
157 |
$url = $this->getUrlPhotoPourInitiales($photo['Initiales'], $photo['NumPhoto'], $this->format);
|
| 157 |
$urlmax = $this->getUrlPhotoPourInitiales($photo['Initiales'], $photo['NumPhoto'], 'max');
|
158 |
$urlmax = $this->getUrlPhotoPourInitiales($photo['Initiales'], $photo['NumPhoto'], 'max');
|
| 158 |
$id = str_replace(array('.jpg','.jpeg'),'',$photo['NumPhoto']);
|
159 |
$id = str_replace(array('.jpg','.jpeg'),'',$photo['NumPhoto']);
|
| 159 |
// Post-traitement des valeurs
|
160 |
// Post-traitement des valeurs
|
| 160 |
$image['station'] = $this->formaterChaineEncodeeBddPhotoflora($photo['lieu']);
|
161 |
$image['station'] = $this->formaterChaineEncodeeBddPhotoflora($photo['lieu']);
|
| 161 |
$image['date'] = $this->donnerDate($this->formaterChaineEncodeeBddPhotoflora($photo['Date']));
|
162 |
$image['date'] = $this->donnerDate($this->formaterChaineEncodeeBddPhotoflora($photo['Date']));
|
| 162 |
$image['auteur'] = $this->formaterChaineEncodeeBddPhotoflora($photo['Prenom'].' '.$photo['Nom']);
|
163 |
$image['auteur'] = $this->formaterChaineEncodeeBddPhotoflora($photo['Prenom'].' '.$photo['Nom']);
|
| 163 |
$image['determination'] = $photo['Combinaison'].' ['.$photo['Prenom'].' '.$photo['Nom'].']';
|
164 |
$image['determination'] = $photo['Combinaison'].' ['.$photo['Prenom'].' '.$photo['Nom'].']';
|
| 164 |
$image['determination.nom_sci'] = $photo['Combinaison'];
|
165 |
$image['determination.nom_sci'] = $photo['Combinaison'];
|
| 165 |
$image['determination.nom_sci.code'] = "bdtfx.".$photo['NumNomen'];
|
166 |
$image['determination.nom_sci.code'] = "bdtfx.".$photo['NumNomen'];
|
| 166 |
$image['binaire.href'] = $url;
|
167 |
$image['binaire.href'] = $url;
|
| 167 |
$image['binaire.hrefmax'] = $urlmax;
|
168 |
$image['binaire.hrefmax'] = $urlmax;
|
| - |
|
169 |
|
| 168 |
|
170 |
$resultat[$id] = $image;
|
| Line 169... |
Line 171... |
| 169 |
$resultat[$id] = $image;
|
171 |
}
|
| 170 |
}
|
172 |
}
|