Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 621 | Rev 633 | Go to most recent revision | Show entire file | Ignore 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() {
-
 
42
		$donnees = array();
-
 
43
		$donnees = $this->getPhoto('cel');
-
 
44
		if (empty($donnees)) {
-
 
45
			$infos_image = $this->getCoste();
-
 
46
			if (empty($infos_image) == false ){
-
 
47
				$donnees['imageUrl'] =  array_shift($infos_image['images']);
-
 
48
			}
-
 
49
		}
-
 
50
		if (empty($donnees)) {
-
 
51
			$donnees = $this->getPhoto('photoflora');
-
 
52
		}
-
 
53
		return $donnees;
-
 
54
	}
-
 
55
	
-
 
56
	
-
 
57
	public function getPhoto($source) {
41
	public function getBloc() {
58
		$donnees = array();
42
		$this->images->setProjet('cel');
59
		$this->images->setProjet($source);
43
		$nnr = $this->nomCourant->getNnr();
60
		$nnr = $this->nomCourant->getNnr();
44
		$infos_image = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
61
		$infos_image = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
45
		if (!$infos_image || $infos_image['entete']['total'] == 0) {
-
 
46
			$this->images->setProjet('photoflora');
62
		if ($infos_image['resultats']) {
47
			$nnr = $this->nomCourant->getNnr();
63
			$image = array_shift($infos_image['resultats']);
48
			$infos_image = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
64
			$donnees['imageUrl'] =  $image['binaire.href'];
49
		}
-
 
50
 
-
 
51
		$image = array_shift($infos_image['resultats']);
-
 
52
		$donnees['imageUrl'] = $image['binaire.href'];
65
		}
53
		return $donnees;
66
		return $donnees;
Line 54... Line 67...
54
	}
67
	}
55
 
68