Vergleich admin/inc/class_form.php - 1.8.0 - 1.8.1

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 100Zeile 100
	function generate_text_box($name, $value="", $options=array())
{
$input = "<input type=\"text\" name=\"".$name."\" value=\"".htmlspecialchars_uni($value)."\"";

	function generate_text_box($name, $value="", $options=array())
{
$input = "<input type=\"text\" name=\"".$name."\" value=\"".htmlspecialchars_uni($value)."\"";

 
		if(isset($options['class']))
{
$input .= " class=\"text_input ".$options['class']."\"";
}
else
{
$input .= " class=\"text_input\"";
}
if(isset($options['style']))
{
$input .= " style=\"".$options['style']."\"";
}
if(isset($options['id']))
{
$input .= " id=\"".$options['id']."\"";
}
$input .= " />";
return $input;
}

/**
* Generate a numeric field.
*
* @param string The name of the numeric box.
* @param int The value of the numeric box.
* @param array Array of options for the numeric box (min, max, step, class, style, id)
* @return string The generated numeric box.
*/
function generate_numeric_field($name, $value="", $options=array())
{
$input = "<input type=\"number\" name=\"".$name."\" value=\"".(int)$value."\"";
if(isset($options['min']))
{
$input .= " min=\"".$options['min']."\"";
}
if(isset($options['max']))
{
$input .= " max=\"".$options['max']."\"";
}
if(isset($options['step']))
{
$input .= " step=\"".$options['step']."\"";
}

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

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