id = $id; $this->cols = $cols; $this->action = $action; $this->rows = array(); } function addLine($cols) { $this->rows[] =& $cols; } function addLines($rows) { for($i = 0; $i < count($rows); $i++) $this->rows[] =& $rows[$i]; } function getHtml() { $html = ""; $actions = ""; $html .= "id\" class=\"listview\" cellspacing=\"0\">\n"; $html .= "\n"; $actions .= " onmousedown=\"this.className = 'listview_head_down'\""; $actions .= " onmouseup=\"this.className = 'listview_head'\""; $actions .= " onmouseover=\"this.className = 'listview_head_over'\""; $actions .= " onmouseout=\"this.className = 'listview_head'\""; for($i = 0; $i < count($this->cols); $i++) { $html .= "\n"; } $html .= "\n"; $color = False; $color_actions = ""; $plain_actions = ""; $color_actions .= " onmousedown=\"this.className = 'listview_line_down'\""; $color_actions .= " onmouseup=\"this.className = 'listview_line_over'\""; $color_actions .= " onmouseover=\"this.className = 'listview_line_over'\""; $color_actions .= " onmouseout=\"this.className = 'listview_color_line'\""; $plain_actions .= " onmousedown=\"this.className = 'listview_line_down'\""; $plain_actions .= " onmouseup=\"this.className = 'listview_line_over'\""; $plain_actions .= " onmouseover=\"this.className = 'listview_line_over'\""; $plain_actions .= " onmouseout=\"this.className = 'listview_plain_line'\""; for($i = 0; $i < count($this->rows); $i++) { if($color) { $html .= "\n"; $color = False; } else { $html .= "\n"; $color = True; } for($j = 0; $j < count($this->cols); $j++) { $html .= "\n"; } $html .= "\n"; } $html .= "\n"; $html .= "
\n"; $html .= $this->cols[$i]; $html .= "
rows[$i][0], $this->action)."\">\n"; $html .= $this->rows[$i][$j]; $html .= "
cols)."\"> 
\n"; return $html; } } ?>