mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 14:54:52 +02:00
2006-11-05 Sancho Lerena <slerena@artica.es>
* images/outlimits.png: Static image for progress bar out of limits. * reporting/fgraph.php: Progress bar now show static image if there is out of limits before calculating (faster). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@249 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6dcfcc7bdf
commit
24e89df213
BIN
pandora_console/images/outlimits.png
Normal file
BIN
pandora_console/images/outlimits.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 321 B |
@ -1388,7 +1388,6 @@ function progress_bar($progress,$width,$height) {
|
||||
|
||||
//$rating = $_GET['rating'];
|
||||
$ratingbar = (($rating/100)*$width)-2;
|
||||
|
||||
$image = imagecreate($width,$height);
|
||||
//colors
|
||||
$back = ImageColorAllocate($image,255,255,255);
|
||||
@ -1414,7 +1413,15 @@ function progress_bar($progress,$width,$height) {
|
||||
imagePNG($image);
|
||||
imagedestroy($image);
|
||||
}
|
||||
// Show header
|
||||
Header("Content-type: image/png");
|
||||
// If progress is out limits, show static image, beware of image size!
|
||||
if ($progress > 100 || $progress < 0){
|
||||
$imgPng = imageCreateFromPng("../images/outlimits.png");
|
||||
imageAlphaBlending($imgPng, true);
|
||||
imageSaveAlpha($imgPng, true);
|
||||
imagePng($imgPng);
|
||||
} else
|
||||
drawRating($progress,$width,$height);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user