Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 860 Rev 878
Line 7... Line 7...
7
	private $taxon = array();
7
	private $taxon = array();
Line 8... Line 8...
8
	
8
	
9
	private $nomRang = '';
9
	private $nomRang = '';
10
	private $taxons = array();
10
	private $taxons = array();
-
 
11
	private $genres = array();
Line 11... Line 12...
11
	private $genres = array();
12
	private $utilisateurs = null;
12
	
13
	
13
	
14
	
Line 22... Line 23...
22
		if ($this->nomRang == 'espece' || $this->nomRang == 'sous_espece') {
23
		if ($this->nomRang == 'espece' || $this->nomRang == 'sous_espece') {
23
			$this->taxons = $this->recupererSynonymesEtSousEspeces();
24
			$this->taxons = $this->recupererSynonymesEtSousEspeces();
24
		} elseif ($this->nomRang == 'famille') {
25
		} elseif ($this->nomRang == 'famille') {
25
			$this->genres = $this->recupererGenres();
26
			$this->genres = $this->recupererGenres();
26
		}
27
		}
-
 
28
		$this->utilisateurs = new Utilisateurs();
27
	}
29
	}
Line 28... Line 30...
28
	
30
	
29
	private function obtenirNomRang() {
31
	private function obtenirNomRang() {
30
		$nomsRangs = array('famille', 'genre', 'espece', 'sous_espece');
32
		$nomsRangs = array('famille', 'genre', 'espece', 'sous_espece');
Line 56... Line 58...
56
		"FROM cel_obs LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ".
58
		"FROM cel_obs LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ".
57
		"WHERE ".$this->construireWhereTaxonFloradata()." AND transmission=1 AND ".
59
		"WHERE ".$this->construireWhereTaxonFloradata()." AND transmission=1 AND ".
58
		"wgs84_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
60
		"wgs84_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
59
		"AND wgs84_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
61
		"AND wgs84_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
60
		"AND date_observation<>'0000-00-00 00-00-00' ORDER BY lat DESC, lng ASC, commune, date";
62
		"AND date_observation<>'0000-00-00 00-00-00' ORDER BY lat DESC, lng ASC, commune, date";
61
		return $this->bdd->recupererTous($requete);
63
		$stations = $this->bdd->recupererTous($requete);
-
 
64
		
-
 
65
		$this->extraireIdentitesAuteurs($stations);
-
 
66
		foreach($stations as &$station) {
-
 
67
			$station['auteur'] = $this->utilisateurs->getIntitule($station['auteur']);
-
 
68
		}	
-
 
69
		return $stations;
-
 
70
	}
-
 
71
	
-
 
72
	private function extraireIdentitesAuteurs($stations) {
-
 
73
		$courriels = array();
-
 
74
		foreach ($stations as &$station) {
-
 
75
			$courriels[] = $station['auteur'];
-
 
76
		}
-
 
77
		$this->utilisateurs->setCourriels($courriels);
-
 
78
		$this->utilisateurs->chargerIdentites();
62
	}
79
	}
Line 63... Line 80...
63
	
80
	
64
	private function construireWhereTaxonFloradata() {
81
	private function construireWhereTaxonFloradata() {
65
		$criteres = array();
82
		$criteres = array();