Line 61... |
Line 61... |
61 |
*/
|
61 |
*/
|
62 |
if ($this->info['nt'] == 0) {
|
62 |
if ($this->info['nt'] == 0) {
|
63 |
$inventoriesCel = array();
|
63 |
$inventoriesCel = array();
|
64 |
} else {
|
64 |
} else {
|
65 |
$queryCel = "SELECT 'cel' as collection_code, zone_geo as location, REPLACE(ce_zone_geo,'INSEE-C:','') as id_location, date_observation, ".
|
65 |
$queryCel = "SELECT 'cel' as collection_code, zone_geo as location, REPLACE(ce_zone_geo,'INSEE-C:','') as id_location, date_observation, ".
|
66 |
" longitude as y_utm, latitude as x_utm, geodatum as sector, courriel_utilisateur as identifiant FROM tb_cel.cel_obs ".
|
66 |
" longitude as y_utm, latitude as x_utm, geodatum as sector, courriel_utilisateur as identifiant FROM tb_new_cel.cel_obs ".
|
67 |
"WHERE nt = '".$this->info['nt']."' ".
|
67 |
"WHERE nt = '".$this->info['nt']."' ".
|
68 |
" AND transmission = 1";
|
68 |
" AND transmission = 1";
|
69 |
$inventoriesCel = $this->getBdd()->recupererTous($queryCel);
|
69 |
$inventoriesCel = $this->getBdd()->recupererTous($queryCel);
|
70 |
}
|
70 |
}
|
Line 189... |
Line 189... |
189 |
if ($inventory['id_location'] != 'null') {
|
189 |
if ($inventory['id_location'] != 'null') {
|
190 |
if (isset($tab_code_insee[$id_location_protege])) {
|
190 |
if (isset($tab_code_insee[$id_location_protege])) {
|
191 |
$utm = array(0 => $tab_code_insee[$id_location_protege]);
|
191 |
$utm = array(0 => $tab_code_insee[$id_location_protege]);
|
192 |
} else {
|
192 |
} else {
|
193 |
$requete = "SELECT nom as name, code as insee_code, utm_x as x_utm, utm_y as y_utm, utm_secteur as sector ".
|
193 |
$requete = "SELECT nom as name, code as insee_code, utm_x as x_utm, utm_y as y_utm, utm_secteur as sector ".
|
194 |
"FROM tb_cel.cel_zones_geo ".
|
194 |
"FROM tb_new_cel.cel_zones_geo ".
|
195 |
"WHERE nom LIKE $location_protege ".
|
195 |
"WHERE nom LIKE $location_protege ".
|
196 |
" AND code = $id_location_protege ";
|
196 |
" AND code = $id_location_protege ";
|
197 |
$resultat = $this->getBdd()->recupererTous($requete);
|
197 |
$resultat = $this->getBdd()->recupererTous($requete);
|
198 |
if ($resultat != false) {
|
198 |
if ($resultat != false) {
|
199 |
$utm = $resultat;
|
199 |
$utm = $resultat;
|
200 |
}
|
200 |
}
|
201 |
}
|
201 |
}
|
202 |
} else {
|
202 |
} else {
|
203 |
$requete = "SELECT nom as name, code as insee_code, utm_x as x_utm, utm_y as y_utm, utm_secteur as sector".
|
203 |
$requete = "SELECT nom as name, code as insee_code, utm_x as x_utm, utm_y as y_utm, utm_secteur as sector".
|
204 |
" FROM tb_cel.cel_zones_geo WHERE nom LIKE $location_protege ";
|
204 |
" FROM tb_new_cel.cel_zones_geo WHERE nom LIKE $location_protege ";
|
205 |
$utm = $this->getBdd()->recupererTous($requete);
|
205 |
$utm = $this->getBdd()->recupererTous($requete);
|
206 |
}
|
206 |
}
|
207 |
}
|
207 |
}
|
208 |
return $utm;
|
208 |
return $utm;
|
209 |
}
|
209 |
}
|