Correction de l'interpretations des données pour le count
This commit is contained in:
parent
af1730d2e6
commit
b9cec9515b
@ -62,36 +62,45 @@ class Object_Comptage extends Libs_Row
|
||||
require_once 'Scores/SessionCiblage.php';
|
||||
$session = new SessionCiblage();
|
||||
|
||||
$sessionValeur = $session->getCritere($key);
|
||||
$session->setCritere($key, $valeur);
|
||||
if($valeur[strlen($valeur)] == ',')
|
||||
$valeur = substr($valeur, 0, strlen($valeur) -1);
|
||||
if($key == 'vil' or $key == 'adr_reg' or $key == 'adr_dept') {
|
||||
$key = 'adr_com';
|
||||
if($session->getCritere('vil')){
|
||||
$valeurs = explode(',', $session->getCritere('vil'));
|
||||
foreach($valeurs as $valeur) {
|
||||
$vil .= 'adr_com:'.trim($valeur).',';
|
||||
if(in_array($key, array('adr_dept', 'adr_com', 'adr_reg')))
|
||||
{
|
||||
$valeurs = explode(',', $valeur);
|
||||
foreach($valeurs as $valeur)
|
||||
{
|
||||
$type = explode(':', $valeur);
|
||||
if(count($type) == 2) {
|
||||
$key = $type[0];
|
||||
$valeur = $type[1];
|
||||
}
|
||||
//$vil = substr($vil, 0, strlen($vil)-1);
|
||||
}
|
||||
if($session->getCritere('adr_reg')) {
|
||||
$valeurs = explode(',', $session->getCritere('adr_reg'));
|
||||
foreach($valeurs as $valeur) {
|
||||
$reg .= 'adr_reg:'.trim($valeur).',';
|
||||
switch($key) {
|
||||
case 'adr_dept':
|
||||
$dept .= trim($valeur).',';
|
||||
break;
|
||||
case 'adr_reg':
|
||||
$reg .= trim($valeur).',';
|
||||
break;
|
||||
case 'adr_com':
|
||||
case 'vil':
|
||||
default:
|
||||
$vil .= trim($valeur).',';
|
||||
break;
|
||||
}
|
||||
//$reg = substr($reg, 0, strlen($reg)-1);
|
||||
}
|
||||
if($session->getCritere('adr_dept')) {
|
||||
$valeurs = explode(',', $session->getCritere('adr_dept'));
|
||||
foreach($valeurs as $valeur) {
|
||||
$dept .= 'adr_dept:'.trim($valeur).',';
|
||||
}
|
||||
//$dept = substr($dept, 0, strlen($dept)-1);
|
||||
if(strlen($dept)>0) {
|
||||
$dept = substr($dept, 0, strlen($dept)-1);
|
||||
$session->setCritere('adr_dept', $dept);
|
||||
}
|
||||
$valeur = $vil.$dept.$reg;
|
||||
if(strlen($reg)>0) {
|
||||
$reg = substr($reg, 0, strlen($reg)-1);
|
||||
$session->setCritere('adr_reg', $reg);
|
||||
}
|
||||
if(strlen($vil)>0) {
|
||||
$vil = substr($vil, 0, strlen($vil)-1);
|
||||
$session->setCritere('adr_com', $vil);
|
||||
}
|
||||
} else
|
||||
$session->setCritere($key, $valeur);
|
||||
}
|
||||
|
||||
require_once 'Scores/Field.php';
|
||||
$field = new Fields();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user