Файл: inc/proffa_healer.php
Строк: 15
<?
$req = mysql_query("SELECT * FROM `proffa` WHERE `id_account`= '$account[id]' and `id_proffa`='1' ");
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req)){
$hp=$account[hpall]/100*$mag[priz];
$tip=$account[hpall]-$account[hp];
echo"<br>Восстановлено $mag[priz]% <img src='/pic/main/hp.png' alt='*'/> здоровья<br>";
if($hp>$tip){
mysql_query("UPDATE `account` SET `hp`='$account[hpall]' WHERE `id`='$account[id]'");
}else{
mysql_query("UPDATE `account` SET `hp`=`hp`+'$hp' WHERE `id`='$account[id]'");
}
}}
?>