6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * The idea is to inlcude here some functions to make easier
10 * the right to left implementation by "functionize" some
16 function html_tag( $tag, // Tag to output
17 $val = '', // Value between tags (if empty only start tag is issued)
18 $align = '', // Alignment
19 $bgcolor = '', // Back color
20 $xtra = '' ) { // Extra options
22 GLOBAL $languages, $squirrelmail_language;
24 $align = strtolower( $align );
25 $dir = strtolower( $dir );
26 $tag = strtoupper( $tag );
28 if ( isset( $languages[$squirrelmail_language]['DIR']) ) {
29 $dir = $languages[$squirrelmail_language]['DIR'];
34 if ( $dir == 'ltr' ) {
42 if ( $bgcolor <> '' ) {
43 $bgc = " BGCOLOR=\"$bgcolor\"";
51 $alg = " ALIGN=\"$rgt\"";
54 $alg = " ALIGN=\"$lft\"";
56 $alg = " ALIGN=\"$align\"";
61 if ( $dir <> 'ltr' ) {
62 $ret .= " DIR=\"$dir\"";
73 $ret .= "$val</$tag>";