Source for file html.class.php
Documentation is available at html.class.php
* This contains functions needed to generate html output.
* @copyright 2003-2020 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: html.class.php 14840 2020-01-07 07:42:38Z pdontthink $
* Constructor (PHP5 style, required in some future version of PHP)
function __construct($tag=
'', $text=
'', $style =
'', $class=
'', $id=
'',
$xtr_prop =
'', $javascript =
'') {
* Constructor (PHP4 style, kept for compatibility reasons)
function html($tag=
'', $text=
'', $style =
'', $class=
'', $id=
'',
$xtr_prop =
'', $javascript =
'') {
self::__construct($tag, $text, $style, $class, $id, $xtr_prop, $javascript);
function htmlAdd($el, $last=
true) {
foreach ($this->html_el as $html_el) {
$new_html_el[] =
$html_el;
function AddChild($tag=
'', $text=
'', $style =
'', $class=
'', $id=
'',
$xtr_prop =
'', $javascript =
'') {
$el =
new html ($tag, $text, $style, $class, $id, $xtr_prop, $javascript);
for ($i =
0 ; $i <
$cnt; $i++
) {
if ($this->html_el[$i]->id ==
$id) {
$el =
$this->html_el[$i]->FindId($id);
function InsToId( $el, $id, $last=
true) {
$html_el =
&$this->FindId($id);
$html_el->htmlAdd($el, $last);
$el =
new html ('script',$s,'','','',array('language' =>
'JavaScript',
'type' =>
'text/javascript'));
function echoHtml( $usecss=
false, $indent=
'x') {
$indent =
''; $indentmore =
'';
$indentmore =
$indent .
' ';
foreach ($xtr_prop as $k =>
$v) {
$prop.=
' '.
$k.
'="'.
$v.
'"';
foreach ($javascript as $k =>
$v) { /* here we put the onclick, onmouseover etc entries */
$js.=
' '.
$k.
'="'.
$v.
'";';
echo
$indent .
'<' .
$tag;
echo
' class="'.
$class.
'"';
if ($style &&
!$usecss &&
!is_array($style)) {
/* last premisse is to prevent 'style="Array"' in the output */
echo
' style="'.
$style.
'"';
if ($style &&
!$usecss) {
foreach ($style as $k =>
$v) {
$openstyles .=
'<'.
$k.
'>';
foreach ($style as $k =>
$v) {
/* if value of key value = true close the tag */
$closestyles .=
'</'.
$k.
'>';
for($i =
0;$i<
$cnt;$i++
) {
$el->echoHtml($usecss,$indentmore);
Documentation generated on Mon, 13 Jan 2020 04:24:41 +0100 by phpDocumentor 1.4.3