Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 509 Rev 624
Line 11... Line 11...
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Images extends Eflore {
15
class Images extends Eflore {
-
 
16
	
-
 
17
	private $nntaxon;
-
 
18
	private $limite;
-
 
19
	private $depart;
Line -... Line 20...
-
 
20
 
-
 
21
	public function setNnTaxon($nntax) {
-
 
22
		$this->nntaxon = $nntax;
-
 
23
	}
-
 
24
	
-
 
25
	public function setLimite($limite) {
-
 
26
		$this->limite = $limite;
-
 
27
	}
-
 
28
	
-
 
29
	public function setDepart($depart) {
-
 
30
		$this->depart = $depart;
-
 
31
	}
16
 
32
	
17
	//TODO: créer des fonctions spécifiques cel et photoflora pour plus de clarté ?
33
	//TODO: créer des fonctions spécifiques cel et photoflora pour plus de clarté ?
18
	public function getUrlsImagesParIdsNoms(Array $idsNoms) {
34
	public function getUrlsImagesParIdsNoms(Array $idsNoms) {
19
		$infosImages = $this->getInfosImagesParIdsNoms($idsNoms);
35
		$infosImages = $this->getInfosImagesParIdsNoms($idsNoms);
20
		$urls = array();
36
		$urls = array();
Line 37... Line 53...
37
	public function getInfosImageParIdImage($id_image) {
53
	public function getInfosImageParIdImage($id_image) {
38
		$tpl = Config::get('imagesPopupTpl');
54
		$tpl = Config::get('imagesPopupTpl');
39
		$url = $this->formaterUrl($tpl, array('id' => $id_image));
55
		$url = $this->formaterUrl($tpl, array('id' => $id_image));
40
		return $this->chargerDonnees($url);
56
		return $this->chargerDonnees($url);
41
	}
57
	}
-
 
58
	
-
 
59
	public function getInfosImages() {
-
 
60
		$url = $this->getUrlImages();
-
 
61
		$donnees = $this->chargerDonnees($url); 
-
 
62
		$images = (empty($donnees['resultats']) == false) ? $donnees['resultats'] : array();
-
 
63
		return $images;
-
 
64
	}
-
 
65
	
-
 
66
	public function getInfosImagesTaxons() {
-
 
67
		$url = $this->getUrlImagesTaxons();
-
 
68
		$donnees = $this->chargerDonnees($url);
-
 
69
		$images = (empty($donnees['resultats']) == false) ? $donnees['resultats'] : array();
-
 
70
		return $images;
-
 
71
	}
-
 
72
 
Line 42... Line 73...
42
 
73
 
43
	private function getUrlImagesParIdsNoms($idsNoms) {
74
	private function getUrlImagesParIdsNoms($idsNoms) {
44
		$tpl = Config::get('imagesResultatsDeterminationTpl');
75
		$tpl = Config::get('imagesResultatsDeterminationTpl');
45
		$params = array('idsNoms' => implode(',', $idsNoms));
76
		$params = array('idsNoms' => implode(',', $idsNoms));
Line 51... Line 82...
51
		$tpl = Config::get('imagesFicheBlocTpl');
82
		$tpl = Config::get('imagesFicheBlocTpl');
52
		$params = array('idsNoms' => implode(',', $idsNoms));
83
		$params = array('idsNoms' => implode(',', $idsNoms));
53
		$url = $this->formaterUrl($tpl, $params);
84
		$url = $this->formaterUrl($tpl, $params);
54
		return $this->chargerDonnees($url);
85
		return $this->chargerDonnees($url);
55
	}
86
	}
-
 
87
	
-
 
88
	private function getUrlImages() {
-
 
89
		$tpl = Config::get('imagesTpl');
-
 
90
		$params = array('projet' => $this->getProjet(), 'limite' => $this->limite, 'depart' => $this->depart);
-
 
91
		$url = $this->formaterUrl($tpl, $params);
-
 
92
		return $url;
-
 
93
	}
-
 
94
	
-
 
95
	private function getUrlImagesTaxons() {
-
 
96
		$tpl = Config::get('imagesTaxonsTpl');
-
 
97
		$params = array('projet' => $this->getProjet(),'nntaxon'=> $this->nntaxon);
-
 
98
		$url = $this->formaterUrl($tpl, $params);
-
 
99
		return $url;
-
 
100
	}
56
}
101
}
57
?>
102
?>
58
103