msg_empty=$msg_empty; $this->after_header_html=""; $this->before_footer_html=""; } function setAfterHeader($html) { $this->after_header_html = $html; } function setBeforeFooter($html) { $this->before_footer_html = $html; } function addRow($row) { $this->rows = array_merge($this->rows, array($row)); } // Private function setHeader($header) { $this->header = $header; } // Private function showHeader($class="tableinfo") { echo ""; echo "\n"; echo ""; while(list($num,$element)=each($this->header)) { echo ""; } echo ""; echo "\n"; } // Private function showFooter() { echo "
".$element."
"; echo "\n"; } // Private function showRow($elements, $rownum) { if($rownum%2 == 1) { echo ""; } else { echo ""; } while(list($num,$element)=each($elements)) { if(is_array($element)&&isset($element["hide"])&&($element["hide"]==1)) continue; if(is_array($element)) { if(isset($element["class"])) echo "".$element["value"].""; else echo "".$element["value"].""; } else { echo "".$element.""; } } echo ""; echo "\n"; } function show() { $this->showHeader(); echo $this->after_header_html."\n"; while (list($num,$row) = each($this->rows)) { $this->showRow($row,$num); } if(count($this->rows) == 0) { echo "".$this->msg_empty."\n"; } echo $this->before_footer_html."\n"; $this->showFooter(); } } ?>