mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
best fichinter method
This commit is contained in:
@@ -30,7 +30,7 @@ class Form {
|
||||
$this->db = $DB;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
@@ -82,6 +82,42 @@ class Form {
|
||||
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function select_array($name, $array, $id='')
|
||||
{
|
||||
print '<select name="'.$name.'">';
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (strlen($id))
|
||||
{
|
||||
reset ($array);
|
||||
while (list($key, $value) = each ($array))
|
||||
{
|
||||
print "<option value=\"$key\" ";
|
||||
if ($id == $key)
|
||||
{
|
||||
print "SELECTED";
|
||||
}
|
||||
print ">$value</option>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (list($key, $value) = each ($array) )
|
||||
{
|
||||
print "<option value=\"$key\" ";
|
||||
print ">$value</option>\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print "</select>";
|
||||
|
||||
}
|
||||
/*
|
||||
* Renvoie la cha<68>ne de caract<63>re d<>crivant l'erreur
|
||||
*
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user