312,6 → 312,8 |
return $ok; |
} |
|
|
/* à changer pour localisation_floutage */ |
private function etreObsSensible($tags) { |
$sensible = true; |
if (stristr($tags, 'sensible') === FALSE) { |
748,19 → 750,14 |
*/ |
private function obtenirObsLieesImg($type, $param) { |
// Construction de la requête |
$requete = 'SELECT DISTINCT co.id_obs, ci.ce_utilisateur AS utilisateur '. |
'FROM cel_images AS ci '. |
' LEFT JOIN cel_obs AS co '. |
' ON (ci.ce_observation = co.id_observation) '. |
$requete = 'SELECT DISTINCT co.id_obs, co.ce_utilisateur AS utilisateur '. |
'FROM cel_export_total AS co '. |
' LEFT JOIN cel_zones_geo AS zg '. |
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '. |
"WHERE co.transmission = '1' ". |
($type == 'date.photo' ? " AND (ci.date_prise_de_vue LIKE ".str_replace('-', ':', $param).' ' : ''). |
($type == 'date.creation' ? " AND ci.date_creation LIKE $param " : ''). |
($type == 'date.liaison' ? " AND ci.date_liaison LIKE $param " : ''). |
($type == 'commentaire.img' ? " AND ci.commentaire LIKE $param " : ''). |
"WHERE co.transmission = '1' and co.images != null". |
($type == 'date.creation' ? " AND co.date_creation LIKE $param " : ''). |
($type == 'commentaire.obs' ? " AND co.commentaire LIKE $param " : ''). |
($type == 'commentaire.*' ? " AND (co.commentaire LIKE $param OR ci.commentaire LIKE $param) " : ''). |
($type == 'commentaire.*' ? " AND co.commentaire LIKE $param " : ''). |
$this->construireWhereCoordonnees(). |
$this->construireWhereDept(). |
$this->construireWhereCommune(). |
1000,7 → 997,7 |
extract($this->parametres); |
if (isset($this->parametres['num_taxon']) && !$this->etreNull($num_taxon)) { |
$num_taxon = Cel::db()->proteger($num_taxon); |
$sql = " AND nt = $num_taxon "; |
$sql = " AND nom_ret_nn = $num_taxon "; |
} |
return $sql; |
} |
1014,13 → 1011,12 |
$num_taxon = Cel::db()->proteger($num_taxon); |
if(!empty($sous_taxons)) { |
$sql_in_sous_tax = implode(',', $sous_taxons); |
$sql = " AND (nt = $num_taxon OR ". |
"nom_sel_nn IN (".$sql_in_sous_tax.") OR ". |
$sql = " AND (nom_sel_nn IN (".$sql_in_sous_tax.") OR ". |
"nom_ret_nn IN (".$sql_in_sous_tax.") ". |
") "; |
} |
else { |
$sql = " AND nt = $num_taxon "; |
$sql = " AND nom_ret_nn = $num_taxon "; |
} |
} |
return $sql; |
1141,7 → 1137,7 |
$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 cel_images ci'. |
'FROM photo ci'. |
' INNER JOIN cel_obs AS co '. |
' ON (ci.ce_observation = co.id_observation) '. |
' LEFT JOIN cel_zones_geo AS zg '. |