    <?
    $collections=mysql_fetch_array(mysql_query("SELECT * FROM `collections` WHERE `id_user` = '$ku[id]'"));
echo'<div class="event"><h1>Коллекции</h1></div>';
echo'<div class="block">';
echo'<center><span class="txt-md">Коллекции можно найти на всех локациях игры. Если у вас появилась строка <span class="title">Найдены фантики</span> - смело жмите на нее! Коллекции можно собирать <span class="title">неограниченное число раз</span></span></center>';
echo'<div class="event-delim"></div>';
echo'<h3>Времена года <span class="txt-md">(с 30 ур.)</span></h3>';
echo'<center><div class="quest-item">
<img src="/pavelgrey/img/collections/seasons01.png">
<div class="quest-progress">
'.$collections['seasons01'].'/30
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/seasons02.png">
<div class="quest-progress">
'.$collections['seasons02'].'/50
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/seasons03.png">
<div class="quest-progress">
'.$collections['seasons03'].'/20
</div></div></center>
<br>Награда: <span class="title"><img src="/images/icons/ruby.png"> 2 000 000</span>';
if($collections['seasons01']>=30 && $collections['seasons02']>=50 && $collections['seasons03']>=20)
{
    if(isset($_GET['seasons']))
    {
            mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']+2000000)."' WHERE `id` = '$ku[id]'");
            mysql_query("UPDATE `collections` SET `seasons01` = `seasons01` - '30', `seasons02` = `seasons02` - '50', `seasons03` = `seasons03` - '20' WHERE `id_user` = '$ku[id]'");
$_SESSION['msg']='Вы получили награду: [img]/images/icons/ruby.png[/img] 2 000 000';
header("location:/?collections");  
    }
    echo'<br><img src="/images/icons/tick.png"> <a href="/?collections&seasons">Обменять коллекцию</a>';
}
echo'</div>';
echo'<div class="block">';

echo'<h3>Питомцы <span class="txt-md">(с 50 ур.)</span></h3>';
echo'<center><div class="quest-item">
<img src="/pavelgrey/img/collections/animals01.png">
<div class="quest-progress">
'.$collections['animals01'].'/50
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/animals02.png">
<div class="quest-progress">
'.$collections['animals02'].'/40
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/animals03.png">
<div class="quest-progress">
'.$collections['animals03'].'/70
</div></div></center>
<br>Награда: <span class="title"><img src="/images/icons/money.png"> 50 000 000 000</span>';
if($collections['animals01']>=50 && $collections['animals02']>=40 && $collections['animals03']>=70)
{
       if(isset($_GET['animals']))
    {
            mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+50000000000)."' WHERE `id` = '$ku[id]'");
            mysql_query("UPDATE `collections` SET `animals01` = `animals01` - '50', `animals02` = `animals02` - '40', `animals03` = `animals03` - '70' WHERE `id_user` = '$ku[id]'");
$_SESSION['msg']='Вы получили награду: [img]/images/icons/money.png[/img] 50 000 000 000';
header("location:/?collections");  
    }
    echo'<br><img src="/images/icons/tick.png"> <a href="/?collections&animals">Обменять коллекцию</a>';
}

echo'</div>';
echo'<div class="block">';

echo'<h3>Цветы <span class="txt-md">(с 75 ур.)</span></h3>';
echo'<center><div class="quest-item">
<img src="/pavelgrey/img/collections/flowers01.png">
<div class="quest-progress">
'.$collections['flowers01'].'/50
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/flowers02.png">
<div class="quest-progress">
'.$collections['flowers02'].'/35
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/flowers03.png">
<div class="quest-progress">
'.$collections['flowers03'].'/30
</div></div></center>
<br>Награда: <span class="title"><img src="/images/icons/experience.png"> 15t</span>';
if($collections['flowers01']>=50 && $collections['flowers02']>=35 && $collections['flowers03']>=30)
{
       if(isset($_GET['flowers']))
    {
        $rat=15000000000000;
        $rat=double_exp(base_exp($rat));

            mysql_query("UPDATE `kolhoz_user` SET `rating` = '".($ku['rating']+$rat)."' WHERE `id` = '$ku[id]'");
            mysql_query("UPDATE `collections` SET `flowers01` = `flowers01` - '50', `flowers02` = `flowers02` - '35', `flowers03` = `flowers03` - '30' WHERE `id_user` = '$ku[id]'");
$_SESSION['msg']='Вы получили награду: [img]/images/icons/experience.png[/img] '.$rat.'';
header("location:/?collections");  
    }
    echo'<br><img src="/images/icons/tick.png"> <a href="/?collections&flowers">Обменять коллекцию</a>';
}



