';
$type = $field['type'];
switch($type)
{
case 'select':
$html.= $this->structureHTML(
$field['label'],
$this->selectHTML($name, $field));
break;
case 'selectMultiple':
$html.= $this->structureHTML(
$field['label'],
$this->selectMultipleHTML($name, $field));
break;
case 'intervalSelect':
$html.= $this->structureHTML(
$field['label'],
$this->intervalSelectHTML($name, $field));
break;
case 'interval':
$html.= $this->structureHTML(
$field['label'],
$this->intervalHTML($name, $field));
break;
case 'date':
$html.= $this->structureHTML(
$field['label'],
$this->dateHTML($name, $field));
break;
case 'text':
$html.= $this->structureHTML(
$field['label'],
$this->textHTML($name, $field));
break;
case 'textarea':
$html.= $this->structureHTML(
$field['label'],
$this->textareaHTML($name, $field));
break;
case 'radio':
$html.= $this->structureHTML(
$field['label'],
$this->radioHTML($name, $field));
break;
}
$html.= '';
}
return $html;
}
private function structureHTML($label, $html, $liens = array())
{
$out = '';
$out.= $this->structureLabel($label);
$out.= '
'.$html.$this->structureLink($liens).'
';
return $out;
}
/**
* Définition du label
* @param unknown_type $label
*/
private function structureLabel($label)
{
return '';
}
/**
* Définition des liens
*/
private function structureLink($liens = array())
{
$html = '';
if (count($liens)>0) {
foreach($liens as $lien){
$html.= ''.$lien['lib'].'';
}
}
if (!empty($html)) {
return ''.$html.'';
}
return '';
}
private function intervalSelectHTML($name, $field)
{
$session = new SessionCiblage();
$return = ' à ';
$return .= '';
$return .= ' Valider';
return ($return);
}
/* Select */
private function selectMultipleHTML($name, $field)
{
$session = new SessionCiblage();
$return = '';
return ($return);
}
/* Select Multiple */
private function selectHTML($name, $field)
{
$session = new SessionCiblage();
$sessionValeur = $session->getCritere($name);
if(is_array($sessionValeur))
$sessionValeur = implode(',', $sessionValeur);
$return = '';
return ($return);
}
/* Interval */
private function intervalHTML($name, $field)
{
$session = new SessionCiblage();
$valeur = $session->getCritere($name);
$return = '';
return ($return);
}
/* Dates */
private function dateHTML($name, $field)
{
$session = new SessionCiblage();
$return = '';
$return .= ' a ';
$return .= '';
$return .= '
';
return ($return);
}
/* Textes */
private function textHTML($name, $field)
{
$session = new SessionCiblage();
$return = '';
return ($return);
}
/* Textarea */
private function textareaHTML($name, $field)
{
$return = '
Selection dans une arborescence
';
return ($return);
}
/* Radios */
private function radioHTML($name, $field, $item)
{
$return = '';
return ($return);
}
}