Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 1263 Rev 1265
Line 67... Line 67...
67
		} else if ($this->parametres['retour'] == self::MIME_JSON) {
67
		} else if ($this->parametres['retour'] == self::MIME_JSON) {
68
			if (isset($this->ressources[0])) {
68
			if (isset($this->ressources[0])) {
69
				$this->chargerInfosImage();
69
				$this->chargerInfosImage();
70
				$this->extraireIdentitesAuteurs();
70
				$this->extraireIdentitesAuteurs();
71
				$resultat->corps = $this->formaterInfosImage($this->infosImages[0]);
71
				$resultat->corps = $this->formaterInfosImage($this->infosImages[0]);
-
 
72
			} elseif (substr($this->parametres['masque.nn'],0,3) === 'top') {
-
 
73
				$resultat->corps = $this->chargerTopImages();
72
			} else {
74
			} else {
73
				$this->chargerListeImages();
75
				$this->chargerListeImages();
74
				$this->chargerNbreImagesTotal();
76
				$this->chargerNbreImagesTotal();
75
				$resultat->corps = $this->formaterListeImages();
77
				$resultat->corps = $this->formaterListeImages();
76
			}
78
			}
Line 535... Line 537...
535
	}
537
	}
Line 536... Line 538...
536
 
538
 
537
	private function avoirContenu($info) {
539
	private function avoirContenu($info) {
538
		return !($info == null || $info == '' || $info == '000null');
540
		return !($info == null || $info == '' || $info == '000null');
-
 
541
	}
-
 
542
 
-
 
543
/* autres fonctions */
-
 
544
	private function chargerTopImages() {
-
 
545
		$nn = substr($this->parametres['masque.nn'], strpos($this->parametres['masque.nn'], ':') + 1);
-
 
546
		$requete = 	'SELECT ce_image as id_img, organe '.
-
 
547
			'FROM tb_del_test.del_image_top '.
-
 
548
			'WHERE nn = '. $this->Bdd->proteger($nn) . ' -- ' . __FILE__ . ':' . __LINE__;
-
 
549
 
-
 
550
		$this->infosImages = $this->Bdd->recupererTous($requete);
-
 
551
 
-
 
552
		$resultat = array();
-
 
553
		foreach ($this->infosImages as $image) {
-
 
554
			$resultat[$image['organe']] = $this->formaterUrlImage($image);
-
 
555
		}
-
 
556
 
-
 
557
		return array('resultat' => $resultat);
539
	}
558
	}
540
}
-
 
541
?>
559
}
-
 
560
?>