Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1785 Rev 1788
Line 312... Line 312...
312
        if(isset($qs['pays'])) {
312
        if(isset($qs['pays'])) {
313
            $p['pays'] = array_filter(explode(',', $qs['pays']), create_function('$val', 'return preg_match("/^[A-Z][A-Z]$/", $val);'));
313
            $p['pays'] = array_filter(explode(',', $qs['pays']), create_function('$val', 'return preg_match("/^[A-Z][A-Z]$/", $val);'));
314
            if(!$p['pays']) unset($p['pays']);
314
            if(!$p['pays']) unset($p['pays']);
315
        }
315
        }
Line 316... Line -...
316
 
-
 
317
        if(isset($qs['regions'])) {
-
 
318
            $p['regions'] = array_filter(explode(',', $qs['regions']), create_function('$val', 'return preg_match("/^[A-Z][A-Z]\.\w\w$/", $val);'));
-
 
319
            if(!$p['regions']) unset($p['regions']);
-
 
320
        }
-
 
321
 
316
 
322
		return $p;
317
		return $p;
Line 323... Line 318...
323
	}
318
	}
324
 
319
 
Line 426... Line 421...
426
			$join[] = 'LEFT JOIN coel_collection_a_personne ON (cc_id_collection = ccap_id_collection)';
421
			$join[] = 'LEFT JOIN coel_collection_a_personne ON (cc_id_collection = ccap_id_collection)';
427
		}
422
		}
428
		if (isset($p['p'])) {
423
		if (isset($p['p'])) {
429
			$join[] = 'LEFT JOIN coel_personne ON (ccap_id_personne = cp_id_personne)';
424
			$join[] = 'LEFT JOIN coel_personne ON (ccap_id_personne = cp_id_personne)';
430
		}
425
		}
431
		/*if (isset($p['lieu-stockage'])) { // @TODO on verra plus tard, galère avec la table meta
-
 
432
			$join[] = 'LEFT JOIN coel_ ON (cs_ce_truk_region = )';
-
 
433
		}*/
-
 
Line 434... Line 426...
434
 
426
 
435
        $join = array_unique($join);
427
        $join = array_unique($join);
Line 436... Line 428...
436
	}
428
	}
Line 451... Line 443...
451
			$where[] = '(' . implode(' OR ', array(
443
			$where[] = '(' . implode(' OR ', array(
452
				"cp_adresse_01 LIKE {$p['adresse']}",
444
				"cp_adresse_01 LIKE {$p['adresse']}",
453
				"cp_code_postal LIKE {$p['adresse']}",
445
				"cp_code_postal LIKE {$p['adresse']}",
454
				"cp_ville LIKE {$p['adresse']}",
446
				"cp_ville LIKE {$p['adresse']}",
455
				"cp_ce_truk_pays LIKE {$p['adresse']}",
447
				"cp_ce_truk_pays LIKE {$p['adresse']}",
456
				"cp_ce_truk_region LIKE {$p['adresse']}",
-
 
457
				"cp_naissance_lieu LIKE {$p['adresse']}",
448
				"cp_naissance_lieu LIKE {$p['adresse']}",
458
				"cp_deces_lieu LIKE {$p['adresse']}",
449
				"cp_deces_lieu LIKE {$p['adresse']}",
459
				"cmlv.cmlv_nom LIKE {$p['adresse']}",
450
				"cmlv.cmlv_nom LIKE {$p['adresse']}",
460
			)) . ')';
451
			)) . ')';
461
		}
452
		}