xdb->iterRow($sql);
$sel = ' selected="selected"';
// on ajoute une entree vide si $pad est vrai
$html = "";
if ($pad) {
$html.= '\n";
}
while (list($my_id,$my_text) = $res->next()) {
$html .= sprintf("\n",$my_id,($valeur==$my_id?$sel:""),$my_text);
}
return $html;
}
function smarty_function_select_nat($params, &$smarty) {
if(empty($params['pad']) || !($params['pad']))
$pad = false;
else
$pad = true;
return select_nat($params['valeur'], $pad);
}
?>