<?php
require'f_eroul.php';
$titlu='Joaca eroul';
require'f_sus.php';
if($de>0)
require'f_nou.php';
echo$div[4].img('erou.jpg',1).'Joaca eroul '.$adresasite[2].$div[5];
if($erou[1]>100)
$conn->query('UPDATE`eroul`SET`viata`="100"WHERE`de`="'.$de.'"');
if($erou[3]<1)
$conn->query('UPDATE`eroul`SET`putere`="100"WHERE`de`="'.$de.'"');
if($erou[0]<1)
$conn->query('UPDATE`eroul`SET`bani`="0"WHERE`de`="'.$de.'"');
if($page==1)
{
if($erou[0]<2500)
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Nu ai destui bani pentru a lua erou Premium!';
else
{
if(!$erou[4]==1)
{
$ti1=$conn->query('UPDATE`eroul`SET`premiu`="1",`premiudata`="'.($_SERVER['REQUEST_TIME']+30*86400).'",`bani`=bani-2500 WHERE`de`="'.$de.'"');
if($ti1)
echo$div[4].'<img src="'.$domenii_statice[1].'actiune_check.png" alt="" width="16" height="16" />Succes!'.$div[5].$div[6].'Ai eroul Premium activat pentru 30 zile!';
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7];
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Ai activat eroul Premium!';
}
echo$div[0];
}
if($erou[5]<$_SERVER['REQUEST_TIME'])
{
if($conn->query('UPDATE`eroul`SET`premiu`="0"WHERE`de`="'.$de.'"'))
echo$div[4].'Erou Premium'.$div[5].$div[1].'<a href="/joaca-eroul/pagina/1">Activeaza pt 2.500 bani!</a>'.$div[0];
}
if($pid>0)
{
$timptrecut=$erou[2]+200;
if($timptrecut>$_SERVER['REQUEST_TIME'])
{
require'f_ramas.php';
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Ai incarcat viata eroului!<br />Urmatoarea incarcare a vietii peste <strong>'.ramas($timptrecut-$_SERVER['REQUEST_TIME']).'</strong>'.$div[0];
}
else
{
if($erou[1]>99)
echo$div[1].'Momentan ai viata 100%'.$div[0];
else
{
$daaaa=$conn->query('UPDATE`eroul`SET`timpviata`="'.$_SERVER['REQUEST_TIME'].'"WHERE`de`="'.$de.'"');
if($daaaa)
{
$catareviatza=$erou[1]+rand(1,15);
$conn->query('UPDATE`eroul`SET`viata`="'.$catareviatza.'"WHERE`de`="'.$de.'"');
echo$div[4].'<img src="'.$domenii_statice[1].'actiune_check.png" alt="" width="16" height="16" />Succes!'.$div[5].$div[6].'Viata incarcata de la <strong>'.$erou[1].'%</strong> la <strong>'.$catareviatza.'%</strong>'.$div[0];
}
}
}
}
$catesunt=$conn->query('SELECT COUNT(*)FROM`eroul`')->fetch_row();
$catinoi=$conn->query('SELECT COUNT(*)FROM`eroul`WHERE`premiu`="1"')->fetch_row();
echo$div[1].'<a href="/joaca-eroul/id/1">Incarca Viata!</a>'.$div[0].$div[1].'<a href="/nivel-erou">Nivel erou</a>'.$div[0].$div[1].'<a href="/aventuri-erou">Aventuri erou</a>'.$div[0].$div[1].'<a href="/transfera-bani-eroul">'.img('transfer.png',2).'Transfera Bani</a>'.$div[0].'---<br />'.$div[1].'<a href="/inventar-eroul">Inventar eroul</a>'.$div[0].$div[1].'<a href="/informatii-eroul">Informații joc</a>'.$div[0].$div[1].'<a href="/informatii-eroul-premium">Informații eroul Premium</a>'.$div[0].$div[1].'<a href="/jucatori-eroul">Jucatori eroul</a> <strong>'.number_format($catesunt[0]).'</strong>'.$div[0].$div[1].'<a href="/jucatori-eroul-premium">Jucatori eroul Premium</a> <strong>'.number_format($catinoi[0]).'</strong>'.$div[0].$div[1].'<a href="/top-bani-eroul">'.img('topuri.gif',2).'Top bani eroul</a>'.$div[0].$div[1].'<a href="/top-nivel-eroul">'.img('topuri.gif',2).'Top nivel eroul</a>'.$div[0].$div[1].'<a href="/top-vizite-eroul">'.img('topuri.gif',2).'Top vizite eroul</a>'.$div[0];
require'f_jos.php';