Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 621 | Rev 633 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 621 Rev 631
Line 37... Line 37...
37
		$donnees['coste'] = $this->getCoste();
37
		$donnees['coste'] = $this->getCoste();
38
		return $donnees;
38
		return $donnees;
39
	}
39
	}
Line 40... Line 40...
40
 
40
 
-
 
41
	public function getBloc() {
41
	public function getBloc() {
42
		$donnees = array();
42
		$this->images->setProjet('cel');
43
		$donnees = $this->getPhoto('cel');
43
		$nnr = $this->nomCourant->getNnr();
44
		if (empty($donnees)) {
44
		$infos_image = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
45
			$infos_image = $this->getCoste();
45
		if (!$infos_image || $infos_image['entete']['total'] == 0) {
46
			if (empty($infos_image) == false ){
-
 
47
				$donnees['imageUrl'] =  array_shift($infos_image['images']);
-
 
48
			}
46
			$this->images->setProjet('photoflora');
49
		}
47
			$nnr = $this->nomCourant->getNnr();
50
		if (empty($donnees)) {
48
			$infos_image = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
51
			$donnees = $this->getPhoto('photoflora');
-
 
52
		}
-
 
53
		return $donnees;
-
 
54
	}
Line -... Line 55...
-
 
55
	
-
 
56
	
-
 
57
	public function getPhoto($source) {
-
 
58
		$donnees = array();
-
 
59
		$this->images->setProjet($source);
-
 
60
		$nnr = $this->nomCourant->getNnr();
49
		}
61
		$infos_image = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
50
 
62
		if ($infos_image['resultats']) {
-
 
63
			$image = array_shift($infos_image['resultats']);
51
		$image = array_shift($infos_image['resultats']);
64
			$donnees['imageUrl'] =  $image['binaire.href'];
52
		$donnees['imageUrl'] = $image['binaire.href'];
65
		}
Line 53... Line 66...
53
		return $donnees;
66
		return $donnees;
54
	}
67
	}