Файл: inc/system/foot.php
Строк: 218
<?
$ixp =mysql_fetch_array(mysql_query("SELECT * FROM `exp` WHERE `id` = '1'"));
if(isset($exp3))echo"<div class ='block'><center><img src='/img/icons/new/dostig.png' alt='0' n=''/> тройной опыт на ".time_left($ixp['time']-$time)." </center></div>";
if($ku['expdouble']==date("D"))echo"<div class ='block'><center><img src='/img/icons/new/dostig.png' alt='0' n=''/> двойной опыт </center></div>";
echo "<center>";
echo "<a class='link-g' href='/garden/'><div class='bicon'><img src='/icon/1.png' alt='o'></div> Грядки ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND (`id_plant` = '0' OR `time_water` = '$time' OR `time` = '$time' OR `time_water` < '$time' OR `time` < '$time' OR (`time_soil` = '$time' AND `soil` = '0') OR (`time_soil` < '$time' AND `soil` = '0'))"),0)!=0?"<span class='n'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND (`id_plant` = '0' OR `time_water` = '$time' OR `time` = '$time' OR `time_water` < '$time' OR `time` < '$time' OR (`time_soil` = '$time' AND `soil` = '0') OR (`time_soil` < '$time' AND `soil` = '0'))"),0).")</span>":null)."</a>";
{
$count_mon=mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_petground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0' AND (`time_money` = '$time' OR `time_money` < '$time')"),0);
$q=mysql_query("SELECT * FROM `kolhoz_petground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0'");
$count_gol=0;
while($post=mysql_fetch_array($q))
{
$max_time=$time+$post['level']*(3600*4);
$mezh_time=$max_time-$post['time'];
if($mezh_time>=4*3600)$count_gol++;
}
$q=mysql_query("SELECT * FROM `kolhoz_petground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0'");
$count_mon=0;
while($post=mysql_fetch_array($q))
{
$d_money=floor($post['time_money2']/(4*3600));
if($d_money>0)$count_mon++;
}
if($count_gol>$count_mon)$count_zag=$count_mon;else $count_zag=$count_mon;
if($ku['level']>9)echo "<a class='link-g' href='/barnyard/'><div class='bicon'><img src='/icon/2.png' alt='o'> </div>Загоны ".($count_zag?"<span class='n'>($count_zag)</span>":null)."</a>";
if($ku['level']<10)echo "<a class='link-g'><div class='bicon'><img src='/icon/2_no.png' alt='o'> </div>С 10 ур. ".($count_zag?"<span class='n'>($count_zag)</span>":null)."";
}
if($ku['level']>9)echo "<a class='link-g' href='/cellar/'><div class='bicon'><img src='/icon/3.png' alt='o'></div> Погреб ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_polka` WHERE `id_user` = '$ku[id]' AND (`id_recipes` = '0' OR `clean` = '0' OR `time` = '$time' OR `time` < '$time')"),0)!=0?"<span class='n'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_polka` WHERE `id_user` = '$ku[id]' AND (`id_recipes` = '0' OR `time_water` = '$time' OR `time` = '$time' OR `clean` = '0' OR `time` = '$time' OR `time` < '$time')"),0).")</span>":null)."</a>";
if($ku['level']<10)echo "<a class='link-g'><div class='bicon'><img src='/icon/3_no.png' alt='o'></div> С 10 ур. ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_polka` WHERE `id_user` = '$ku[id]' AND (`id_recipes` = '0' OR `clean` = '0' OR `time` = '$time' OR `time` < '$time')"),0)!=0?"<span class='n'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_polka` WHERE `id_user` = '$ku[id]' AND (`id_recipes` = '0' OR `time_water` = '$time' OR `time` = '$time' OR `clean` = '0' OR `time` = '$time' OR `time` < '$time')"),0).")</span>":null)."</a>";
if($ku['level']>9)echo '<a class="link-g" href="/fishing/"><div class="bicon"><img src="/icon/7.png" alt="o"></div> Рыбалка</a>';
if($ku['level']<10)echo '<a class="link-g"><div class="bicon"><img src="/icon/7_no.png" alt="o"></div> С 10 ур.</a>';
echo '<a class="link-g" href="/warehouse/"><div class="bicon"><img src="/icon/3.png" alt="o"></div> Амбар</a>';
echo '<a class="link-g" href="/village/"><div class="bicon"><img src="/icon/4.png" alt="o"></div> Деревня</a>';
echo '<a class="link-g" href="/action/"><div class="bicon"><img src="/icon/10.png"></div> Акция</a>';
echo "<a class='link-g' href='/mail/'><div class='bicon'><img src='/icon/11.png'></div> Почта ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)!=0?" (".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0).")":null)."</a>";
echo '<a class="link-g" href="/payment/"><div class="bicon"><img src="/icon/14.png" alt="o"></div> Рубины</a>';
echo '<a class="link-g2" href="/forum/"><div class="bicon"><img src="/icon/12.png" alt="o"></div> Форум</a>';
echo '<a class="link-g2" href="/chat"><div class="bicon"><img src="/icon/13.png" alt="o"></div> Чат</a>';
if($mc['id']>0)echo '<a class="link-g2" href="/kolhoz/'.$mc['id'].'"><div class="bicon"><img src="/icon/6.png" alt="o"></div> Колхоз</a>';
if($mc['id']<1)echo '<a class="link-g2" href="/RatingKolhoz/"><div class="bicon"><img src="/icon/6.png" alt="o"></div> Колхоз</a>';
echo "</center>";
$assignment = mysql_fetch_array(mysql_query("SELECT * FROM `assignments_user` WHERE `id_user` = '$ku[id]'"));
$ass = mysql_fetch_array(mysql_query("SELECT * FROM `assignments` WHERE `id` = '$assignment[assignment]'"));
if($ku['level']>=10 && $assignment['assignment']<1)echo'<br><center> <a class="button24" href="/assignments/">Задания</a></div>';
if($assignment['assignment']>0)echo'<br><center> <a class="button24" href="/assignments/id/'.$ass['id'].'">'.$ass['name'].'</a></div>';
echo'</div></div></div>';
echo'<div class="niz">';
echo"<br><br><div class='div5'><div style='text-align:center;'>Вы вошли как $ku[nick], "; echo '<a href="/out">выйти</a>';echo "?</br><a href='/help/'>Помощь</a> | <a href='/settings'>Настройки</a> | <a href='/support'>Тех. Поддержка</a> | <a href='/rules'>Соглашение</a> ";
echo" ".($ku['status']==3?"| <a href='/AdminPanel'>Админка</a>":null)."".($ku['status']>0?" | <a href='/ModerationPhoto'>Модерация фото</a> ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `user_avatar` WHERE `check` = '0'"),0)!=0?" (".mysql_result(mysql_query("SELECT COUNT(*) FROM `user_avatar` WHERE `check` = '0'"),0).")":null)."</a>":null)."".($ku['status']==1 || $ku['status']==3?"| <a href='/TicketSupport'>Тикеты</a> ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `me_tikets` WHERE `read` < '1'"),0)!=0?" (".mysql_result(mysql_query("SELECT COUNT(*) FROM `me_tikets` WHERE `read` < '1'"),0).")":null)."":null)." ".($ku['status']>0?" | <a href='/AdminComplaint'>Жалобы</a> ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `complaint` WHERE `check` = '0'"),0)!=0?" (".mysql_result(mysql_query("SELECT COUNT(*) FROM `complaint` WHERE `check` = '0'"),0).")":null)."</a>":null)."<br>";
echo '</div>';
echo'<div style="text-align:center;" class="small">';
echo "Онлайн игра <span class='epic'>Территория Фермеров</span><div> </span>";
$date = date("d $m");
$today[1] = date("H:i:s");
echo(" $date $today[1]");
echo "<div></div><div style='text-align:center;'><div></span>";
///cчётчики
echo '<center><a href="http://topek.us/go/233"><img src="http://topek.us/image/233" alt="topek.us"/></a></div></center>';
echo "</div>";
if(isset($mc))
{
include_once '../collective/next_level_collective.php';
include_once '../collective/station_act.php';
include_once '../collective/count_cash.php';
}
$count=$ku['flowerbed']+$ku['cultivator']+$ku['irregate']+$ku['soiler']+$ku['conveyor']+$ku['seeder']+$ku['fooder']+$ku['fishfooder']+$ku['autocrane']+$ku['incubator']+$ku['iseeder']+$ku['plug']+$ku['harvester'];
mysql_query("UPDATE `kolhoz_user` SET `tehnika` = '$count' WHERE `id` = '$ku[id]'");
if($ku['time_start']==0 || $ku['time_start']==NULL)mysql_query("UPDATE `kolhoz_user` SET `time_start` = '$time' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `count_cp` = '0' WHERE `time_cp` < '$time'");
mysql_query("UPDATE `kolhoz_collective_user` SET `rubies` = '0' WHERE `rubies` = ''");
exit;
?>