<?php $percent = 0; { $percent = $_GET['p']; $perx = $percent + 1; } else { $percent = 0; } if ($percent >= 100) { $percent = 100; $perx = 80; } elseif ($percent < 1) { $percent = 0; $perx = 85; } elseif ($percent < 10) { $perx = 85; } else { $perx = 83; } $text = ''; { $text = $_GET['t']; } { } $r = 255-(.83*$percent); $g = 63+(1.92*$percent); $b = 66-(.03*$percent); $img = imagecreatetruecolor(50, 10); $bg = imagecolorallocate($img, 98, 99, 99); $fg = imagecolorallocate($img, 255, 255, 255); $pg = imagecolorallocate($img, $r, $g, $b); imagefilledrectangle($img, 0, 0, 98, 10, $bg); imagefilledrectangle($img, 1, 1, 98, 8, $fg); if ($percent != 0) { imagefilledrectangle($img, 1, 1, $percent*0.5, 8, $pg); } imagestring($img, 1, 2, 1, $text, $bg); imagepng($img); imagedestroy($img); ?>
Za wszelką pomoc będę wdzięczny : )