Ajout du methode yesnonum

This commit is contained in:
Rodolphe Quiedeville 2003-02-03 13:13:02 +00:00
parent aa228737b7
commit 51d4ca6cb3

View File

@ -1,5 +1,5 @@
<?PHP
/* Copyright (c) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (c) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -147,6 +147,27 @@ class Form {
}
print '</select>';
}
/*
*
* Yes/No
*
*/
Function selectyesnonum($name,$value='')
{
print '<select name="'.$name.'">';
if ($value == 1)
{
print '<option value="1" SELECTED>oui</option>';
print '<option value="0">non</option>';
}
else
{
print '<option value="1">oui</option>';
print '<option value="0" SELECTED>non</option>';
}
print '</select>';
}
}