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

  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 127Zeile 170
	 * @param string The value of the password box.
* @param array Array of options for the password box (class, id)
* @return string The generated password input box.

	 * @param string The value of the password box.
* @param array Array of options for the password box (class, id)
* @return string The generated password input box.

	 */

	 */

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

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

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

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

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

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

		{
$input .= " id=\"".$options['id']."\"";

		{
$input .= " id=\"".$options['id']."\"";

		}
if(isset($options['autocomplete']))
{

		}
if(isset($options['autocomplete']))
{

Zeile 172Zeile 215
		if(isset($options['style']))
{
$input .= " style=\"".$options['style']."\"";

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

		}
if(isset($options['id']))
{

		}
if(isset($options['id']))
{

			$input .= " id=\"".$options['id']."\"";
}
$input .= " />";

			$input .= " id=\"".$options['id']."\"";
}
$input .= " />";

Zeile 273Zeile 316
			$input .= " checked=\"checked\"";
}
$input .= " />";

			$input .= " checked=\"checked\"";
}
$input .= " />";

		if($label != "")
{
$input .= $label;
}
$input .= "</label>";
return $input;
}

/**

		if($label != "")
{
$input .= $label;
}
$input .= "</label>";
return $input;
}

/**

	 * Generate a checkbox.
*
* @param string The name of the check box.

	 * Generate a checkbox.
*
* @param string The name of the check box.

Zeile 387Zeile 430
	 * @param mixed Array/string of the selected items.
* @param array Array of options (pid, main_option, multiple)
* @param boolean Is this our first iteration of this function?

	 * @param mixed Array/string of the selected items.
* @param array Array of options (pid, main_option, multiple)
* @param boolean Is this our first iteration of this function?

	 * @return string The built select box.

	 * @return string The built select box.

	 */
function generate_forum_select($name, $selected, $options=array(), $is_first=1)
{

	 */
function generate_forum_select($name, $selected, $options=array(), $is_first=1)
{

Zeile 494Zeile 537
			if(isset($options['id']))
{
$select .= " id=\"{$options['id']}\"";

			if(isset($options['id']))
{
$select .= " id=\"{$options['id']}\"";

			}

			}

			if(isset($options['size']))
{
$select .= " size=\"{$options['size']}\"";

			if(isset($options['size']))
{
$select .= " size=\"{$options['size']}\"";

Zeile 527Zeile 570
		if(isset($options['class']))
{
$select .= " class=\"{$options['class']}\"";

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

		}


		}


		if(isset($options['id']))
{
$select .= " id=\"{$options['id']}\"";

		if(isset($options['id']))
{
$select .= " id=\"{$options['id']}\"";

Zeile 542Zeile 585
		$select .= ">\n";

$groups_cache = $cache->read('usergroups');

		$select .= ">\n";

$groups_cache = $cache->read('usergroups');

 
		
if(!is_array($selected))
{
$selected = array($selected);
}


		foreach($groups_cache as $group)
{
$selected_add = "";

		foreach($groups_cache as $group)
{
$selected_add = "";

			if(is_array($selected))



			

if(in_array($group['gid'], $selected))

			{

			{

				if(in_array($group['gid'], $selected))
{
$selected_add = " selected=\"selected\"";
}

				$selected_add = " selected=\"selected\"";




			}


			}


			$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 838

$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 899
	/**
* 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='')