Файл: test.zfarm.mobi/mystylecollect/mystylecollectionsindex.php
Строк: 282
<?php
/////////////////////////
/*
Author MyStyle ZomBi.Biz
12/05/2013
*/
/////////////////////////
what(0, 'collection');
if($user['collection_shans'] == 100) $procent = 10;
if($user['collection_shans'] == 90) $procent = 20;
if($user['collection_shans'] == 80) $procent = 30;
if($user['collection_shans'] == 70) $procent = 40;
if($user['collection_shans'] == 60) $procent = 50;
if($user['collection_shans'] == 50) $procent = 60;
if($user['collection_shans'] == 40) $procent = 70;
if($user['collection_shans'] == 30) $procent = 80;
if($user['collection_shans'] == 20) $procent = 90;
if($user['collection_shans'] == 10) $procent = 100;
echo '<div><div class="container">
<div class="innerPanel whiteLink center">Коллекционные книги</div>
<a class="btnwom center">Твой шанс найти коллекционную вещь '.$procent.'%</a>
</div></div></div>';
if($user['collection_shans']>10){echo '<a href="?linkcollectionshansupload" class="btnwom center"><img src="images/icons/arrow_up.png" alt="0" title=""/> Увеличить шанс</a>';}
///////////////////////////// Не трогать инклуд /////////////////////////////////////////////
include_once 'mystylecollect/mystylecollectionsinclude.php'; //////////////////////////////////////
include_once 'mystylecollect/mystylecollectionsobmen.php'; //////////////////////////////////////
///////////////////////////// Collections N_1 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_butterfly` WHERE `user` = '".$user['id']."'"),0);
if ($k_post == 0)
{
echo '<a href="?mystylecollectionsindex&linkbybookn1" class="btnp center fr">Купить книгу Бабочек <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100 title="Зомби баксов 100"/> 100</a><br />';
}
$k_page = k_page($k_post,$user['set']);
$page = page($k_page);
$start = $user['set']*$page-$user['set'];
$last = mysql_query("SELECT * FROM `mystyle_collections_butterfly` WHERE `user` = '".$user['id']."' LIMIT $start, $user[set]");
echo '<li>';
echo '<div>';
echo '<div class="btn center">';
$type_yes = 'yes';
$type_no = 'no';
echo '<span>Бабочек '.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_butterfly` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_butterfly` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$user['id']."'"),0).'</span>';
echo '<div>';
while($post = mysql_fetch_array($last))
{
echo '<span>';
if($post['type'] == 'no') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images_no'].'"/>';
if($post['type'] == 'yes') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images'].'"/>';
echo '</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</li>';
$look_mystyle_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_butterfly` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0);
if($look_mystyle_user == 10)echo '<a href="?mystylecollectionsindex&linkbybookn1q" class="btn" title="Обменять">Обменять на <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100" title="Зомби баксов 100"/> 100</a>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_2 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_car` WHERE `user` = '".$user['id']."'"),0);
if ($k_post == 0)
{
echo '<a href="?mystylecollectionsindex&linkbybookn2" class="center btnp fr">Купить книгу Машин <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100 title="Зомби баксов 100"/> 100</a><br />';
}
$k_page = k_page($k_post,$user['set']);
$page = page($k_page);
$start = $user['set']*$page-$user['set'];
$last = mysql_query("SELECT * FROM `mystyle_collections_car` WHERE `user` = '".$user['id']."' LIMIT $start, $user[set]");
echo '<li>';
echo '<div>';
echo '<div class="btn center">';
$type_yes = 'yes';
$type_no = 'no';
echo '<span>Машин '.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_car` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_car` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$user['id']."'"),0).'</span>';
echo '<div>';
while($post = mysql_fetch_array($last))
{
echo '<span>';
if($post['type'] == 'no') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images_no'].'"/>';
if($post['type'] == 'yes') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images'].'"/>';
echo '</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</li>';
$look_mystyle_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_car` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0);
if($look_mystyle_user == 10)echo '<a href="?mystylecollectionsindex&linkbybookn2q" class="btn" title="Обменять">Обменять на <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100" title="Зомби баксов 100"/> 100</a>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_3 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_coin` WHERE `user` = '".$user['id']."'"),0);
if ($k_post == 0)
{
echo '<a href="?mystylecollectionsindex&linkbybookn3" class="center btnp fr">Купить книгу Монет <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100 title="Зомби баксов 100"/> 100</a><br />';
}
$k_page = k_page($k_post,$user['set']);
$page = page($k_page);
$start = $user['set']*$page-$user['set'];
$last = mysql_query("SELECT * FROM `mystyle_collections_coin` WHERE `user` = '".$user['id']."' LIMIT $start, $user[set]");
echo '<li>';
echo '<div>';
echo '<div class="btn center">';
$type_yes = 'yes';
$type_no = 'no';
echo '<span>Монеток '.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_coin` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_coin` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$user['id']."'"),0).'</span>';
echo '<div>';
while($post = mysql_fetch_array($last))
{
echo '<span>';
if($post['type'] == 'no') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images_no'].'"/>';
if($post['type'] == 'yes') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images'].'"/>';
echo '</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</li>';
$look_mystyle_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_coin` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0);
if($look_mystyle_user == 10)echo '<a href="?mystylecollectionsindex&linkbybookn3q" class="btn" title="Обменять">Обменять на <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100" title="Зомби баксов 100"/> 100</a>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_4 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_herbal` WHERE `user` = '".$user['id']."'"),0);
if ($k_post == 0)
{
echo '<a href="?mystylecollectionsindex&linkbybookn4" class="center btnp fr">Купить книгу Гербарий <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100 title="Зомби баксов 100"/> 100</a><br />';
}
$k_page = k_page($k_post,$user['set']);
$page = page($k_page);
$start = $user['set']*$page-$user['set'];
$last = mysql_query("SELECT * FROM `mystyle_collections_herbal` WHERE `user` = '".$user['id']."' LIMIT $start, $user[set]");
echo '<li>';
echo '<div>';
echo '<div class="btn center">';
$type_yes = 'yes';
$type_no = 'no';
echo '<span>Гербарий '.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_herbal` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_herbal` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$user['id']."'"),0).'</span>';
echo '<div>';
while($post = mysql_fetch_array($last))
{
echo '<span>';
if($post['type'] == 'no') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images_no'].'"/>';
if($post['type'] == 'yes') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images'].'"/>';
echo '</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</li>';
$look_mystyle_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_herbal` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0);
if($look_mystyle_user == 10)echo '<a href="?mystylecollectionsindex&linkbybookn4q" class="btn" title="Обменять">Обменять на <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100" title="Зомби баксов 100"/> 100</a>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_5 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_necke` WHERE `user` = '".$user['id']."'"),0);
if ($k_post == 0)
{
echo '<a href="?mystylecollectionsindex&linkbybookn5" class="center btnp fr">Купить книгу Нэцкэ <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100 title="Зомби баксов 100"/> 100</a><br />';
}
$k_page = k_page($k_post,$user['set']);
$page = page($k_page);
$start = $user['set']*$page-$user['set'];
$last = mysql_query("SELECT * FROM `mystyle_collections_necke` WHERE `user` = '".$user['id']."' LIMIT $start, $user[set]");
echo '<li>';
echo '<div>';
echo '<div class="btn center">';
$type_yes = 'yes';
$type_no = 'no';
echo '<span>Нецкэ '.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_necke` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_necke` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$user['id']."'"),0).'</span>';
echo '<div>';
while($post = mysql_fetch_array($last))
{
echo '<span>';
if($post['type'] == 'no') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images_no'].'"/>';
if($post['type'] == 'yes') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images'].'"/>';
echo '</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</li>';
$look_mystyle_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_necke` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0);
if($look_mystyle_user == 10)echo '<a href="?mystylecollectionsindex&linkbybookn5q" class="btn" title="Обменять">Обменять на <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100" title="Зомби баксов 100"/> 100</a>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_6 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_wrapper` WHERE `user` = '".$user['id']."'"),0);
if ($k_post == 0)
{
echo '<a href="?mystylecollectionsindex&linkbybookn6" class="center btnp fr">Купить книгу Фантиков <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100 title="Зомби баксов 100"/> 100</a><br />';
}
$k_page = k_page($k_post,$user['set']);
$page = page($k_page);
$start = $user['set']*$page-$user['set'];
$last = mysql_query("SELECT * FROM `mystyle_collections_wrapper` WHERE `user` = '".$user['id']."' LIMIT $start, $user[set]");
echo '<li>';
echo '<div>';
echo '<div class="btn center">';
$type_yes = 'yes';
$type_no = 'no';
echo '<span>Фантиков '.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_wrapper` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_wrapper` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$user['id']."'"),0).'</span>';
echo '<div>';
while($post = mysql_fetch_array($last))
{
echo '<span>';
if($post['type'] == 'no') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images_no'].'"/>';
if($post['type'] == 'yes') echo '<img width="48" height="48" alt="o" src="images/collection_user/'.$post['images'].'"/>';
echo '</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</li>';
$look_mystyle_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_wrapper` WHERE `type` = '".my_esc($type_yes)."' AND `user` = '".$user['id']."'"),0);
if($look_mystyle_user == 10)echo '<a href="?mystylecollectionsindex&linkbybookn6q" class="btn" title="Обменять">Обменять на <img width="20" height="20" src="images/zombi/cash.png" alt="Зомби баксов 100" title="Зомби баксов 100"/> 100</a>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
echo '<div><div class="container">
<div class="innerPanel whiteLink center">Как их найти?</div>
<a class="btnwom center">Коллекции даются при сборе урожая, кормления животных и удобрения растений.</a>
</div></div></div>';
/////////////////////////
/*
Author MyStyle ZomBi.Biz
12/05/2013
*/
/////////////////////////
?>