Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 482 Rev 497
Line 52... Line 52...
52
 
52
 
53
	public function getPhotoFlora() {
53
	public function getPhotoFlora() {
54
		$photoflora = array();
54
		$photoflora = array();
55
		$this->images->setProjet('photoflora');
55
		$this->images->setProjet('photoflora');
56
		$nnr = $this->nomCourant->getNnr();
56
		$nnr = $this->nomCourant->getNnr();
57
		$images = $this->images->getInfosImagesParIdsNoms(array($nnr));
-
 
Line 58... Line 57...
58
		$photoflora['images'] = $images['resultats'];
57
		$photoflora['images'] = $this->images->getInfosImagesParIdsNoms(array($nnr));
59
 
58
 
60
		$this->meta->setProjet('photoflora');
59
		$this->meta->setProjet('photoflora');
61
		$meta = $this->meta->getMetaDonnees();
60
		$meta = $this->meta->getMetaDonnees();
Line 69... Line 68...
69
	public function getCel() {
68
	public function getCel() {
70
		$cel = array();
69
		$cel = array();
71
		$this->images->setProjet('cel');
70
		$this->images->setProjet('cel');
72
		$nnr = $this->nomCourant->getNnr();
71
		$nnr = $this->nomCourant->getNnr();
73
		$images = $this->images->getInfosImagesParIdsNoms(array($nnr));
72
		$images = $this->images->getInfosImagesParIdsNoms(array($nnr));
-
 
73
 
74
		foreach ($images['resultats'] as $idImg => $img) {
74
		foreach ($images as $idImg => $img) {
75
			$cel['images'][$idImg] = $img;
75
			$infosImg = array();
-
 
76
			$infosImg['src'] = $img['binaire.href'];
-
 
77
			$infosImg['nomSci'] = $img['determination.nom_sci'];
-
 
78
			$infosImg['commune'] = $img['station.commune'];
-
 
79
			$infosImg['date'] = $this->formaterDateImg($img['date']);
-
 
80
			$infosImg['auteur'] = $img['auteur.libelle'];
-
 
81
 
76
			$cel['images'][$idImg]['url.pop-up.img'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
82
			$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
77
			$cel['images'][$idImg]['url.pop-up.contact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id']);
83
			$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg);
-
 
84
			$cel['images'][$idImg] = $infosImg;
78
		}
85
		}
Line 79... Line 86...
79
 
86
 
80
		$this->meta->setProjet('cel');
87
		$this->meta->setProjet('cel');
81
		$meta = $this->meta->getMetaDonnees();
88
		$meta = $this->meta->getMetaDonnees();
82
		$titreMeta = $meta[0]['titre'];
89
		$titreMeta = $meta[0]['titre'];
83
		$cel['meta']['titre'] = $titreMeta;
90
		$cel['meta']['titre'] = $titreMeta;
Line 84... Line 91...
84
		$cel['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('cel');
91
		$cel['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('cel');
85
 
92
 
-
 
93
		return $cel;
-
 
94
	}
-
 
95
 
-
 
96
	private function formaterDateImg($date) {
-
 
97
		$dateFmt = $date;
-
 
98
		if ($date == '0000-00-00') {
-
 
99
			$dateFmt = 'inconnue';
-
 
100
		} else {
-
 
101
			$dateFmt = date('d/m/Y', strtotime($date));
-
 
102
		}
-
 
103
		return $dateFmt;
-
 
104
	}
-
 
105
 
-
 
106
	private function formaterNomSci($nom) {
-
 
107
		$nomFmt = $nom;
-
 
108
		if (is_null($nom) || $nom == '') {
-
 
109
			$nomFmt = 'inconnu';
-
 
110
		}
86
		return $cel;
111
		return $nomFmt;
87
	}
112
	}
88
}
113
}