Вход Регистрация
Файл: hunting/index.php
Строк: 108
<?
require_once'../core/system.php';
echo 
only_reg();
echo 
ban();
echo 
blok();
$header='Охота';
require_once
'../core/head.php';
mysql_query("UPDATE `user` set `mesto` = 'Охота', `battle` = '0' where `id` = '".$user['id']."'");

if(
$user['level']<15){header('location: /'); $_SESSION['err'] = 'Доступно только с 15 уровня';}
/* if($user['prava']<4 && $user['nick']!='Infidel'){header('location: /'); $_SESSION['err'] = 'Ведутся технические работы';} */

$ruq mysql_query("SELECT * from `hunting` where `usr` = '$user[id]'");
$hnt mysql_fetch_array($ruq);
$anto mysql_num_rows($ruq);
if(
$hnt['close']==&& $anto>0){mysql_query("UPDATE `hunting` set `close` = '1' where `usr` = '$user[id]'"); header("Location: /hunting/"); }


$req mysql_query("SELECT * from `hunting` where `usr` = '$user[id]' and `time`>'$tm'");
$hunt mysql_fetch_array($req);
$avto mysql_num_rows($req);

$recharge=$hunt['time']-time();
$hours floor($recharge 3600);
if(
$hours && $hours<10)
{
$h='0'.$hours.'';}
if(
$hours >= 10){$h=''.$hours.'';}
if(
$hours == 0){$h='00';}

$minutes floor($recharge 60) % 60;
if(
$minutes && $minutes<10)
{
$m='0'.$minutes.'';}
if(
$minutes >= 10){$m=''.$minutes.'';}
if(
$minutes == 0){$m='00';}

$seconds $recharge $minutes*60 $hours*3600;
if(
$seconds && $seconds<10)
{
$s='0'.$seconds.'';}
if(
$seconds >=10){$s=''.$seconds.'';}
if(
$seconds == 0){$s='00';}
if(
$h==0){$de="$m:$s";}
if(
$h>0){$de="$h:$m:$s";}
echo
"<img src='/images/hunting.jpg' width='100%'><hr>
<div class='foot grey center'>На вашем пути могут появиться очень опасные монстры!</div><hr>"
;
if(
$avto==and $hnt['status']==0){echo'<div class="head center grey"><div class="empty2"></div>Продолжительность: <font color="BFBFBF">6 часов.</font><div class="empty2"></div></div><hr>';}
if(
$avto>and $hunt['status']==0){echo'<div class="head center grey"><div class="empty2"></div>До завершения: <font color="BFBFBF">'.$de.'</font><div class="empty2"></div></div><hr>';}

if(
$avto==and ($hnt['status']==or $hnt['status']==2)){echo'<div class="foot"><a class="mini-fight" href="go">Отправиться в путь</a></div>';}
if(
$avto>and $hunt['status']==0){echo'<div class="head"><a class="mini-fight" href="?">Обновить</a></div>';}
if(
$anto>and $hnt['status']==1){echo'<div class="foot"><a class="mini-fight" href="finish">Завершить охоту</a></div>';}

if(
$hnt['level']==1){$st=50; }
if(
$hnt['level']==2){$st=100;}
if(
$hnt['level']==3){$st=300;}
if(
$hnt['level']==4){$st=700; }
if(
$hnt['level']==5){$st=1200; }
if(
$hnt['level']==6){$st=2800; }
if(
$hnt['level']==7){$st=4000;}
if(
$hnt['level']==8){$st=5500; }
if(
$hnt['level']==9){$st=8000; }
if(
$hnt['level']==10){$st=10000; }
if(
$hnt['level']==11){$st=14000; }
$st=floor($st*0.70);
if(
$hnt['level']==12){}
$go=floor($hnt['gold']/100);
$gold=$hnt['gold'];
$b=mb_strlen($gold);
$s=$gold[$b-2].$gold[$b-1];
if(
$anto>0){
echo
'<hr><div class="head"><div class="empty"></div><div class="grey center">Уровень охотника:<font color="BFBFBF"> '.$hnt['level'].' / 12</font></br>
Деньги: <img src="/images/icon/gold.png">'
.$go.' <img src="/images/icon/silver.png">'.$s.' </br>
Опыт: <img src=/images/icon/exp.png><font color="BFBFBF"> '
.$hnt['exp'].' </font>
</div><div class="empty"></div></div>'
;

echo
'</div><hr><div class="head">
<a class="inpc-ar center" href="up"><img src="/images/icon/level.png"> Повысить уровень <img src="/images/icon/gold.png">'
.$st.' <font color="#D5D539">-30%</font></a></div></div>'// (<font color="F2F745">-35%</font>)
}
echo
'<hr><div class="mli"><div class="empty"></div><div class="grey center mli">Чем выше уровень охотника, тем больше награда!</div><div class="empty"></div></div>';

require_once
'../core/foot.php';
?>
Онлайн: 2
Реклама