103,7 → 103,7 |
return array('type' => 'png', 'img' => $img); |
} |
|
public function getTout($params) { |
public function getTout($params) { |
|
$emplacements = null; |
$concatenation_id = "CONCAT(IFNULL(latitude,''),IFNULL(longitude,''), IFNULL(wgs84_latitude,''),IFNULL(wgs84_longitude,'')) "; |
120,7 → 120,8 |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '. |
"WHERE transmission = '1' ". |
$this->standard. |
" AND (". |
" AND (". |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
$this->construireWhereRectangleStationOR()." OR ". |
$this->construireWhereRectangleCommuneOR().") ". |
$this->construireWhereDept(). |
161,7 → 162,8 |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '. |
"WHERE transmission = '1' ". |
$this->standard. |
" AND (". |
" AND (". |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
$this->construireWhereRectangleStationOR()." OR ". |
$this->construireWhereRectangleCommuneOR().") ". |
$this->construireWhereDept(). |
979,7 → 981,7 |
private function construireWherePhotosSeulement() { |
$sql = ''; |
if (isset($this->parametres['photos']) && $this->parametres['photos'] == 1) { |
$sql = 'AND co.id_observation IN (SELECT DISTINCT ce_observation FROM cel_images) '; |
$sql = 'AND co.id_observation IN (SELECT DISTINCT ce_observation FROM cel_images_export) '; |
} |
return $sql; |
} |
1146,9 → 1148,9 |
if (isset($tag) && !$this->etreNull($tag)) { |
$tag_sql = $this->getSqlWhereMotsCles($tag); |
// Construction de la requĂȘte |
$requete = 'SELECT DISTINCT co.id_observation AS id_obs, ci.ce_utilisateur AS utilisateur '. |
'FROM photo ci'. |
' INNER JOIN cel_obs AS co '. |
$requete = 'SELECT DISTINCT co.id_observation AS id_obs, co.ce_utilisateur AS utilisateur '. |
'FROM cel_images_export ci'. |
' INNER JOIN cel_export_total AS co '. |
' ON (ci.ce_observation = co.id_observation) '. |
' LEFT JOIN cel_zones_geo AS zg '. |
" ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) ". |