Вход Регистрация
Файл: stamina.php
Строк: 41
<?php


  $max 
$_GET['max'];

  if(
$max <= 0$max 1;

  
$min $_GET['min'];
  
  if(
$min <= 0$min 1;

  
$progress round(100/($max/$min));

  
header('Content-Type: image/gif');
  
  switch(
$_GET['type']){
  
  case 
'hp':

  
$full imagecreatefromgif('img/stamina/hp_full.gif');
  
  
$null imagecreatefromgif('img/stamina/hp_null.gif'); 
  
  
imagecopy($full$null$progress00010010); 

  
$color imagecolorallocate($full245245245);
  
  
imagestring($full151"HP    $min/$max"$color);  

  break;
  
  case 
'mp':

  
$full imagecreatefromgif('img/stamina/mp_full.gif');
  
  
$null imagecreatefromgif('img/stamina/mp_null.gif'); 
  
  
imagecopy($full$null$progress00010010); 

  
$color imagecolorallocate($full245245245);
  
  
imagestring($full151"MP    $min/$max"$color);

  break;

  case 
'exp':

  
$full imagecreatefromgif('img/stamina/exp_full.gif');
  
  
$null imagecreatefromgif('img/stamina/exp_null.gif'); 
  
  
imagecopy($full$null$progress00010010); 

  
$color imagecolorallocate($full245245245);
  
  
imagestring($full151"EXP   $progress%"$color);

  break;

  case 
'cp':

  
$full imagecreatefromgif('data/img/stamina/cp_full.gif');
  
  
$null imagecreatefromgif('data/img/stamina/cp_null.gif'); 
  
  
imagecopy($full$null$progress00010010); 

  
$color imagecolorallocate($full245245245);
  
  
imagestring($full151"CP    $now/$max"$color);

  break;

  case 
'vp':

  
$full imagecreatefromgif('data/img/stamina/vp_full.gif');
  
  
$null imagecreatefromgif('data/img/stamina/vp_null.gif'); 
  
  
imagecopy($full$null$progress0001002); 

  break;
  
  }

  
imagegif($full);
  
  
imagedestroy($full);

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