Файл: test.zfarm.mobi/mystylecollect/mystyleciup.php
Строк: 200
<?php
/////////////////////////
/*
Author MyStyle ZomBi.Biz
12/05/2013
*/
/////////////////////////
what(0, 'collection');
if(isset($_GET['mystyleciup']) && num($_GET['mystyleciup'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_user` WHERE `id` = '".num($_GET['mystyleciup'])."' LIMIT 1"),0)!=0){
$userq = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_user` WHERE `id` = '".num($_GET['mystyleciup'])."'"));
if($userq['collection_shans'] == 100) $procent = 10;
if($userq['collection_shans'] == 90) $procent = 20;
if($userq['collection_shans'] == 80) $procent = 30;
if($userq['collection_shans'] == 70) $procent = 40;
if($userq['collection_shans'] == 60) $procent = 50;
if($userq['collection_shans'] == 50) $procent = 60;
if($userq['collection_shans'] == 40) $procent = 70;
if($userq['collection_shans'] == 30) $procent = 80;
if($userq['collection_shans'] == 20) $procent = 90;
if($userq['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>';
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_butterfly` WHERE `user` = '".$userq['id']."'"),0);
if ($k_post == 0)
{
echo '<span class="btn">Нет коллекций бабочек у пользователя</span>';
}
$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` = '".$userq['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` = '".$userq['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_butterfly` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$userq['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>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_2 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_car` WHERE `user` = '".$userq['id']."'"),0);
if ($k_post == 0)
{
echo '<span class="btn">Нет коллекций машин у пользователя</span>';
}
$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` = '".$userq['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` = '".$userq['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_car` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$userq['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>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_3 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_coin` WHERE `user` = '".$userq['id']."'"),0);
if ($k_post == 0)
{
echo '<span class="btn">Нет коллекций монет у пользователя</span>';
}
$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` = '".$userq['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` = '".$userq['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_coin` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$userq['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>';
///////////////////////// 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 '<span class="btn">Нет коллекций гербарий у пользователя</span>';
}
$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` = '".$userq['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` = '".$userq['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_herbal` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$userq['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>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_5 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_necke` WHERE `user` = '".$userq['id']."'"),0);
if ($k_post == 0)
{
echo '<span class="btn">Нет коллекций нэцкэ у пользователя</span>';
}
$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` = '".$userq['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` = '".$userq['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_necke` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$userq['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>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
///////////////////////////// Collections N_6 ///////////////////////////////////////////////////
$user['set'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_wrapper` WHERE `user` = '".$userq['id']."'"),0);
if ($k_post == 0)
{
echo '<span class="btn">Нет коллекций фантиков у пользователя</span>';
}
$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` = '".$userq['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` = '".$userq['id']."'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_collections_wrapper` WHERE `type` = '".my_esc($type_no)."' AND `user` = '".$userq['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>';
///////////////////////// End Collections ///////////////////////////////////////////////////////
echo '<div><div class="container">
<div class="innerPanel whiteLink center">Как их найти?</div>
<a class="btnwom center">Коллекции даются при сборе урожая, кормления животных и удобрения растений.</a>
</div></div></div>';
}else{
header("Location: ./");
exit;
}
/////////////////////////
/*
Author MyStyle ZomBi.Biz
12/05/2013
*/
/////////////////////////
?>