Файл: inc/fish/fish_location.php
Строк: 92
<?php
$title = 'Рыбалка';
include_once $_SERVER['DOCUMENT_ROOT'].'/inc/system/config.php';
include_once $_SERVER['DOCUMENT_ROOT'].'/inc/fish/func_fish.php';
$req = mysql_query("SELECT * FROM `fish_loc` WHERE `id_user` = '".$ku['id']."' and `id_loc` = '".intval($_GET['id'])."' and `time` > '".time()."'");
if(mysql_num_rows($req) == 0){
redirect_fish('/fish', ''); exit;
}
$my_loc = mysql_fetch_array($req);
echo '<div class="blocklocname2"><span class="spec-head6"><center>До конца рыбалки <img src="/img/icons/clock.png" class="va-m" alt="[]">'.time_left($my_loc['time']-time()).'</center></span>';
$req_rod = mysql_query("SELECT * FROM `fish_rod` WHERE `id_user` = '".$ku['id']."' and `id_loc` = '".intval($_GET['id'])."' and `act` = '1' LIMIT 1");
$my_rod = mysql_fetch_array($req_rod);
if(mysql_num_rows($req_rod) == 0){
echo '<a href="/warehouse/snasti" class="f-panel-btn-active"><div class="f-panel-btn-icon-active-fish cast"></div><div class="f-panel-btn-text-fish buy-fish"></div></a>';
}
$req_bait = mysql_query("SELECT * FROM `fish_bait` WHERE `id_user` = '".$ku['id']."' and `act` = '1' LIMIT 1");
$my_bait= mysql_fetch_array($req_bait);
if(mysql_num_rows($req_bait) == 0){
echo '<a href="/warehouse/snasti" class="f-panel-btn-active"><div class="f-panel-btn-text-fish buy-bait"></div></a>';
}
$req_korm = mysql_query("SELECT * FROM `fish_korm` WHERE `id_user` = '".$ku['id']."' and `act` = '1' LIMIT 1");
$my_korm= mysql_fetch_array($req_korm);
if(mysql_num_rows($req_korm) == 0){
echo '<a href="/warehouse/snasti" class="f-panel-btn-active"><div class="f-panel-btn-text-fish buy-lure"></div></a>';
}
echo '<div class="timings">';
if(mysql_num_rows($req_bait) == 0){
echo '<div class="f-panel-btn-active2 left"><img style="border-radius: 5px" width="65" height="65" src="/img/fishing/bread.png" alt="o"><span class="c-brown">Не выбрана <br /></span></div>';
}else{
$bait = mysql_fetch_array(mysql_query('SELECT * FROM `kolhoz_fishery_data` WHERE `id`="'.$my_bait['id_bait'].'"'));
echo '<div class="f-panel-btn-active2 left">';
echo '<img style="border-radius: 5px" width="65" height="65" src="/img/fishing/'.$bait['img'].'" alt="o">';
echo '<span class="c-brown"> '.$my_bait['kol'].' шт. </span>';
echo '<a href="/warehouse/snasti"><span class="c-brown" style="text-decoration: underline;">сменить </span></a>';
}
$korm = mysql_fetch_array(mysql_query('SELECT * FROM `kolhoz_fishery_data` WHERE `id`="'.$my_korm['id_korm'].'"'));
echo '<div class="f-panel-btn-active2 right icon"><img width="53" style="border-radius: 5px" src="'.(mysql_num_rows($req_korm) > 0 ? '/img/fishing/'.$korm['img'] : '/imgStyle/flagsS.png').'" alt="o" class="portrait">';
if(mysql_num_rows($req_korm) > 0)
{
echo '<span class="c-brown right-text">'.$korm['name'].'<a href="/warehouse/snasti"><span class="c-brown" style="text-decoration: underline;"> сменить</span></a></span>';
}
else
{
echo '<span class="c-brown">Нет прикормки</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
include_once $_SERVER['DOCUMENT_ROOT'].'/inc/system/foot.php';
?>