| Line 119... |
Line 119... |
| 119 |
' LEFT JOIN cel_zones_geo AS zg '.
|
119 |
' LEFT JOIN cel_zones_geo AS zg '.
|
| 120 |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
|
120 |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
|
| 121 |
"WHERE transmission = '1' ".
|
121 |
"WHERE transmission = '1' ".
|
| 122 |
$this->standard.
|
122 |
$this->standard.
|
| 123 |
" AND (".
|
123 |
" AND (".
|
| 124 |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()).
|
- |
|
| 125 |
$this->construireWhereRectangleStationOR()." OR ".
|
124 |
$this->construireWhereRectangleStationOR()." OR ".
|
| 126 |
$this->construireWhereRectangleCommuneOR().") ".
|
125 |
$this->construireWhereRectangleCommuneOR().") ".
|
| 127 |
$this->construireWhereDept().
|
126 |
$this->construireWhereDept().
|
| 128 |
$this->construireWhereCommune().
|
127 |
$this->construireWhereCommune().
|
| 129 |
$this->construireWherePays().
|
128 |
$this->construireWherePays().
|
| 130 |
$this->construireWhereUtilisateur().
|
129 |
$this->construireWhereUtilisateur().
|
| Line 137... |
Line 136... |
| 137 |
$this->construireWhereProjet().
|
136 |
$this->construireWhereProjet().
|
| 138 |
$this->construireWhereTag().
|
137 |
$this->construireWhereTag().
|
| 139 |
$this->construireWhereNombreDeJours().
|
138 |
$this->construireWhereNombreDeJours().
|
| 140 |
$this->construireWhereAnnee().
|
139 |
$this->construireWhereAnnee().
|
| 141 |
$this->construireWhereGroupeZoneGeo().
|
140 |
$this->construireWhereGroupeZoneGeo().
|
| - |
|
141 |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()).
|
| 142 |
' GROUP BY id_coord';
|
142 |
' GROUP BY id_coord';
|
| Line 143... |
Line 143... |
| 143 |
|
143 |
|
| 144 |
$resultats_emplacements = Cel::db()->requeter($requete);
|
144 |
$resultats_emplacements = Cel::db()->requeter($requete);
|
| 145 |
$emplacements = $this->traiterEmplacements($resultats_emplacements, $this->compterObservations($params));
|
145 |
$emplacements = $this->traiterEmplacements($resultats_emplacements, $this->compterObservations($params));
|
| Line 161... |
Line 161... |
| 161 |
' LEFT JOIN cel_zones_geo AS zg '.
|
161 |
' LEFT JOIN cel_zones_geo AS zg '.
|
| 162 |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
|
162 |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
|
| 163 |
"WHERE transmission = '1' ".
|
163 |
"WHERE transmission = '1' ".
|
| 164 |
$this->standard.
|
164 |
$this->standard.
|
| 165 |
" AND (".
|
165 |
" AND (".
|
| 166 |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()).
|
- |
|
| 167 |
$this->construireWhereRectangleStationOR()." OR ".
|
166 |
$this->construireWhereRectangleStationOR()." OR ".
|
| 168 |
$this->construireWhereRectangleCommuneOR().") ".
|
167 |
$this->construireWhereRectangleCommuneOR().") ".
|
| 169 |
$this->construireWhereDept().
|
168 |
$this->construireWhereDept().
|
| 170 |
$this->construireWhereCommune().
|
169 |
$this->construireWhereCommune().
|
| 171 |
$this->construireWherePays().
|
170 |
$this->construireWherePays().
|
| 172 |
$this->construireWhereUtilisateur().
|
171 |
$this->construireWhereUtilisateur().
|
| Line 178... |
Line 177... |
| 178 |
$this->construireWherePhotosSeulement().
|
177 |
$this->construireWherePhotosSeulement().
|
| 179 |
$this->construireWhereProjet().
|
178 |
$this->construireWhereProjet().
|
| 180 |
$this->construireWhereTag().
|
179 |
$this->construireWhereTag().
|
| 181 |
$this->construireWhereNombreDeJours().
|
180 |
$this->construireWhereNombreDeJours().
|
| 182 |
$this->construireWhereAnnee().
|
181 |
$this->construireWhereAnnee().
|
| 183 |
$this->construireWhereGroupeZoneGeo();
|
182 |
$this->construireWhereGroupeZoneGeo()
|
| - |
|
183 |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles());
|
| Line 184... |
Line 184... |
| 184 |
|
184 |
|
| 185 |
$resultats_nb_obs = Cel::db()->requeter($requete);
|
185 |
$resultats_nb_obs = Cel::db()->requeter($requete);
|
| 186 |
return $resultats_nb_obs[0]['nb'];
|
186 |
return $resultats_nb_obs[0]['nb'];
|
| Line 970... |
Line 970... |
| 970 |
"(".
|
970 |
"(".
|
| 971 |
"(".
|
971 |
"(".
|
| 972 |
"(latitude = '000null' OR latitude = '' OR latitude = 0 OR latitude IS NULL) AND ".
|
972 |
"(latitude = '000null' OR latitude = '' OR latitude = 0 OR latitude IS NULL) AND ".
|
| 973 |
"(longitude = '000null' OR longitude = '' OR longitude = 0 OR longitude IS NULL) ".
|
973 |
"(longitude = '000null' OR longitude = '' OR longitude = 0 OR longitude IS NULL) ".
|
| 974 |
')'.
|
974 |
')'.
|
| 975 |
' OR mots_cles_texte LIKE "%sensible%"'.
|
975 |
' OR localite_floutage IN ("localité", "10x10km")'.
|
| 976 |
') ';
|
976 |
') ';
|
| 977 |
return $sql;
|
977 |
return $sql;
|
| 978 |
}
|
978 |
}
|