<?

$p = (int)$_GET['p'];

$image = imagecreatetruecolor(102,10);
$gold  = imagecolorallocate($image, 253, 211, 122);
$red  = imagecolorallocate($image, 248, 126, 84);
$black = imagecolorallocate($image, 0, 0, 0);



if ( $p < 0 ) {
$z = 100;
imagefilledrectangle($image, 1, 1, $z, 8, $red);
imagefilledrectangle($image, 1, 1, $p, 8, $red);

}
else if ( $p > 0 ) {
$z = 100;
imagefilledrectangle($image, 1, 1, $z, 8, $gold);
imagefilledrectangle($image, 1, 1, $p, 8, $gold);
}

imagestring($image, 1, 40, 1, $p , $black);

header('Content-Type: image/gif');
imagegif($image);
imagedestroy($image);

?>