/*
PHP Table class - Data aquisition and rendering framework
Copyright (C) 2002 Richard Clark (rclark@exorsus.net)
See the GNU General Public License included with this software
for more details. If none is included you have NO LICENSE to
operate this software and should contact the author immediately.
*/
require_once('table_render.inc');
class Table_Render_HTML extends Table_Render {
var $class;
var $class_shaded;
var $class_total;
function Table_Render_HTML($class="table_render",$class_shaded="table_render_shaded", $class_total="table_render_total") {
$this->class=$class;
$this->class_shaded=$class_shaded;
$this->class_total=$class_total;
}
function render_table_start() {
?>
}
function render_table_end() {
?>
}
function render_empty() {
?>
| No results |
}
function render_header($value,$field="") {
global $PHP_SELF;
$method = "render_header_$value";
if (method_exists($this, $method)) {
$this->$method($value);
} else {
?>=ucfirst($value)?> |
}
}
function render_row_start() {
?>count % 2) ? "class=\"$this->class_shaded\"" : "")?>>
$this->count++;
}
function render_row_end() {
?>
}
function render_element($fieldname, $value) {
$method = "render_element_$fieldname";
if (method_exists($this, $method)) {
$this->$method($value);
} else {
?>=$value?> |
}
}
function render_total_start() {
?>
}
function render_total($fieldname, $value) {
$method = "render_total_$fieldname";
if (method_exists($this, $method)) {
$this->$method($value);
} else {
?>| =$value?> |
}
}
function render_total_end() {
?>
}
};
?>