Вход Регистрация
Файл: statika.php
Строк: 38
<?
$dbhost
="localhost";
$dbname="hAv78AnvxFq";
$dbuser="QyteTquBagQve";
$dbpass="YQF458Q5avapu8q7QJkA";
$lin=mysql_connect($dbhost,$dbuser,$dbpass) or die("Не могу подключиться к серверу БД");
mysql_select_db($dbname,$lin) or die("Не могу подключиться к БД");
mysql_query("SET NAMES utf8");
mysql_query("set character_set_client='utf8'");
mysql_query("set character_set_results='utf8'");
mysql_query("set collation_connection='utf8'");

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

$image imagecreatetruecolor(102,10);
$fiol  imagecolorallocate($image85,  51,  213);
$white imagecolorallocate($image255255255);
$blue  imagecolorallocate($image200210255);
$gold  imagecolorallocate($image253211122);
$red  imagecolorallocate($image24812684);
$orange imagecolorallocate($image2552300);
$green imagecolorallocate($image02550);
$black imagecolorallocate($image000);

imagefill($image00$fiol);
imagefilledrectangle($image11,  1008$white);

# 200     400      600       800    1000
# blue -> green -> orange -> red -> gold


if ( $p <= 200 && $p ) {

$blue  imagecolorallocate($image200210255);
$p round( ($p) / 100 100 );
imagefilledrectangle($image11$p8$blue);

}

else if ( 
$p <= 400 && $p 200 ) {

$z 100;
imagefilledrectangle($image11$z8$blue);
$p round( ( $p 200 ) / 200 100 );
imagefilledrectangle($image11$p8$green);

}

else if ( 
$p <= 600 && $p 400 ) {

$z 100;
imagefilledrectangle($image11$z8$blue);
$p round( ( $p 400 ) / 400 100 );
imagefilledrectangle($image11$p8$orange);

}

else if ( 
$p <= 800 && $p 600 ) {

$z 100;
imagefilledrectangle($image11$z8$blue);
$p round( ( $p 400 ) / 400 100 );
imagefilledrectangle($image11$p8$red);

}

else if ( 
$p 800 ) {

$z 100;
imagefilledrectangle($image11$z8$blue);
$p round( ( $p 400 ) / 400 100 );
imagefilledrectangle($image11$p8$gold);

}

imagestring($image1401$p.''$black);

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

?>
Онлайн: 1
Реклама