16,11 → 16,11 |
* Tous les services web n'ont pas besoin de s'y connecter. |
*/ |
protected function getBdd() { |
if (! isset($this->Bdd)) { |
$this->Bdd = new Bdd(); |
if (! isset($this->Bdd)) { |
$this->Bdd = new Bdd(); |
} |
return $this->Bdd; |
} |
return $this->Bdd; |
} |
|
public function definirCouleurs() { |
// green |
63,9 → 63,9 |
$inventoriesCel = array(); |
} else { |
$queryCel = "SELECT 'cel' as collection_code, zone_geo as location, REPLACE(ce_zone_geo,'INSEE-C:','') as id_location, date_observation, ". |
" longitude as y_utm, latitude as x_utm, geodatum as sector, courriel_utilisateur as identifiant FROM tb_cel.cel_obs ". |
"WHERE nt = '".$this->info['nt']."' ". |
" AND transmission = 1"; |
" longitude as y_utm, latitude as x_utm, geodatum as sector, courriel_utilisateur as identifiant FROM tb_cel.cel_obs ". |
"WHERE nt = '".$this->info['nt']."' ". |
" AND transmission = 1"; |
$inventoriesCel = $this->getBdd()->recupererTous($queryCel); |
} |
|
75,12 → 75,12 |
$inventoriesCenlr = array(); |
} else { |
$queryCenlr = "SELECT collection_code, locality as location, county as id_location, ". |
" STR_TO_DATE(concat(year, '/',month, '/',day), '%Y/%m/%d') as date_observation, latitude as y_utm , ". |
" longitude as x_utm , max_altitude as sector, collector_name as identifiant ". |
"FROM tb_hit_indexation.raw_occurrence_record ". |
"WHERE scientific_name = ".$this->getBdd()->proteger($this->info['nom']). |
" AND collection_code = 'flore' ". |
" AND (deleted IS NULL OR deleted = '0000-00-00 00:00:00')"; |
" STR_TO_DATE(concat(year, '/',month, '/',day), '%Y/%m/%d') as date_observation, latitude as y_utm , ". |
" longitude as x_utm , max_altitude as sector, collector_name as identifiant ". |
"FROM tb_hit_indexation.raw_occurrence_record ". |
"WHERE scientific_name = ".$this->getBdd()->proteger($this->info['nom']). |
" AND collection_code = 'flore' ". |
" AND (deleted IS NULL OR deleted = '0000-00-00 00:00:00')"; |
$inventoriesCenlr = $this->getBdd()->recupererTous($queryCenlr); |
} |
|
99,10 → 99,10 |
$inventoriesSophy = array(); |
} else { |
$querySophy = "SELECT 'sophy' as collection_code, lieu_station_nom as location, lieu_commune_code_insee as id_location, ". |
" observation_date as date_observation, lieu_station_utm_est as x_utm , ". |
" lieu_station_utm_nord as y_utm , lieu_station_utm_zone as sector, observateur_nom_complet as identifiant ". |
"FROM sophy_tapir ". |
"WHERE nom_scientifique_complet = ".$this->getBdd()->proteger($this->info['nom_ss_auteur']); |
" observation_date as date_observation, lieu_station_utm_est as x_utm , ". |
" lieu_station_utm_nord as y_utm , lieu_station_utm_zone as sector, observateur_nom_complet as identifiant ". |
"FROM sophy_tapir ". |
"WHERE nom_scientifique_complet = ".$this->getBdd()->proteger($this->info['nom_ss_auteur']); |
$inventoriesSophy = $this->getBdd()->recupererTous($querySophy); |
} |
|