openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 43d0a070744b755daa632686ed40b9c52dd43e12
parent 8c77b3a1b7c816d4f01dc8b86451828119fb457a
Author: dankert <dankert@laptop-jan>
Date:   Sat, 23 Mar 2013 00:50:54 +0100

Alleinstehende HTML-Tags erzeugen.

Diffstat:
util/Html.class.php | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/util/Html.class.php b/util/Html.class.php @@ -147,6 +147,18 @@ class Html + function complete_tag($tagname,$attributes) + { + $text = '<'.$tagname; + foreach( $attributes as $attribute_name=>$attribute_value ) + if ( !empty($attribute_value) ) + $text .= ' '.$attribute_name.'="'.$attribute_value.'"'; + $text .= ' />'; + return $text; + } + + + function open_tag($tagname,$attributes) { $text = '<'.$tagname;