Файл: exp.php
Строк: 25
<?
include_once("files/zag.php");
include_once("files/ini.php");
$polz=mysql_query("SELECT * FROM `users` WHERE `udata0`='$log' AND `udata1`='$pas' LIMIT 1");
if(mysql_num_rows($polz)==0){
header ("Location: index.php?error");
echo'<div class="p">Ошибка! Пользователь с таким логином и паролем не зарегистрирован, или пароль/логин неверен! <a href="index.php">На главную</a><br>';exit;
}else{
include_once("files/opit.php");
$max = "100";
$now = "$exp";
$health = 100 / ($max / $now);
$img="exp.gif";
$pic = ImageCreateFromgif($img);
header('Content-Type: image/png');
$black = imagecolorallocate($pic, 0, 0, 0);
$red = imagecolorallocate($pic, 0, 255, 0);
imagefilledpolygon($pic, array(255,0, 0,20, $health,20, $health,0), 4, $black);
imagestring($pic, 1, 3, 2, 'EXP: '.number_format($now).'/'.number_format($max).'', $red);
imagepolygon($pic, array(0,0, 0,11, 99,11, 99,0), 4, $white);
ob_end_clean();
imagegif($pic);
}
?>