Subversion Repositories eFlore/Applications.del

Rev

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

Rev 841 Rev 857
Line 349... Line 349...
349
		$mots_cles = explode(' ', $valeurMasque);
349
		$mots_cles = explode(' ', $valeurMasque);
350
		$requeteMotsClesImg = array();
350
		$requeteMotsClesImg = array();
351
		$requeteMotsClesObs = array();
351
		$requeteMotsClesObs = array();
Line 352... Line 352...
352
		
352
		
353
		foreach($mots_cles as $mot_cle) {
353
		foreach($mots_cles as $mot_cle) {
354
			$requeteMotsCles = $this->proteger('%'.$mot_cle.'%').' AND' ;
354
			$requeteMotsCles = $this->proteger('%'.$mot_cle.'%');
355
			$requeteMotsClesImg[] = 'di.mots_cles_texte LIKE '.$requeteMotsCles.' AND ';
355
			$requeteMotsClesImg[] = 'di.mots_cles_texte LIKE '.$requeteMotsCles;
356
			$requeteMotsClesObs[] = 'dob.mots_cles_texte LIKE '.$requeteMotsCles.' AND ';
356
			$requeteMotsClesObs[] = 'dob.mots_cles_texte LIKE '.$requeteMotsCles;
357
		}
357
		}
358
		$requeteMotsClesImg = implode('AND', $requeteMotsClesImg);
358
		$requeteMotsClesImg = implode(' AND ', $requeteMotsClesImg);
Line 359... Line 359...
359
		$requeteMotsClesObs = implode('AND', $requeteMotsClesObs);
359
		$requeteMotsClesObs = implode(' AND ', $requeteMotsClesObs);
360
		
360
		
361
		$masque = '('.
361
		$masque = '('.
362
		          	'('.$requeteMotsClesImg.') OR '.
362
		          	'('.$requeteMotsClesImg.') OR '.
Line 433... Line 433...
433
								' INNER JOIN del_image_protocole p '.
433
								' INNER JOIN del_image_protocole p '.
434
									'ON v.ce_protocole = p.id_protocole '.
434
									'ON v.ce_protocole = p.id_protocole '.
435
									$this->chargerClauseWhereVotes();
435
									$this->chargerClauseWhereVotes();
436
			$resultatsVotes = $this->bdd->recupererTous($requeteVotes);
436
			$resultatsVotes = $this->bdd->recupererTous($requeteVotes);
Line -... Line 437...
-
 
437
			
-
 
438
			
437
			
439
			//TODO : faire une méthode formater vote
Line 438... Line 440...
438
			$votes = $this->formaterVotes($resultatsVotes);
440
			$votes = $this->formaterVotes($resultatsVotes);
439
	
441
	
440
			foreach ($images as $id => $image) {
442
			foreach ($images as $id => $image) {