Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1295 Rev 1311
Line 75... Line 75...
75
		
75
		
Line 76... Line 76...
76
		$sous_requete_recherche = $this->fabriquerSousRequeteRecherche($id_utilisateur, $criteres);
76
		$sous_requete_recherche = $this->fabriquerSousRequeteRecherche($id_utilisateur, $criteres);
77
		
77
		
78
		$requete_recherche_images .= $sous_requete_recherche;
78
		$requete_recherche_images .= $sous_requete_recherche;
79
		$nb_images = 0;
79
		$nb_images = 0;
Line 80... Line 80...
80
 
80
		
81
		$resultat_requete_nombre_images = $this->requeter($requete_recherche_images);
81
		$resultat_requete_nombre_images = $this->requeter($requete_recherche_images);
82
		
82
		
Line 142... Line 142...
142
			}
142
			}
Line 143... Line 143...
143
						
143
						
Line 144... Line 144...
144
			switch($nom) {
144
			switch($nom) {
145
				
145
				
146
				case "mots_cles";
146
				case "mots_cles";
Line 147... Line 147...
147
					$sous_requete .= $this->fabriquerSousRequeteMotsCles($valeur);   
147
					$sous_requete .= 'ci.mots_cles_texte LIKE '.$this->proteger('%'.$valeur.'%').' AND ';  
148
				break;
148
				break;
149
				
149
				
Line 231... Line 231...
231
		}
231
		}
Line 232... Line 232...
232
		
232
		
233
		$chaine_recherche = strtolower($chaine_recherche);
233
		$chaine_recherche = strtolower($chaine_recherche);
Line 234... Line 234...
234
		$chaine_recherche = str_replace(' ','_',$chaine_recherche);
234
		$chaine_recherche = str_replace(' ','_',$chaine_recherche);
235
		
-
 
236
		$requete = ' (';
235
		
237
	
-
 
238
		$requete .= 'ci.nom_original LIKE '.$this->proteger($chaine_recherche.'%') ;
-
 
239
		$requete .= ' OR ' ;
236
		$requete = ' ('.
240
		
-
 
241
		$requete .= 'co.nom_ret LIKE '.$this->proteger($chaine_recherche.'%') ;
-
 
242
		$requete .= ' OR ' ;
237
			'ci.nom_original LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
243
		
-
 
244
		$requete .= 'co.nom_sel LIKE '.$this->proteger($chaine_recherche.'%') ;
-
 
245
		$requete .= ' OR ' ;
238
			'co.nom_ret LIKE '.$this->proteger($chaine_recherche.'%').' OR '. 		
246
 
-
 
247
		$requete .= 'co.zone_geo LIKE '.$this->proteger($chaine_recherche.'%') ;
-
 
248
		$requete .= ' OR ' ;
239
			'co.nom_sel LIKE '.$this->proteger($chaine_recherche.'%').' OR '. 
249
		
-
 
250
		$requete .= 'co.ce_zone_geo LIKE '.$this->proteger('%'.$chaine_recherche.'%') ;
-
 
251
		$requete .= ' OR ' ;
240
			'co.zone_geo LIKE '.$this->proteger($chaine_recherche.'%').' OR '. 		
252
		
241
			'co.ce_zone_geo LIKE '.$this->proteger('%'.$chaine_recherche.'%').' OR '. 	
253
		$requete_mots_cles = $this->fabriquerSousRequeteMotsClesTexte($chaine_recherche); 
-
 
254
		if(trim($requete_mots_cles) != '') {
-
 
255
			$requete .= $requete_mots_cles;
-
 
256
			$requete .= ' OR ' ;
-
 
257
		}
242
			//TODO: recherche multicriteres sur mots clés texte ne fonctionne pas à cause de la jointure	
258
		
243
			//'ci.mots_cles_texte LIKE '.$this->proteger('%'.$chaine_recherche.'%').' OR '. 
259
		$requete .= 'ci.ce_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
244
			'ci.ce_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
260
					'ci.courriel_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
245
			'ci.courriel_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
261
					'ci.nom_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
246
			'ci.nom_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' OR '.
Line 262... Line 247...
262
					'ci.prenom_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' '.
247
			'ci.prenom_utilisateur LIKE '.$this->proteger($chaine_recherche.'%').' '.
263
		') ';
248
		') ';
Line 277... Line 262...
277
			$requete_recherche_date = '(ci.date_prise_de_vue IS NULL OR ci.date_prise_de_vue = "0000-00-00")';
262
			$requete_recherche_date = '(ci.date_prise_de_vue IS NULL OR ci.date_prise_de_vue = "0000-00-00")';
278
		}
263
		}
Line 279... Line 264...
279
							
264
							
280
		return $requete_recherche_date;
265
		return $requete_recherche_date;
281
	}
-
 
282
		
-
 
283
	//TODO: a refaire 
-
 
284
	private function fabriquerSousRequeteMotsClesTexte($mots_cles) {
-
 
285
	
-
 
286
	}
-
 
287
	
-
 
288
	//TODO a refaire	
-
 
289
	private function fabriquerSousRequeteMotsCles($mots_cles) {
-
 
290
		
-
 
Line 291... Line 266...
291
	}
266
	}
292
   
267
   
Line 293... Line 268...
293
   	//TODO a refaire
268
   	//TODO a refaire