3) $color=$red; else $color=$darkyellow; if( strstr($label,"%s")) { $label=expand_trigger_description(DBget_field($result1,0,1)); } } else if($count>1) { $color=$red; $label=$count." problems"; } else { $color=$darkgreen; $label="OK"; } } $x1=$x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2; $y1=$y+ImageSY($img)+ImageFontHeight(2); ImageFilledRectangle($im,$x1-2, $y1,$x1+ImageFontWidth(2)*strlen($label), $y1+ImageFontHeight(2),$white); ImageString($im, 2, $x1, $y1, $label,$color); # ImageFilledRectangle($im,$x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2-2, $y+ImageSY($img),$x+ImageSX($img)/2+ImageFontWidth(2)*strlen($label)/2, $y+ImageSY($img)+ImageFontHeight(2),$white); # ImageString($im, 2, $x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2, $y+ImageSY($img)+ImageFontHeight(2), $label,$color); # ImageDestroy($img); } ImageStringUp($im,0,imagesx($im)-10,imagesy($im)-50, "http://zabbix.sourceforge.net", $gray); ImagePng($im); ImageDestroy($im); ?>