Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 497 Rev 515
Line 28... Line 28...
28
		$this->meta = $this->conteneur->getApiMetaDonnees();
28
		$this->meta = $this->conteneur->getApiMetaDonnees();
29
	}
29
	}
Line 30... Line 30...
30
 
30
 
31
	public function obtenirDonnees() {
31
	public function obtenirDonnees() {
-
 
32
		$donnees = array();
-
 
33
		$donnees['nt'] = $this->nomCourant->getNt();
32
		$donnees = array();
34
		$donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
33
		$donnees['cel'] = $this->getCel();
35
		$donnees['cel'] = $this->getCel();
34
		$donnees['photoflora'] = $this->getPhotoFlora();
36
		$donnees['photoflora'] = $this->getPhotoFlora();
35
		return $donnees;
37
		return $donnees;
Line 52... Line 54...
52
 
54
 
53
	public function getPhotoFlora() {
55
	public function getPhotoFlora() {
54
		$photoflora = array();
56
		$photoflora = array();
55
		$this->images->setProjet('photoflora');
57
		$this->images->setProjet('photoflora');
56
		$nnr = $this->nomCourant->getNnr();
58
		$nnr = $this->nomCourant->getNnr();
-
 
59
		$images = $this->images->getInfosImagesParIdsNoms(array($nnr));
-
 
60
		foreach ($images as $idImg => $img) {
-
 
61
			$infosImg = array();
-
 
62
			$infosImg['src'] = $img['binaire.href'];
-
 
63
			$infosImg['nomSci'] = $img['determination.nom_sci'];
-
 
64
			$infosImg['station'] = $img['station'];
-
 
65
			$infosImg['date'] = $this->formaterDateImg($img['date']);
-
 
66
			$infosImg['auteur'] = $img['auteur'];
-
 
67
 
-
 
68
			//$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
-
 
69
			//$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg);
-
 
70
			$photoflora['images'][$idImg] = $infosImg;
Line 57... Line 71...
57
		$photoflora['images'] = $this->images->getInfosImagesParIdsNoms(array($nnr));
71
		}
58
 
72
 
59
		$this->meta->setProjet('photoflora');
73
		$this->meta->setProjet('photoflora');
60
		$meta = $this->meta->getMetaDonnees();
74
		$meta = $this->meta->getMetaDonnees();
Line 93... Line 107...
93
		return $cel;
107
		return $cel;
94
	}
108
	}
Line 95... Line 109...
95
 
109
 
96
	private function formaterDateImg($date) {
110
	private function formaterDateImg($date) {
97
		$dateFmt = $date;
111
		$dateFmt = $date;
98
		if ($date == '0000-00-00') {
112
		if ($date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
99
			$dateFmt = 'inconnue';
113
			$dateFmt = 'inconnue';
100
		} else {
114
		} else {
101
			$dateFmt = date('d/m/Y', strtotime($date));
115
			$dateFmt = strftime('%e %B %Y', strtotime($date));
102
		}
116
		}
103
		return $dateFmt;
117
		return $dateFmt;
Line 104... Line 118...
104
	}
118
	}