<?
ob_start();
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("include/check2.php");
include 'include/ini.php';
$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
/////////////////////////////////////////////////////
$text = @file("MySql/base123/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
include_once("include/sesi.php");
if (isset($user)) {






$max = $udata[30];
$now = $udata[29];
$health = 100 / ($max / $now);

$img="pic/mp.gif";
$pic = ImageCreateFromgif($img);
header('Content-Type: image/gif');

$black = imagecolorallocate($pic, 0, 0, 0);
$white = imagecolorallocate($pic, 0, 0, 0);
imagefilledpolygon($pic, array(255,0, 0,20, $health,20, $health,0), 4, $black);


imagestring($pic, 1, 3, 2, 'MP:  '.number_format($now).'/'.number_format($max).'', $white);
imagepolygon($pic, array(0,0, 0,11, 99,11, 99,0), 4, $white);
ob_end_clean();
imagegif($pic);

}
?>

