Subversion Repositories eFlore/Applications.cel-consultation

Rev

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

Rev 11 Rev 16
Line 23... Line 23...
23
		parent::__construct();
23
		parent::__construct();
24
        $this->initialiser();
24
        $this->initialiser();
25
    }
25
    }
Line 26... Line 26...
26
    
26
    
27
    public function initialiser() {
-
 
28
    	
27
    public function initialiser() {
Line 29... Line 28...
29
    }
28
    }
Line 30... Line 29...
30
    
29
    
Line 79... Line 78...
79
    		$this->total_resultats = $donnees_images['total'];
78
    		$this->total_resultats = $donnees_images['total'];
80
    	}
79
    	}
Line 81... Line 80...
81
    	
80
    	
Line 82... Line 81...
82
    	foreach ($images as &$image) {
81
    	foreach ($images as &$image) {
83
    		
82
    		
Line 84... Line 83...
84
			$taille_image = array($image['ci_meta_height'],$image['ci_meta_width']);
83
			$taille_image = array($image['hauteur'],$image['largeur']);
Line 85... Line 84...
85
			$image['taille'] = $this->calculerDimensionPourVignette($taille_image);
84
			$image['taille'] = $this->calculerDimensionPourVignette($taille_image);
86
    		
85
    		
Line 87... Line 86...
87
    		$id = $image['coi_ce_image'];
86
    		$id = $image['id_image'];
88
    		
87
    		
-
 
88
    		$format_galerie = Config::get('format_image_galerie');
-
 
89
    		$format_zoom = Config::get('format_image_zoom');
89
    		$format_galerie = Config::get('format_image_galerie');
90
    		
Line 90... Line 91...
90
    		$format_zoom = Config::get('format_image_zoom');
91
    		$image['url_image_format_galerie'] = $this->getUrlImageBase($id, $format_galerie);
Line 91... Line 92...
91
    		
92
    		$image['url_image_format_zoom'] = $this->getUrlImageBase($id, $format_zoom);
Line 153... Line 154...
153
    	return $this->getVue('navigation/pagination',$donnees);
154
    	return $this->getVue('navigation/pagination',$donnees);
154
    }
155
    }
Line 155... Line 156...
155
        
156
        
156
    // +---------------------------------------------------------------------------------------------------------------+
157
    // +---------------------------------------------------------------------------------------------------------------+
-
 
158
    // METHODES POUR L'AFFICHAGE DE DONNEES
-
 
159
	private function getUrlImageRedirigee($id, $format) {
-
 
160
		
-
 
161
		$id = sprintf('%09s', $id);
-
 
162
		
-
 
163
		$chemin_sur_serveur = Config::get('url_redirection_images');		
-
 
164
		return $chemin_sur_serveur.$id.$format;
-
 
165
		
Line 157... Line 166...
157
    // METHODES POUR L'AFFICHAGE DE DONNEES
166
	}
158
 
167
 
159
	private function getUrlImageBase($id, $format = 'L') {
168
	private function getVraieUrlImageBase($id, $format) {
160
	
169
		
Line 161... Line 170...
161
		$id = sprintf('%09s', $id) ;
170
		$id = sprintf('%09s', $id) ;
Line 172... Line 181...
172
		
181
		
Line 173... Line 182...
173
		$fichier = $chemin_sur_serveur.'/'.$dossierNiveau1.'/'.$dossierNiveau2.'/'.$format.'/'.$id.'_'.$format.'.jpg' ;
182
		$fichier = $chemin_sur_serveur.'/'.$dossierNiveau1.'/'.$dossierNiveau2.'/'.$format.'/'.$id.'_'.$format.'.jpg' ;
174
		
183
		
-
 
184
		return $fichier;
-
 
185
	}
-
 
186
 
-
 
187
	private function getUrlImageBase($id, $format = 'L') {
-
 
188
		
-
 
189
		$url = '';
-
 
190
		
-
 
191
		if(Config::get('utilise_redirection_images')) {
-
 
192
			$url = $this->getUrlImageRedirigee($id, $format);
-
 
193
		} else {
-
 
194
			$url = $this->getVraieUrlImageBase($id, $format);
-
 
195
		}
-
 
196
		
Line 175... Line -...
175
		return $fichier;
-
 
176
	}
197
		return $url;
177
	
198
	}
178
	// commentaire 
199
	
179
	private function getTypeMime($format) {
200
	private function getTypeMime($format) {
180
		$mime = '';
201
		$mime = '';