diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index e3d7cbdb95..ce9a074c27 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -28,16 +28,9 @@ list(,$this->user_agent,$this->ua_version) = $parts; $this->user_agent = strtolower($this->user_agent); - $this->prefered_img_title = $this->user_agent == 'mozilla' && $this->ua_version < 5 ? 'alt' : 'title'; - //echo "
HTTP_USER_AGENT='$GLOBALS[HTTP_USER_AGENT]', UserAgent: '$this->user_agent', Version: '$this->ua_version', img_title: '$this->prefered_img_title'
\n"; - - $this->document_root = $_SERVER['DOCUMENT_ROOT']; - // this is because some webservers report their docroot without the leading slash - if (!is_dir($this->document_root) && is_dir('/'.$this->document_root)) - { - $this->document_root = '/' . $this->document_root; - } - //echo "_SERVER[DOCUMENT_ROOT]='$_SERVER[DOCUMENT_ROOT]', this->document_root='$this->document_root'
\n"; + $this->netscape4 = $this->user_agent == 'mozilla' && $this->ua_version < 5; + $this->prefered_img_title = $this->netscape4 ? 'alt' : 'title'; + //echo "HTTP_USER_AGENT='$_SERVER[HTTP_USER_AGENT]', UserAgent: '$this->user_agent', Version: '$this->ua_version', img_title: '$this->prefered_img_title'
\n"; if ($GLOBALS['phpgw']->translation) { @@ -373,6 +366,24 @@ return $html; } + function progressbar( $percent,$title='',$options='',$width='',$color='',$height='' ) + { + $percent = (int) $percent; + if (!$width) $width = '30px'; + if (!$height)$height= '5px'; + if (!$color) $color = '#D00000'; + $title = $title ? $this->htmlspecialchars($title) : $percent.'%'; + + if ($this->netscape4) + { + return $title; + } + return '