<?php
/*
    ANISEED, NISEED System and Database
    Copyright (C) 2007 Olivier Tassy, Fabrice Daian, Patrick Lemaire

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/
    $value=$_GET["value"];
 
    Header("Content-Type: image/png");
    $im_height = 14;
    $im_width  = 300;
    $im = ImageCreate($im_width,$im_height);
 
    $color = ImageColorAllocate($im, 255, 0, 0);
    $black = ImageColorAllocate($im, 0, 0, 0);
    $white = ImageColorAllocate($im, 225, 225, 225);
    
    imagefilledrectangle ($im, 0, 0, $im_width, $im_height, $white);
    imagefilledrectangle ($im, 0, 0, ($im_width/100)*$value, $im_height, $color);
    
 
    ImageString($im, 3,  10, 0, ($value/4)." ".chr(176)."/oo", $black);
    imagerectangle ($im, 0, 0, $im_width-1, $im_height-1, $black);
	
    ImagePNG($im);
    ImageDestroy($im);
 
?>