Вход Регистрация
Файл: inc/user/collections.php
Строк: 369
<?php 
$title
='Коллекции';
include_once 
'../system/config.php';

if(
$_GET['nagrada'] == 'pet'){
    
$count_slasti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'korovka'"),0);
    
$count_slasti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'mishka'"),0);
    
$count_slasti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'petuh'"),0);
    
$slasti_all $count_slasti1+$count_slasti2+$count_slasti3;
    
    if(
$slasti_all 55){
        
header('Location: /collections'); exit;
    }
    
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'korovka' LIMIT 15");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'mishka' LIMIT 19");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'petuh' LIMIT 21");
    
mysql_query("UPDATE `kolhoz_user` SET `rating` = `rating` +100000000, `rubies` = `rubies` +1 WHERE `id` = '".$ku['id']."'");
    
$_SESSION['rating'] = 100000000;
    
header('Location: /collections?rubine=1');
}

if(
$_GET['nagrada'] == 'slasti'){
    
$count_slasti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'shokolad'"),0);
    
$count_slasti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'barbaris'"),0);
    
$count_slasti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'pchelka'"),0);
    
$slasti_all $count_slasti1+$count_slasti2+$count_slasti3;
    
    if(
$slasti_all 65){
        
header('Location: /collections'); exit;
    }
    
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'shokolad' LIMIT 26");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'barbaris' LIMIT 21");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'pchelka' LIMIT 18");
    
mysql_query("UPDATE `kolhoz_user` SET `rating` = `rating` +200000000, `rubies` = `rubies` +3 WHERE `id` = '".$ku['id']."'");
    
    
$_SESSION['rating'] = 200000000;
    
header('Location: /collections?rubine=3');
}

if(
$_GET['nagrada'] == 'cveti'){
    
$count_slasti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'romashka'"),0);
    
$count_slasti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'landish'"),0);
    
$count_slasti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'orhideya'"),0);
    
$slasti_all $count_slasti1+$count_slasti2+$count_slasti3;
    
    if(
$slasti_all 85){
        
header('Location: /collections'); exit;
    }
    
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'romashka' LIMIT 32");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'landish' LIMIT 27");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'orhideya' LIMIT 26");
    
mysql_query("UPDATE `kolhoz_user` SET `rating` = `rating` +300000000, `rubies` = `rubies` +5 WHERE `id` = '".$ku['id']."'");
    
    
$_SESSION['rating'] = 300000000;
    
header('Location: /collections?rubine=5');
}

if(
$_GET['nagrada'] == 'frukti'){
    
$count_slasti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'yagodi'"),0);
    
$count_slasti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'vishny'"),0);
    
$count_slasti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'limon'"),0);
    
$slasti_all $count_slasti1+$count_slasti2+$count_slasti3;
    
    if(
$slasti_all 99){
        
header('Location: /collections'); exit;
    }
    
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'yagodi' LIMIT 37");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'vishny' LIMIT 33");
    
mysql_query("DELETE FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'limon' LIMIT 29");
    
mysql_query("UPDATE `kolhoz_user` SET `rating` = `rating` +400000000, `rubies` = `rubies` +8 WHERE `id` = '".$ku['id']."'");
    
    
$_SESSION['rating'] = 400000000;
    
header('Location: /collections?rubine=8');
}

if(isset(
$_GET['rubine'])){
    echo 
'<div class="block"><center><img src="/img/icons/ruby.png"> Рубины: '.intval($_GET['rubine']).'</center></div>';
}

if(isset(
$_GET['fantiki'])){
echo 
'<img src="http://'.$_SERVER['HTTP_HOST'].'/img/general.jpg">';

echo 
'<div class="flat-tabs tabs-blue">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="33%" align="center"><a href="/collections" class="i-tab">Коллекции</a></td>
<td width="33%" align="center"><span class="i-tab">Фантики</span></td>
</tr>
</tbody>
</table>
</div>'
;

$req mysql_query("SELECT DISTINCT `name` FROM `collections_users` WHERE `id_user` = '".$ku['id']."'");
if(
mysql_num_rows($req) > 0){
    while(
$fantik mysql_fetch_array($req)){
        
$count mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `name` = '".$fantik['name']."'"),0);
        
$img mysql_fetch_array(mysql_query("SELECT `type_2` FROM `collections` WHERE `name` = '".$fantik['name']."'"));

        echo 
'<div class="message"><table><td>
        <td><img src="/img/colectibles/'
.$img['type_2'].'.png"></td>
        <td><b>'
.$fantik['name'].'</b><br />
        У вас '
.$count.' шт.</td>
        </td></table></div>'
;
    }
}else{
    echo 
'<div class="message">У вас еще нет фантиков</div>';
}

echo 
'<div class="menu-foot"><center><div style="padding:5px 0px 0px 0px;" ><a class="blockloctime" href="/shop/fantik"><span class="spec-head1">Купить фантики</span></a></div></center></div>';

include_once 
'../system/foot.php'; exit;
}

echo 
'<img src="http://'.$_SERVER['HTTP_HOST'].'/img/general.jpg">';

