76,6 → 76,8 |
$this->num_taxon = (isset($num_taxon) ? $num_taxon : '*'); |
$this->station = (isset($station) ? $station : null); |
$this->format = (isset($format) ? $format : null); |
$this->start = (isset($start) ? $start : null); |
$this->limit = (isset($limit) ? $limit : null); |
} |
|
/** |
123,9 → 125,9 |
$url .= "/$action"; |
|
$parametres_retenus = array(); |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'dept', 'commune', 'num_taxon'); |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'dept', 'commune', 'num_taxon', 'start', 'limit'); |
foreach ($parametres_a_tester as $param) { |
if ($this->$param != null && $this->$param != '*') { |
if (isset($this->$param) && $this->$param != '*') { |
$parametres_retenus[$param] = $this->$param; |
} |
} |
137,8 → 139,6 |
$url .= '?'.implode('&', $parametres_url); |
} |
} |
$this->debug[] = $url; |
// Prendre en compte param "station" |
return $url; |
} |
|
202,7 → 202,7 |
/** |
* Tableau des observations d'une station |
*/ |
public function executerObservations() { |
public function executerStation() { |
$widget = null; |
$observations = $this->chargerObservations(); |
$nbre_obs = $this->chargerObservationsNbre(); |
232,6 → 232,37 |
return $widget; |
} |
|
|
/** |
* Tableau des observations d'une station |
*/ |
public function executerObservations() { |
$widget = null; |
$observations = $this->chargerObservations(); |
$nbre_obs = $this->chargerObservationsNbre(); |
|
// Création des infos du widget |
if (isset($observations['commune'])) { |
$commune = $observations['commune']; |
unset($observations['commune']); |
$widget['donnees']['commune'] = $commune; |
} |
|
$obs_ids = null; |
if (isset($observations['ids'])) { |
$obs_ids = $observations['ids']; |
unset($observations['ids']); |
} |
$widget['squelette'] = $this->choisirFormatSortie(count($observations)).'_contenu'; |
|
if ($widget['squelette'] == 'obs_liste_contenu' && $obs_ids != null && count($obs_ids) > 0) { |
$widget['donnees']['images'] = $this->chargerImages($obs_ids); |
} |
$widget['donnees']['observations'] = $observations; |
|
return $widget; |
} |
|
private function chargerPagination($url_tpl, $nbre) { |
|
} |
247,6 → 278,7 |
private function chargerObservations() { |
// Récupération des données au format Json |
$url = $this->contruireUrlServiceCarto('observations'); |
$this->debug[] = $url; |
$json = $this->getDao()->consulter($url); |
$donnees = json_decode($json); |
|
301,7 → 333,7 |
// Récupération des données au format Json |
$service = 'CelImage/liste-ids?obsId='.implode(',', $obs_ids); |
$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], $service); |
$this->debug[] = $url; |
|
$json = $this->getDao()->consulter($url); |
$donnees = json_decode($json); |
|