Subversion Repositories eFlore/Applications.del

Rev

Rev 771 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 771 Rev 775
Line 28... Line 28...
28
	
28
	
29
	public function __construct(Conteneur $conteneur = null) {
29
	public function __construct(Conteneur $conteneur = null) {
30
		$this->conteneur = $conteneur == null ? new Conteneur() : $conteneur;
30
		$this->conteneur = $conteneur == null ? new Conteneur() : $conteneur;
31
		$this->conteneur->chargerConfiguration('config_departements.ini');
31
		$this->conteneur->chargerConfiguration('config_departements.ini');
-
 
32
		$this->conteneur->chargerConfiguration('config_votes.ini');
32
		$this->conteneur->chargerConfiguration('config_votes.ini');
33
		$this->conteneur->chargerConfiguration('config_images.ini');
33
		$this->navigation = $conteneur->getNavigation();
34
		$this->navigation = $conteneur->getNavigation();
34
		$this->masque = $conteneur->getMasque();
35
		$this->masque = $conteneur->getMasque();
35
		$this->gestionBdd = $conteneur->getGestionBdd();
36
		$this->gestionBdd = $conteneur->getGestionBdd();
36
		$this->bdd = $this->gestionBdd->getBdd();
37
		$this->bdd = $this->gestionBdd->getBdd();	
Line 37... Line 38...
37
	}
38
	}
38
	
39
	
39
	/**
40
	/**
Line 191... Line 192...
191
						$where[] = ' '.$this->mappingFiltre['ns'].' LIKE '.$this->proteger($valeurMasque.' %');
192
						$where[] = ' '.$this->mappingFiltre['ns'].' LIKE '.$this->proteger($valeurMasque.' %');
192
						break;
193
						break;
193
					case 'tag' :
194
					case 'tag' :
194
						$where[] = " di.mots_cles_texte LIKE ".$this->proteger($valeurMasque);
195
						$where[] = " di.mots_cles_texte LIKE ".$this->proteger($valeurMasque);
195
						break;
196
						break;
-
 
197
					case 'ns' :
-
 
198
						$where[] = " nom_sel LIKE ".$this->proteger($valeurMasque.'%');
-
 
199
						break;
196
					default:
200
					default:
197
						$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->proteger($valeurMasque);
201
						$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->proteger($valeurMasque);
198
					break;
202
					break;
199
				}
203
				}
200
			}	
204
			}	
Line 263... Line 267...
263
	private function chargerVotes($images) {
267
	private function chargerVotes($images) {
264
			$requeteVotes = 'SELECT v.*, p.* FROM '.
268
			$requeteVotes = 'SELECT v.*, p.* FROM '.
265
								$this->gestionBdd->formaterTable('del_image_vote', 'v').
269
								$this->gestionBdd->formaterTable('del_image_vote', 'v').
266
								' INNER JOIN del_image_protocole p '.
270
								' INNER JOIN del_image_protocole p '.
267
									'ON v.ce_protocole = p.id_protocole '.
271
									'ON v.ce_protocole = p.id_protocole '.
268
							'WHERE '.$this->chargerClauseWhereVotes();
272
									$this->chargerClauseWhereVotes();
269
			$resultatsVotes = $this->bdd->recupererTous($requeteVotes);
273
			$resultatsVotes = $this->bdd->recupererTous($requeteVotes);
Line 270... Line 274...
270
			
274
			
271
			
275
			
Line 287... Line 291...
287
			$where[] = 'v.ce_image  IN ('.$chaineImageIds.')';
291
			$where[] = 'v.ce_image  IN ('.$chaineImageIds.')';
288
		}
292
		}
289
		if (isset($this->parametres['protocole'])) {
293
		if (isset($this->parametres['protocole'])) {
290
			$where[] = 'v.ce_protocole = '.$this->proteger($this->parametres['protocole']);
294
			$where[] = 'v.ce_protocole = '.$this->proteger($this->parametres['protocole']);
291
		}
295
		}
-
 
296
		
-
 
297
		$where = (!empty($where)) ? 'WHERE '.implode(' AND ', $where) : '';
292
		return implode(' AND ', $where);
298
		return $where;
293
	}
299
	}
Line 294... Line 300...
294
	
300
	
295
	/*-------------------------------------------------------------------------------
301
	/*-------------------------------------------------------------------------------
296
								FORMATER ET METTRE EN FORME
302
								FORMATER ET METTRE EN FORME