value_ = $value; $this->width_ = $width; $this->text_ = $text; $this->max_ = $max; $this->class_ = "bar"; } function generate() { if ( $this->text_ == "" ) $this->text_ = " "; if ( $this->value_ ) $width = $this->width_ / ( $this->max_ / $this->value_ ); else $width = 0; $html = "
".$this->text_."
"; return $html; } function setLow( $low, $class ) { if ( $this->value_ <= $low ) $this->class_ = "bar-".$class; } } ?>