2011-12-16 15:36:34 +00:00

31 lines
848 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;padding-bottom:5px;margin-right:5px;">
<input style="border:1px inset silver;width:60%" class="criteres" type="text" name="'.$name.'" value="'.((!empty($val))?$this->printHistorique($val):null).'" />
</div>';
$champ .= '<div style="margin-top:5px;margin-bottom:5px">
</div>';
$champ .= '</div>';
return ($champ);
}
}