id = $id; $this->row_count = $row_count; $this->col_count = $col_count; $this->debug = $debug; $this->style = ""; $this->spacing = ""; $this->padding = ""; $this->elems = array(); $this->forms = array(); for($i = 0; $i < $row_count; $i++) { $this->forms[$i] = ""; for($j = 0; $j < $col_count; $j++) $this->elems[$i][$j] = " "; } } function add($elem, $row, $col, $width = False, $height = False, $style = "") { $this->elems[$row][$col] = array($elem, $width, $height, $style); } function addFormRow($form_name, $action, $row_number, $values = array()) { $this->forms[$row_number] = array($form_name,$action,$values); } function setStyle($style) { $this->style = $style; } function getHtml() { $html = ""; $html .= "id\" class=\"table\" style=\"".$this->style."\" "; if($this->debug) $html .= "border=\"1\" "; $html .= "cellspacing=\"$this->spacing\" cellpadding=\"$this->padding\" style=\"\">\n"; for($i = 0; $i < $this->row_count; $i++) { $html .= "\n"; if($this->forms[$i] != "") { $html .= "forms[$i][0]."\" action=\"".$this->forms[$i][1]."\" method=\"POST\">\n"; for($j = 0; $j < count($this->forms[$i][2]); $j++) $html .= "forms[$i][2][$j][0]."\" value=\"".$this->forms[$i][2][$j][1]."\">\n"; } for($j = 0; $j < $this->col_count; $j++) { if($this->elems[$i][$j] == " ") { $html .= "\n"; } else { if($this->elems[$i][$j][1] == "True") $width = "100%"; elseif($this->elems[$i][$j][1] == "False") $width = "1%"; else $width = $this->elems[$i][$j][1]; if($this->elems[$i][$j][2] == "True") $height = "100%"; elseif($this->elems[$i][$j][2] == "False") $height = "1%"; else $height = $this->elems[$i][$j][2]; $html .= "\n"; } } if($this->forms[$i] != "") { $html .= ""; $html .= "\n"; } $html .= "\n"; } $html .= "
\n"; $html .= $this->elems[$i][$j]; $html .= "elems[$i][$j][3]."\">\n"; $html .= $this->elems[$i][$j][0]->getHtml(); $html .= "
\n"; return $html; } } ?>