src/UI/HTML/Elements.php
public static function Label( $label_name, $label_text, $class = 'label', $icons = array() )
	{
		if( !is_array( $icons ) )
		{
			if( $icons )
				$icons = array( $icons );
			else
				$icons = array();
		}
		if( sizeof( $icons ) && $label_name )
		{
			$ins_icons = "";
			foreach( $icons as $icon )
				if( trim( $icon ) )
					$ins_icons .= "<td>".$icon."</td>";
			$code = "<td".$ins_width.">
			<table cellpadding='0' cellspacing='0' border='0' width='100%'>
			  <tr>
				<td class='label' id='lbl_".$label_name."'><label for='".$label_name."'>".$label_text."</label></td>
				<td class='prefix' id='ico_".$label_name."' align='right' valign='middle'>
				  <table cellpadding='0' cellspacing='0' border='0'><tr>".$ins_icons."</tr></table></td>
			  </tr>
			</table>";
		}
		else
		{
			$ins_id		= $label_name ? " id=\"lbl_".$label_name."\"" : "";
			$ins_class	= $class ? " class=\"".$class."\"" : "";
			$label		= $label_name ? "<label for='".$label_name."'>".$label_text."</label>" : $label_text;
			$code		= "<td".$ins_id.$ins_class.">".$label."</td>";		
		}
		return $code;
	}
public static function Label( $label_name, $label_text, $class = 'label', $icons = array() )
	{
		if( !is_array( $icons ) )
		{
			if( $icons )
				$icons = array( $icons );
			else
				$icons = array();
		}
		if( sizeof( $icons ) && $label_name )
		{
			$ins_icons = "";
			foreach( $icons as $icon )
				if( trim( $icon ) )
					$ins_icons .= "<td>".$icon."</td>";
			$code = "<td".$ins_width.">
			<table cellpadding='0' cellspacing='0' border='0' width='100%'>
			  <tr>
				<td class='label' id='lbl_".$label_name."'><label for='".$label_name."'>".$label_text."</label></td>
				<td class='prefix' id='ico_".$label_name."' align='right' valign='middle'>
				  <table cellpadding='0' cellspacing='0' border='0'><tr>".$ins_icons."</tr></table></td>
			  </tr>
			</table>";
		}
		else
		{
			$ins_id		= $label_name ? " id=\"lbl_".$label_name."\"" : "";
			$ins_class	= $class ? " class=\"".$class."\"" : "";
			$label		= $label_name ? "<label for='".$label_name."'>".$label_text."</label>" : $label_text;
			$code		= "<td".$ins_id.$ins_class.">".$label."</td>";		
		}
		return $code;
	}
public static function Label ( $ label_name , $ label_text , $ class = 'label' , $ icons = array ( ) ) { if ( ! is_array ( $ icons ) ) { if ( $ icons ) $ icons = array ( $ icons ) ; else $ icons = array ( ) ; } if ( sizeof ( $ icons ) && $ label_name ) { $ ins_icons = "" ; foreach ( $ icons as $ icon ) if ( trim ( $ icon ) ) $ ins_icons .= "<td>" . $ icon . "</td>" ; $ code = "<td" . $ ins_width . ">
			<table cellpadding='0' cellspacing='0' border='0' width='100%'>
			  <tr>
				<td class='label' id='lbl_" . $ label_name . "'><label for='" . $ label_name . "'>" . $ label_text . "</label></td>
				<td class='prefix' id='ico_" . $ label_name . "' align='right' valign='middle'>
				  <table cellpadding='0' cellspacing='0' border='0'><tr>" . $ ins_icons . "</tr></table></td>
			  </tr>
			</table>" ; } else { $ ins_id = $ label_name ? " id=\"lbl_" . $ label_name . "\"" : "" ; $ ins_class = $ class ? " class=\"" . $ class . "\"" : "" ; $ label = $ label_name ? "<label for='" . $ label_name . "'>" . $ label_text . "</label>" : $ label_text ; $ code = "<td" . $ ins_id . $ ins_class . ">" . $ label . "</td>" ; } return $ code ; }
Erzeugt HTML-Code einer Feldbeschriftung.
@access		public
@static
@param		string		$label_name		interner Name des Beschrifungsfeldes
@param		string		$label_name		Inhalt des Beschriftungsfeldes
@param		string		$class			CSS-Klasse
@param		string		$icons			Array mit Icons vor den Eingabefeld
@param		string		$width			Weitenangabe
@return		string
Erzeugt HTML - Code einer Feldbeschriftung .