Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 998 | Rev 1193 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 998 Rev 1192
Line 95... Line 95...
95
			$criteres[] = "nom_sel_nn IN (".implode(',', array_unique($taxons))	.")";
95
			$criteres[] = "nom_sel_nn IN (".implode(',', array_unique($taxons))	.")";
96
		}
96
		}
97
		return "(".implode(' OR ',array_unique($criteres)).")";
97
		return "(".implode(' OR ',array_unique($criteres)).")";
98
	}
98
	}
Line -... Line 99...
-
 
99
	
-
 
100
	
99
	
101
	
100
	public function recupererStationsMoissonnage($source) {
102
	public function recupererStationsMoissonnage($source) {
101
		$this->bdd->requeter("USE ".Config::get('bdd_nom'));
103
		$this->bdd->requeter("USE ".Config::get('bdd_nom'));
102
		$requete =
104
		$requete =
103
		"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 ".
Line 108... Line 110...
108
		$stations = $this->bdd->recupererTous($requete);
110
		$stations = $this->bdd->recupererTous($requete);
109
		$this->rechercherInfosCommune($stations);
111
		$this->rechercherInfosCommune($stations);
110
		return $stations;
112
		return $stations;
111
	}
113
	}
Line -... Line 114...
-
 
114
	
-
 
115
	public function recupererStationsVigieFlore() {
-
 
116
		$this->bdd->requeter("USE ".Config::get('bdd_nom'));
-
 
117
		$requete =
-
 
118
		"SELECT DISTINCTROW lieu_commune_code_insee AS commune, Floor(lieu_station_longitude*10)/10 as lng, Floor(lieu_station_latitude*10)/10 as lat, observation_date AS date, observateur_nom_complet AS auteur ".
-
 
119
		"FROM vigie_flore_tapir WHERE ".$this->construireWhereTaxonMoissonnage($source)." ".
-
 
120
		"AND lieu_station_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
-
 
121
		"AND lieu_station_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
-
 
122
		" ORDER BY lat DESC, lng ASC, lieu_commune_code_insee, date"." -- " . __FILE__ . ":" . __LINE__." ". @$_SERVER['REQUEST_URI'];
-
 
123
		$stations = $this->bdd->recupererTous($requete);
-
 
124
		return $stations;
-
 
125
	}
112
	
126
	
113
	private function construireWhereTaxonMoissonnage($source) {
127
	private function construireWhereTaxonMoissonnage($source) {
114
		$nomRang = $this->obtenirNomRang();
128
		$nomRang = $this->obtenirNomRang();
115
		$criteres = array();
129
		$criteres = array();
116
		$criteres[] = ($source == "baznat" || $source == "ifn") ? 
130
		$criteres[] = ($source == "baznat" || $source == "ifn") ?