| Line 105... |
Line 105... |
| 105 |
"SELECT DISTINCTROW lieu_commune_code_insee, observation_date AS date, observateur_nom_complet AS auteur ".
|
105 |
"SELECT DISTINCTROW lieu_commune_code_insee, observation_date AS date, observateur_nom_complet AS auteur ".
|
| 106 |
"FROM {$source}_tapir WHERE ".$this->construireWhereTaxonMoissonnage($source)." ".
|
106 |
"FROM {$source}_tapir WHERE ".$this->construireWhereTaxonMoissonnage($source)." ".
|
| 107 |
"AND lieu_station_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
|
107 |
"AND lieu_station_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
|
| 108 |
"AND lieu_station_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
|
108 |
"AND lieu_station_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
|
| 109 |
"AND Length(lieu_commune_code_insee)=5 ORDER BY lieu_commune_code_insee, date"." -- " . __FILE__ . ":" . __LINE__." ". @$_SERVER['REQUEST_URI'];
|
109 |
"AND Length(lieu_commune_code_insee)=5 ORDER BY lieu_commune_code_insee, date"." -- " . __FILE__ . ":" . __LINE__." ". @$_SERVER['REQUEST_URI'];
|
| 110 |
$stations = $this->bdd->recupererTous($requete);
|
110 |
$stations = $this->bdd->recupererTous($requete);
|
| 111 |
$this->rechercherInfosCommune($stations);
|
111 |
$this->rechercherInfosCommune($stations);
|
| 112 |
return $stations;
|
112 |
return $stations;
|
| 113 |
}
|
113 |
}
|
| Line 114... |
Line 114... |
| 114 |
|
114 |
|
| Line 130... |
Line 130... |
| 130 |
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore")) ) ?
|
130 |
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore")) ) ?
|
| 131 |
"num_nom = ".$this->taxon['num_nom'] :
|
131 |
"num_nom = ".$this->taxon['num_nom'] :
|
| 132 |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($this->taxon['nom_sci']) ;
|
132 |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($this->taxon['nom_sci']) ;
|
| 133 |
if ($this->nomRang == 'espece' || $this->nomRang == 'sous_espece') {
|
133 |
if ($this->nomRang == 'espece' || $this->nomRang == 'sous_espece') {
|
| 134 |
foreach ($this->taxons as $sousTaxon) {
|
134 |
foreach ($this->taxons as $sousTaxon) {
|
| - |
|
135 |
if ($source == "sophy") {
|
| - |
|
136 |
if ($sousTaxon['num_nom'] = $sousTaxon['num_nom_retenu']) {
|
| - |
|
137 |
$criteres[] =
|
| - |
|
138 |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($sousTaxon['nom_sci']) ;
|
| - |
|
139 |
}
|
| - |
|
140 |
} else {
|
| 135 |
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore"))) ?
|
141 |
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore"))) ?
|
| 136 |
"num_nom = ".$sousTaxon['num_nom'] :
|
142 |
"num_nom = ".$sousTaxon['num_nom'] :
|
| 137 |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($sousTaxon['nom_sci']) ;
|
143 |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($sousTaxon['nom_sci']) ;
|
| - |
|
144 |
}
|
| 138 |
}
|
145 |
}
|
| 139 |
} elseif ($this->nomRang == 'famille') {
|
146 |
} elseif ($this->nomRang == 'famille') {
|
| 140 |
foreach ($this->genres as $genre) {
|
147 |
foreach ($this->genres as $genre) {
|
| 141 |
$criteres[] = "nom_scientifique_complet LIKE ".$this->bdd->proteger($genre['nom_sci']."%");
|
148 |
$criteres[] = "nom_scientifique_complet LIKE ".$this->bdd->proteger($genre['nom_sci']."%");
|
| 142 |
}
|
149 |
}
|
| 143 |
}
|
150 |
}
|
| 144 |
return "(".implode(' OR ',array_unique($criteres)).")";
|
151 |
return "(".implode(' OR ',array_unique($criteres)).")";
|
| - |
|
152 |
|
| 145 |
}
|
153 |
}
|
| Line 146... |
Line 154... |
| 146 |
|
154 |
|
| 147 |
private function rechercherInfosCommune(& $stations) {
|
155 |
private function rechercherInfosCommune(& $stations) {
|
| 148 |
$codesInsee = array();
|
156 |
$codesInsee = array();
|