echo 
'<div class="flat-tabs tabs-blue">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="33%" align="center"><span class="i-tab">Коллекции</span></td>
<td width="33%" align="center"><a href="/collections?fantiki" class="i-tab">Фантики</a></td>
</tr>
</tbody>
</table>
</div>
<div class="flat-content mb0 appleGreen">
<span class="font12 text-bold">Питомцы</span>
</div>'
;

$count_pet1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'korovka'"),0);
$count_pet2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'mishka'"),0);
$count_pet3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'pet' and `type_2` = 'petuh'"),0);
$pet_all $count_pet1+$count_pet2+$count_pet3;
echo 
'<div class="message"><div class="center">
<div class="quest-item"><img width="60px" src="/img/colectibles/korovka.png"><div class="quest-progress">'
.($count_pet1 15 15 $count_pet1).'/15</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/mishka.png"><div class="quest-progress">'
.($count_pet2 19 19 $count_pet2).'/19</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/petuh.png"><div class="quest-progress">'
.($count_pet3 21 21 $count_pet3).'/21</div></div>
</div><b>Награда: </b><br />
<img src="/img/icons/ruby.png">1 <br />
<img src="/img/icons/experience.png"> 100 000 000'
.($pet_all >= 55 '<br /><a href="/collections?nagrada=pet">Забрать награду</a>' null).'</div>';

$count_slasti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'shokolad'"),0);
$count_slasti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'barbaris'"),0);
$count_slasti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'slasti' and `type_2` = 'pchelka'"),0);
$slasti_all $count_slasti1+$count_slasti2+$count_slasti3;
echo 
'<div class="flat-content mb0 appleGreen"><span class="font12 text-bold">Сласти</span></div>
<div class="message"><div class="center">
<div class="quest-item"><img width="60px" src="/img/colectibles/shokolad.png"><div class="quest-progress">'
.($count_slasti1 26 26 $count_slasti1).'/26</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/barbaris.png"><div class="quest-progress">'
.($count_slasti2 21 21 $count_slasti2).'/21</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/pchelka.png"><div class="quest-progress">'
.($count_slasti3 18 18 $count_slasti3).'/18</div></div>
</div><b>Награда: </b><br />
<img src="/img/icons/ruby.png">3 <br />
<img src="/img/icons/experience.png"> 200 000 000'
.($slasti_all >= 65 '<br /><a href="/collections?nagrada=slasti">Забрать награду</a>' null).'</div>';

$count_cveti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'romashka'"),0);
$count_cveti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'landish'"),0);
$count_cveti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'cveti' and `type_2` = 'orhideya'"),0);
$cveti_all $count_cveti1+$count_cveti2+$count_cveti3;
echo 
'<div class="flat-content mb0 appleGreen"><span class="font12 text-bold">Цветочная</span></div>
<div class="message"><div class="center">
<div class="quest-item"><img width="60px" src="/img/colectibles/romashka.png"><div class="quest-progress">'
.($count_cveti1 32 32 $count_cveti1).'/32</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/landish.png"><div class="quest-progress">'
.($count_cveti2 27 27 $count_cveti2).'/27</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/orhideya.png"><div class="quest-progress">'
.($count_cveti3 26 26 $count_cveti3).'/26</div></div>
</div><b>Награда: </b><br />
<img src="/img/icons/ruby.png">5 <br />
<img src="/img/icons/experience.png"> 300 000 000'
.($cveti_all >= 85 '<br /><a href="/collections?nagrada=cveti">Забрать награду</a>' null).'</div>';

$count_frukti1 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'yagodi'"),0);
$count_frukti2 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'vishny'"),0);
$count_frukti3 mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collections_users` WHERE `id_user` = '".$ku['id']."' and `type` = 'frukti' and `type_2` = 'limon'"),0);
$frukti_all $count_frukti1+$count_frukti2+$count_frukti3;
echo 
'<div class="flat-content mb0 appleGreen"><span class="font12 text-bold">Фруктовая</span></div>
<div class="message"><div class="center">
<div class="quest-item"><img width="60px" src="/img/colectibles/yagodi.png"><div class="quest-progress">'
.($count_frukti1 37 37 $count_frukti1).'/37</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/vishny.png"><div class="quest-progress">'
.($count_frukti2 33 33 $count_frukti2).'/33</div></div>
<div class="quest-item"><img width="60px" src="/img/colectibles/limon.png"><div class="quest-progress">'
.($count_frukti3 29 29 $count_frukti3).'/29</div></div>
</div><b>Награда: </b><br />
<img src="/img/icons/ruby.png">8 <br />
<img src="/img/icons/experience.png"> 400 000 000'
.($frukti_all >= 99 '<br /><a href="/collections?nagrada=frukti">Забрать награду</a>' null).'</div>';

echo 
'<div class="menu-foot"><center><div style="padding:5px 0px 0px 0px;" ><a class="blockloctime" href="/shop/fantik"><span class="spec-head1">Купить фантики</span></a></div></center>';

include_once 
'../system/foot.php';
?>
Онлайн: 0
Реклама