<?
include_once '../../sys/inc/home.php';


$set['antidos']=0;

if (!isset($_GET['p']))exit;
$p=max(0,min(100,intval($_GET['p'])));
$rate=trim(stripcslashes(htmlspecialchars($_GET['rate'])));
$p=max(0,min(100,intval($_GET['p'])));
$k=max(0,intval(@$_GET['k']));
$a=max(0,intval(@$_GET['a']));

$x=80;
$y=12;

$x2=@intval($x/(100/$p));


$img=imagecreate($x,$y);


$col['back']=imagecolorallocate($img, 255,255,255);
$col['draw']=imagecolorallocate($img, 173,206,230);
$col['font']=imagecolorallocate($img, 0,0,0);
$col['border']=imagecolorallocate($img, 72,61,139);

imagefill($img, $x, $y, $col['back']);

imagefilledrectangle($img, 0, 0, $x2, $y, $col['draw']);

imagerectangle($img, 0, 0, $x-1, $y-1, $col['border']);

imagettftext ($img, 7, 0, $x/14, $y-2, $col['font'], H.'sys/fonts/tahoma.ttf', "$rate $p%");





header("Content-type: image/png");
imagepng($img);
?>

