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

  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']."\"";

Zeile 553Zeile 596
				}
}


				}
}


			$select .= "<option value=\"{$group['gid']}\"{$selected_add}>".htmlspecialchars_uni(strip_tags($group['title']))."</option>";

			$select .= "<option value=\"{$group['gid']}\"{$selected_add}>".htmlspecialchars_uni($group['title'])."</option>";

		}

$select .= "</select>";

		}

$select .= "</select>";

Zeile 790Zeile 833

$built = $this->generate_select_box($name.'_day', $days, (int)$day, array('id' => $name.'_day'))." &nbsp; ";
$built .= $this->generate_select_box($name.'_month', $months, (int)$month, array('id' => $name.'_month'))." &nbsp; ";


$built = $this->generate_select_box($name.'_day', $days, (int)$day, array('id' => $name.'_day'))." &nbsp; ";
$built .= $this->generate_select_box($name.'_month', $months, (int)$month, array('id' => $name.'_month'))." &nbsp; ";

		$built .= $this->generate_text_box($name.'_year', (int)$year, array('id' => $name.'_year', 'style' => 'width: 100px;'));

		$built .= $this->generate_numeric_field($name.'_year', $year, array('id' => $name.'_year', 'style' => 'width: 100px;', 'min' => 0));

		return $built;
}


		return $built;
}


Zeile 851Zeile 894
	/**
* Initialise the new form container.
*

	/**
* Initialise the new form container.
*

	 * @param string The title of the forum container

	 * @param string The title of the form container

	 * @param string An additional class to apply if we have one.
*/
function __construct($title='', $extra_class='')

	 * @param string An additional class to apply if we have one.
*/
function __construct($title='', $extra_class='')