/**
* html.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* The idea is to inlcude here some functions to make easier
* the right to left implementation by "functionize" some
* html outputs.
*
- * $Id$
+ * @version $Id$
+ * @package squirrelmail
*/
- function html_tag( $tag, // Tag to output
+/**
+ * Generate html tags
+ *
+ * @param string $tag Tag to output
+ * @param string $val Value between tags
+ * @param string $align Alignment (left, center, etc)
+ * @param string $bgcolor Back color in hexadecimal
+ * @param string $xtra Extra options
+ * @return string HTML ready for output
+ */
+function html_tag( $tag, // Tag to output
$val = '', // Value between tags
$align = '', // Alignment
$bgcolor = '', // Back color
}
if ( $bgcolor <> '' ) {
- $bgc = " bgcolor=\"$bgcolor\"";
+ $bgc = " bgcolor=\"$bgcolor\"";
}
switch ( $align ) {
if ( $val <> '' ) {
$ret .= ">$val</$tag>";
} else {
- $ret .= ' />';
- }
+ $ret .= '>';
+ }
return( $ret );
}
'/.+(\\?'.$var.')=(.*)$/AU', /* at front and only var */
'/.+(\\&'.$var.')=(.*)$/AU' /* at the end */
);
- preg_replace('/&/','&',$url);
+ preg_replace('/&/','&',$url);
switch (true) {
case (preg_match($pat_a[0],$url,$regs)):
$k = $regs[1];
function echo_template_var($var, $format_ar = array() ) {
$frm_last = count($format_ar) -1;
- if (isset($format_ar[0])) echo $format_ar[0];
+ if (isset($format_ar[0])) echo $format_ar[0];
$i = 1;
switch (true) {
echo $format_ar[$frm_last];
}
}
-?>
+?>
\ No newline at end of file