function __construct() { parent::__construct(); $this->etype = get_class($this); $rows = 100; $tbl = new dom_table_x(2, $rows); $this->append_child($tbl); $ir = rand(); for ($k = 0; $k < $rows; $k++) { $css = string_to_color($ir, 1); $ir = $css . rand(); $tc = bgcolor_to_color($css); $tbl->cells[$k][1]->css_style['background'] = $css; $tbl->cells[$k][1]->css_style['color'] = $tc; $t = new dom_statictext(); $tbl->cells[$k][0]->append_child($t); $t->text = $k; $t = new dom_statictext(); $tbl->cells[$k][1]->append_child($t); $t->text = $ir; } }
function html_inner() { $var = $this->args[$this->context[$this->long_name]['var']]; $this->hint->text = $this->htext; $this->hint->html(); $this->hidden->html_head(); $this->tr->css_style['background'] = string_to_color('head'); $this->tr->css_style['color'] = bgcolor_to_color(string_to_color('head')); $this->tbl->html_head(); $this->tr->html_head(); $this->txt->text = 'field'; $this->td->html(); $this->td->id_alloc(); $this->txt->text = 'old'; $this->td->html(); $this->td->id_alloc(); $this->txt->text = 'new'; $this->td->html(); $this->td->id_alloc(); $this->tr->html_tail(); $this->tr->id_alloc(); if (is_array($var)) { foreach ($var as $i => $rv) { $this->tr->css_style['background'] = string_to_color($i, 1); $this->tr->css_style['color'] = bgcolor_to_color($this->tr->css_style['background']); $this->tr->html_head(); $this->txt->text = $i; $this->td->html(); $this->td->id_alloc(); foreach ($rv as $v) { $this->txt->text = $v; $this->td->html(); $this->td->id_alloc(); } $this->tr->html_tail(); $this->tr->id_alloc(); } } $this->tbl->html_tail(); $this->hidden->html_tail(); }