echo'</div>';
echo'<div class="block">';

echo'<h3>Cладости <span class="txt-md">(с 120 ур.)</span></h3>';
echo'<center><div class="quest-item">
<img src="/pavelgrey/img/collections/sweets01.png">
<div class="quest-progress">
'.$collections['sweets01'].'/40
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/sweets02.png">
<div class="quest-progress">
'.$collections['sweets02'].'/35
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/sweets03.png">
<div class="quest-progress">
'.$collections['sweets03'].'/60
</div></div></center>
<br>Награда: <span class="title"><img width="20" src="/pavelgrey/img/talents/gold.png"> 10 <img width="20" src="/pavelgrey/img/talents/green.png"> 15 <img width="20" src="/pavelgrey/img/talents/pink.png"> 7 <img width="20" src="/pavelgrey/img/talents/blue.png"> 15</span>';
if($collections['sweets01']>=40 && $collections['sweets02']>=35 && $collections['sweets03']>=60)
{
          if(isset($_GET['sweets']))
    {
            mysql_query("UPDATE `kolhoz_user` SET `gold` = '".($ku['gold']+10)."', `green` = '".($ku['green']+15)."', `pink` = '".($ku['pink']+7)."', `blue` = '".($ku['blue']+15)."' WHERE `id` = '$ku[id]'");
            mysql_query("UPDATE `collections` SET `sweets01` = `sweets01` - '40', `sweets02` = `sweets02` - '35', `sweets03` = `sweets03` - '60' WHERE `id_user` = '$ku[id]'");
$_SESSION['msg']='Вы получили награду: [imgfont:20]/pavelgrey/img/talents/gold.png[/imgfont] 10 [imgfont:20]/pavelgrey/img/talents/green.png[/imgfont] 15 [imgfont:20]/pavelgrey/img/talents/pink.png[/imgfont] 7  [imgfont:20]/pavelgrey/img/talents/blue.png[/imgfont] 15 ';
header("location:/?collections");  
    }
    echo'<br><img src="/images/icons/tick.png"> <a href="/?collections&sweets">Обменять коллекцию</a>';
}



echo'</div>';
echo'<div class="block">';

echo'<h3>Фрукты <span class="txt-md">(с 200 ур.)</span></h3>';
echo'<center><div class="quest-item">
<img src="/pavelgrey/img/collections/fruit01.png">
<div class="quest-progress">
'.$collections['fruit01'].'/40
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/fruit02.png">
<div class="quest-progress">
'.$collections['fruit02'].'/55
</div>
</div><div class="quest-item">
<img src="/pavelgrey/img/collections/fruit03.png">
<div class="quest-progress">
'.$collections['fruit03'].'/40
</div></div></center>
<br>Награда: <span class="title"><img src="/images/icons/experience.png"> 15% бонуса к опыта</span>';
if($collections['fruit01']>=40 && $collections['fruit02']>=55 && $collections['fruit03']>=40)
{
        if(isset($_GET['fruit']))
    {
            mysql_query("UPDATE `kolhoz_user` SET `expbonus` = '".($ku['expbonus']+15)."' WHERE `id` = '$ku[id]'");
            mysql_query("UPDATE `collections` SET `fruit01` = `fruit01` - '40', `fruit02` = `fruit02` - '55', `fruit03` = `fruit03` - '40' WHERE `id_user` = '$ku[id]'");
$_SESSION['msg']='Вы получили награду: [img]/images/icons/experience.png[/img] 15% бонуса к опыту';
header("location:/?collections");  
    }
    echo'<br><img src="/images/icons/tick.png"> <a href="/?collections&fruit">Обменять коллекцию</a>';
}
















?>