Création de condition sur les tableaux
This commit is contained in:
parent
686e80814f
commit
d7459aee6e
@ -17,7 +17,11 @@ Class Ciblage
|
||||
if(!empty($structure)) {
|
||||
foreach($structure as $key => $valeur)
|
||||
{
|
||||
if (method_exists($this, $key) and isset($valeur) and $valeur != 'tous') {
|
||||
if (method_exists($this, $key) and !empty($valeur) and $valeur != 'tous') {
|
||||
if(is_array($valeur)) {
|
||||
if(!empty($valeur[0]))
|
||||
$this->$key($valeur);
|
||||
} else
|
||||
$this->$key($valeur);
|
||||
}
|
||||
}
|
||||
@ -143,7 +147,7 @@ Class Ciblage
|
||||
}
|
||||
|
||||
protected function cj($valeur) {
|
||||
$this->setAlpha('cj', $valeur);
|
||||
$this->setFilter('cj', $valeur);
|
||||
}
|
||||
|
||||
protected function capital($valeur) {
|
||||
@ -207,7 +211,18 @@ Class Ciblage
|
||||
}
|
||||
|
||||
protected function dateCrea_etab($valeur) {
|
||||
if(!is_array($valeur)) {
|
||||
$format = explode('/', $valeur);
|
||||
$valeur = $format[2].$format[1].$format[0];
|
||||
} else {
|
||||
$format1 = explode('/', $valeur[0]);
|
||||
$format2 = explode('/', $valeur[0]);
|
||||
|
||||
$valeur[0] = $format1[2].$format1[1].$format1[0];
|
||||
$valeur[1] = $format2[2].$format2[1].$format2[0];
|
||||
}
|
||||
$this->setFilterRange('dateCrea_etab', $valeur);
|
||||
|
||||
}
|
||||
|
||||
protected function dateCrea_ent($valeur) {
|
||||
|
Loading…
Reference in New Issue
Block a user