Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 916 Rev 922
Line 15... Line 15...
15
class PopupGalerie extends aControleur {
15
class PopupGalerie extends aControleur {
16
	private $conteneur = null;
16
	private $conteneur = null;
17
	private $urlImage = null;
17
	private $urlImage = null;
18
	private $images = null;
18
	private $images = null;
19
	private $appUrls = null;
19
	private $appUrls = null;
-
 
20
	private $titre = '';
20
	private $format = 'CS';
21
	private $format_miniature = 'CS';
-
 
22
	private $format_agrandi = 'L';
Line 21... Line 23...
21
 
23
 
22
	public function initialiser() {
24
	public function initialiser() {
23
		$this->capturerParametres();
25
		$this->capturerParametres();
24
		$this->conteneur = new Conteneur();
26
		$this->conteneur = new Conteneur();
Line 34... Line 36...
34
			$this->urlImage = urldecode($_GET['url_image']);
36
			$this->urlImage = urldecode($_GET['url_image']);
35
		}
37
		}
36
		if (isset($_GET['format'])) {
38
		if (isset($_GET['format'])) {
37
			$this->format = $_GET['format'];
39
			$this->format = $_GET['format'];
38
		}
40
		}
-
 
41
		if (isset($_GET['titre'])) {
-
 
42
			$this->titre = $_GET['titre'];
-
 
43
		}
39
	}
44
	}
Line 40... Line 45...
40
 
45
 
41
	public function executerActionParDefaut() {
46
	public function executerActionParDefaut() {
42
		$this->executerFiche();
47
		$this->executerFiche();
Line 43... Line 48...
43
	}
48
	}
44
 
49
 
45
	public function executerFiche(){
50
	public function executerFiche(){
46
		$infos = array();
51
		$infos = array();
47
		$this->images->setProjet('cel');
52
		$this->images->setProjet('cel');
-
 
53
		$urls = $this->images->getUrlsImagesParIdsNoms(array($this->num_nom));
-
 
54
		$urls = $urls['bdtfx.'.$this->num_nom];
-
 
55
		$ids = array();
-
 
56
		foreach($urls as $index => $url) {
-
 
57
			$urls[$index] = str_replace($this->format_miniature, $this->format_agrandi, $url);
-
 
58
			$ids[$index] = $this->extraireIdDeUrl($url);
-
 
59
		}
-
 
60
		
48
		$urls = $this->images->getUrlsImagesParIdsNoms(array($this->num_nom));
61
		$infos['urls'] = $urls;
-
 
62
		$infos['ids'] = $ids;
49
		$infos['urls'] = $urls['bdtfx.'.$this->num_nom];
63
		$infos['num_nom'] = $this->num_nom;
-
 
64
		$infos['url_image'] = str_replace($this->format_miniature, $this->format_agrandi, $this->urlImage);
-
 
65
		$infos['titre'] = $this->titre;
Line -... Line 66...
-
 
66
		$infos['url_meta'] = Config::get('imagesPopupTpl');
50
		$infos['num_nom'] = $this->num_nom;
67
		$infos['url_contact'] = $this->appUrls->obtenirUrlPopUpContact("{id_auteur}", "{id_img}");
51
		$infos['url_image'] = $this->urlImage;
68
		
Line -... Line 69...
-
 
69
		$this->setSortie(self::META_TITRE,$this->titre, true);
-
 
70
		$this->setSortie(self::RENDU_CORPS, $this->getVue('popup_galerie_illustrations', $infos));
-
 
71
	}
-
 
72
	
-
 
73
	private function extraireIdDeUrl($url) {
-
 
74
		$matches = array();
52
		
75
		preg_match('#cel-img:([0-9]*)'.$this->format_miniature.'#', $url, $matches);
53
		$this->setSortie(self::RENDU_CORPS, $this->getVue('popup_galerie_illustrations', $infos));
76
		return ltrim($matches[1],'0');
54
	}
77
	}
55
	
78
	
56
	private function formaterDateImg($date) {
79
	private function formaterDateImg($date) {