diff --git a/application/views/default/helpers/Interval.php b/application/views/default/helpers/Interval.php
index bd0a44e0..21bf970a 100644
--- a/application/views/default/helpers/Interval.php
+++ b/application/views/default/helpers/Interval.php
@@ -1,35 +1,20 @@
ciblage[$name]))
- return ($session->ciblage[$name]);
- }
-
- protected function getMinMax($name){
- $session = new Zend_Session_Namespace('ciblage');
-
- switch ($name) {
- case 'nbMPubli':
- $min = ((!empty($session->ciblage['nbMPubli'][0]))?$session->ciblage['nbMPubli'][0]:'0');
- $max = ((!empty($session->ciblage['nbMPubli'][0]))?$session->ciblage['nbMPubli'][1]:'1000');
- return (array($min, $max));
- case 'nbActio':
- $min = ((!empty($session->ciblage['nbActio'][0]))?$session->ciblage['nbMPubli'][0]:'0');
- $max = ((!empty($session->ciblage['nbActio'][0]))?$session->ciblage['nbMPubli'][1]:'100');
- return (array($min, $max));
- case 'nbPart':
- return array('0', '100');
+ $session = new SessionCiblage();
+ $values = $session->getCritere($name);
+ if (is_array($values)){
+ return $values;
}
+ return array(0,0);
}
public function Interval($name, $libelle, $date = false)
{
- $session = new Zend_Session_Namespace('ciblage');
$minMax = $this->getMinMax($name);
$champ = '
';
diff --git a/application/views/default/helpers/Select.php b/application/views/default/helpers/Select.php
index f30cfda7..16e1f7a5 100644
--- a/application/views/default/helpers/Select.php
+++ b/application/views/default/helpers/Select.php
@@ -4,24 +4,26 @@ Class Zend_View_Helper_Select extends Zend_View_Helper_Abstract
public function Select($name, $libelle, $liste, $color = false)
{
-
- $session = new Zend_Session_Namespace('ciblage');
- $compar = $session->ciblage[$name][0];
- $select = '
';
-
- foreach($liste as $item => $value) {
- $select .= '
';
- }
-
+ require_once 'Scores/SessionCiblage.php';
+ $session = new SessionCiblage();
+ $value = $session->getCritere($name);
+
$champ .= '
';
$champ .= '
';
$champ .= '
';
$champ .= '
-
+
';
$champ .= '';
$champ .= '
';
diff --git a/application/views/default/helpers/Text.php b/application/views/default/helpers/Text.php
index 7d0f1f0f..02978327 100644
--- a/application/views/default/helpers/Text.php
+++ b/application/views/default/helpers/Text.php
@@ -11,15 +11,17 @@ Class Zend_View_Helper_Text extends Zend_View_Helper_Abstract
public function Text($name, $libelle)
{
- $session = new Zend_Session_Namespace('ciblage');
- $val = $session->ciblage[$name];
+ require_once 'Scores/SessionCiblage.php';
+ $session = new SessionCiblage();
+ $value = $session->getCritere($name);
+ $val = !empty($value) ? $this->printHistorique($value) : null;
$champ = '
';
$champ .= '
';
$champ .= '
-
+
';
$champ .= '
diff --git a/application/views/default/helpers/Textarea.php b/application/views/default/helpers/Textarea.php
index ff365d72..4ab1edf7 100644
--- a/application/views/default/helpers/Textarea.php
+++ b/application/views/default/helpers/Textarea.php
@@ -11,15 +11,17 @@ Class Zend_View_Helper_Textarea extends Zend_View_Helper_Abstract
public function Textarea($name, $libelle)
{
- $session = new Zend_Session_Namespace('ciblage');
- $val = $session->ciblage[$name];
+ require_once 'Scores/SessionCiblage.php';
+ $session = new SessionCiblage();
+ $value = $session->getCritere($name);
+ $val = !empty($value) ? $this->printHistorique($value) : 'Code séparé par des virgules...';
$champ = '
';
$champ .= '
';
$champ .= '
-
+
';
$champ .= '