Vergleich admin/inc/class_form.php - 1.8.6 - 1.8.19

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 130Zeile 130
	 */
function generate_numeric_field($name, $value=0, $options=array())
{

	 */
function generate_numeric_field($name, $value=0, $options=array())
{

		$input = "<input type=\"number\" name=\"".$name."\" value=\"".(int)$value."\"";










		if(is_numeric($value))
{
$value = (float)$value;
}
else
{
$value = '';
}

$input = "<input type=\"number\" name=\"{$name}\" value=\"{$value}\"";

		if(isset($options['min']))
{
$input .= " min=\"".$options['min']."\"";

		if(isset($options['min']))
{
$input .= " min=\"".$options['min']."\"";

Zeile 383Zeile 392
	 * @param array $options Array of options for the select box (multiple, class, id, size)
* @return string The select box.
*/

	 * @param array $options Array of options for the select box (multiple, class, id, size)
* @return string The select box.
*/

	function generate_select_box($name, $option_list, $selected=array(), $options=array())

	function generate_select_box($name, $option_list=array(), $selected=array(), $options=array())

	{
if(!isset($options['multiple']))
{

	{
if(!isset($options['multiple']))
{

Zeile 413Zeile 422
		foreach($option_list as $value => $option)
{
$select_add = '';

		foreach($option_list as $value => $option)
{
$select_add = '';

			if(!empty($selected) && ((string)$value == (string)$selected || (is_array($selected) && in_array((string)$value, $selected))))

			if((!is_array($selected) || !empty($selected)) && ((string)$value == (string)$selected || (is_array($selected) && in_array((string)$value, $selected))))

			{
$select_add = " selected=\"selected\"";
}

			{
$select_add = " selected=\"selected\"";
}