2011-12-16 15:00:06 +00:00

31 lines
735 B
PHP

<?php
Class Zend_View_Helper_Text extends Zend_View_Helper_Abstract
{
public function printHistorique($val)
{
if(is_array($val)) {
return (implode(',', $val));
}
return ($val);
}
public function Text($name, $libelle)
{
$session = new Zend_Session_Namespace('ciblage');
$val = $session->ciblage[$name];
$champ = '<div>';
$champ .= '<div style="float:left;text-align:left;">
<label>'.$libelle.'</label>
</div>';
$champ .= '<div style="text-align:right;">
<input class="criteres" type="text" name="'.$name.'" value="'.((!empty($val))?$this->printHistorique($val):null).'" />
</div>';
$champ .= '<div>
<hr />
</div>';
$champ .= '</div>';
return ($champ);
}
}