<?php

require_once 'core/system.php';








head('Турнир');




reg(); 

?><style> .section._decor {    padding: 10px 18px 15px 18px;}.section._decor {    background:         url('/img/section/decor-tl.png') 0 0 no-repeat,         url('/img/section/decor-tr.png') 100% 0 no-repeat,         url('/img/section/decor-bl.png') 0 100% no-repeat,        url('/img/section/decor-br.png') 100% 100% no-repeat #16161e !important;    color: inherit;} .section._decor {        background-image: url('/img/section/decor_tl_x2.png'),        url('/img/section/decor_tr_x2.png'),        url('/img/section/decor_bl_x2.png'),        url('/img/section/decor_br_x2.png') !important;        background-size: 22px 22px !important;    } </style><?













?><img src="/img/new/tour.jpg" width="100%"><? 










if($_SERVER['REQUEST_URI']=='/new_tour.php'){

?><div class="b_tabs font-small mt10">

<div class="b_tabs">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody style="vertical-align: bottom;">
<tr>
<td>
<span class="tab first active">
Герои
</span>
</td><td>
<a href="/new_tour.php?clan" class="tab last">
Кланы

</a>
</span>
</td><td>
<a href="/new_tour.php?pet" class="tab last">
Питомцы

</a> 
</td>
</tr></tbody>
</table>
</div>

</div><? 


}


if($_SERVER['REQUEST_URI']=='/new_tour.php?clan'){ 
?><div class="b_tabs font-small mt10">

<div class="b_tabs">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody style="vertical-align: bottom;">  
    <tr>
<td>
<a href="/new_tour.php?h" class="tab first">
Герои

</a>
</td><td>
<span class="tab last active">
Кланы

</span>
</span>
</td><td>
<a href="/new_tour.php?pet" class="tab last">
Питомцы

</a>  
</td>
</tr></tbody>
</table>
</div>

</div>
<?

}

if($_SERVER['REQUEST_URI']=='/new_tour.php?pet'){ 
?><div class="b_tabs font-small mt10">

<div class="b_tabs">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody style="vertical-align: bottom;">  
    <tr>
<td>
<a href="/new_tour.php?h" class="tab first">
Герои

</span>
</a>
</td><td>

<a href="/new_tour.php?clan" class="tab last">
Кланы

</a>
</span> 

</td><td>
<span class="tab last active">

Питомцы

</a>  
</td>
</tr></tbody>
</table>
</div>

</div>
<?

}

if(isset($_GET['cart'])){

?><div class="b-panel-new dblue-panel bordered mt2">


<div class="panel-inner-2"><div class="font-small text-italic c-verygray">Локации в которых возможно найти кристаллы <span class="info"> Призрачный Лес - шанс 40% с vip 70%</br>Обитель Теней - шанс 35% с vip 65%</br> Сумеречная Шахта - шанс 30% с vip 60%</div></div></div><?



foot();exit;

}






if(isset($_GET['h'])){ $_SESSION['try']=0; header('location:new_tour.php');exit;}




if(isset($_GET['clan'])){

$_SESSION['try']=1;
?><div class="section _decor mt2">
<div class="font14 center text-gold">Собирайте кристаллы увеличивая свой прогресс</div>




<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt5 table-raiting">
<tbody>
<tr valign="top">


<?





$yh = 0;

$by = $dbc->query("SELECT * FROM `clan` WHERE `tour`>0  ORDER BY `tour` desc limit 10");




$gold = 600; //сколько даем золота





?><table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt5 table-raiting">
<tbody>
<?

while($de=$by->fetch_assoc()){


$gold  = $gold -50;

$yh++;

?>
<tr valign="top">
<td><span><?=$yh?>.</span>
<span class="nowrap"><img src="img/clan_s/<?=$de['storona']?>.png" width="14" height="14" alt="*"><b><a href="clan.php?clan=<?=$de['id']?>"><?=$de['name']?></b></a>(<img src="img/money/money.png"><?=$gold?>)<td align="right"> (<img src="img/new/kr.png"><?=$de['tour']?>)</td></span>




















</td>

<?



}



















?></tr>


</tbody>
</table>

</div><?



foot();exit;}


if(isset($_GET['pet'])){

$_SESSION['try']=2;
?><div class="section _decor mt2">
<div class="font14 center text-gold">Зарабатывай Кристаллы в турнире питомцев.</div>




<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt5 table-raiting">
<tbody>
<tr valign="top">


<?





$yh = 0;

$by = $dbc->query("SELECT * FROM `user_pets` WHERE `tour`>0  ORDER BY `tour` desc limit 10");




$gold = 370; //сколько даем золота
$leg = 105; //сколько даем осколков








?><table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt5 table-raiting">
<tbody>
<?

while($de=$by->fetch_assoc()){


$gold  = $gold -20;
$leg  = $leg -5;


$yh++;

?>
<tr valign="top">
<td><span><?=$yh?>.</span>
<span class="nowrap"><img src="img/icons/pet.png"><b><a href="pet.php?id=<?=$de['id_user']?>"><?=$de['name']?></b></a>(<img src="img/money/money.png"><?=$gold?><img src="img/new/leg.png"><?=$leg?>)<td align="right"> (<img src="img/new/kr.png"><?=$de['tour']?>)</td></span>























</td>

<?



}



















?></tr>


</tbody>
</table>

</div><?



foot();exit;}



?><div class="section _decor mt2">
<div class="font14 center text-gold">Собирайте кристаллы увеличивая свой прогресс</div>




<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt5 table-raiting">
<tbody>
<tr valign="top">
</td></br></br><?



$yh = 0;

$by = $dbc->query("SELECT * FROM `users` WHERE `tour`>0  ORDER BY `tour` desc limit 10");




$gold = 320; //сколько даем золота







?><table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt5 table-raiting">
<tbody>
<?

while($de=$by->fetch_assoc()){


$gold  = $gold -20;


$yh++;

?>
<tr valign="top">
<td><span><?=$yh?>.</span>
<span class="nowrap"><img src="img/class/<?=$de['storona']?>/<?=$de['pers']?>/pers.png" width="14" height="14" alt="*"><b><a href="pers.php?ank=<?=$de['id']?>"><?=$de['login']?></b></a>(<img src="img/money/money.png"><?=$gold?>)<td align="right"> (<img src="img/new/kr.png"><?=$de['tour']?>)</td></span>




















</td>

<?



}



















?></tr>


</tbody>
</table>

</div><?








?><a class="btn" href="new_tour.php?cart">Карта Кристаллов</a><?













foot();
