Файл: inc/foot.php
Строк: 422
<?
echo "</div>";
echo "</div>";
if($ku['polosa']==0){
$max = $level['rating'];
$tek = $kr;
$forl = ($tek/$max)*100;
echo '<div style="border:1px solid #495E24;border-radius:6px;margin-top:2px;">';
echo '<div class="expline" style="width:'.number_format($forl,10,'.','').'%;"></div>';
echo "</div>";
}
echo "<div class='block content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'><div class='content'>";
echo "<li>";
echo "<table><tr><td><center><div class='block'><a href='?myfarm'><img width='16' height='16' src='images/icons/plants.png' alt='o'> <font color=lavender>Огород</font>".(mysql_result(mysql_querll("SELECT COUNT(`id`) 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='title'>(".mysql_result(mysql_querll("SELECT COUNT(`id`) 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)."</div></li>
</center></td><td><center><div class='block'><img width='16' height='16' src='images/icons/animal.png' alt='o'> <a href='?mypetfarm'><font color=lavender>Загоны</font></a> ".($count_zag?"<span class='title'>($count_zag)</span>":null)."
</center></td><td><center><div class='block'><img width='16' height='16' src='images/icons/tree.png' alt='o'> <a href='?mytreefarm'><font color=lavender>Садок</font></a></div> ".($count_zag?"<span class='title'>($count_zag)</span>":null)."</td></tr></table></center></div>";
echo "<li><a href='?f_myfarm'><img width='16' height='16' src='images/fish/fishs.png' alt='o'> <font color=lavender>Пруды</font> ".(mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_ground_f` 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='title'>(".mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_ground_f` 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)."</li></a>";
echo "<li><img width='16' height='16' src='images/shaht/harvest.png' alt='o'> <a href='?sh_myfarm'><font color=lavender>Шахты</font></a> ".(mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_ground_sh` 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='title'>(".mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_ground_sh` 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)."</li>";
$count_mon=mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_petground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0' AND (`time_money` = '$time' OR `time_money` < '$time')"),0);
$q=mysql_querll("SELECT * FROM `kolhoz_petground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0'");
$count_gol=0;
while($post=mysql_fetch_assoc($q))
{
$max_time=$time+$post['level']*(3600*4);
$mezh_time=$max_time-$post['time'];
if($mezh_time>=4*3600)$count_gol++;
}
$q=mysql_querll("SELECT * FROM `kolhoz_petground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0'");
$count_mon=0;
while($post=mysql_fetch_assoc($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;
$count_mon = mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_treeground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0' AND (`time_money` = '$time' OR `time_money` < '$time')"),0);
$q=mysql_querll("SELECT * FROM `kolhoz_treeground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0'");
$count_gol=0;
while($post = mysql_fetch_assoc($q)){
$max_time=$time+$post['level']*(3600*4);
$mezh_time=$max_time-$post['time'];
if($mezh_time>=4*3600)$count_gol++;
}
$q=mysql_querll("SELECT * FROM `kolhoz_treeground` WHERE `id_user` = '$ku[id]' AND `id_pet` != '0'");
$count_mon=0;
while($post = mysql_fetch_assoc($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;
echo "<li><img width='16' height='16' src='images/pekar/mine.png' alt='o'> <a href='?pekar'><font color=lavender>Пекарня</font></a>";
echo "<li><img width='16' height='16' src='images/icons/bag.png' alt='o'> <a href='?myforest'><font color=lavender>Мой лес</font></a>";
echo "<li><img width='16' height='16' src='images/icons/last_recipes.png' alt='o'> <a href='?mycellar'><font color=lavender>Погреб</font></a> ".(mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_polka2` WHERE `id_user` = '$ku[id]' AND (`id_plant2` = '0' OR `cultivator2` = '0' OR `time` = '$time' OR `time` < '$time')"),0)!=0?"<span class='title'>(".mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_polka2` WHERE `id_user` = '$ku[id]' AND (`id_plant2` = '0' OR `time_water2` = '$time' OR `time` = '$time' OR `cultivator2` = '0' OR `time` = '$time' OR `time` < '$time')"),0).")</span>":null)."</li>";
echo "<li><img width='16' height='16' src='images/icons/fish.png' alt='o'> <a href='?rubalka'><font color=lavender>Рыбалка</font></a>";
echo "<li><img width='16' height='16' src='images/zavod/1.png' alt='o'> <a href='?myzavod'><font color=lavender>Завод</font></a>";
echo '<li><img width="16" height="16" src="images/icons/warehouse.png" alt="o"> <a href="?warehouse"><font color=lavender>Амбар</font></a></li>';
echo '<li><img width="16" height="16" src="images/icons/cart.png" alt="o"> <a href="?shop"><font color=lavender>Магазин</font></a></div>';
echo '<li><img width="16" height="16" src="images/icons/center.png" alt="o"> <a href="?center"><b><font color=mistyrose>Город</font></b></a></li><br></div>';
echo '<li><img width="16" height="16" src="/inc/kuznica/liga3.png" alt="o"> <a href="?kuznica"><font color=cyan>Гонки</font></a></li></div>';
echo '<li><img width="16" height="16" src="/Competitions/Comp.png" alt="o"> <a href="/?Competitions"><font color=yellow>Олимпиада</font></a></li></div>';
echo '<li><img width="16" height="16"
src="/inc/Pet/1.png" alt="o"> <a href="?Pet"><font color=mistyrose>Мой питомец</font></a></li></div>';
echo '<li><img width="16" height="16" src="/MagicForest/4.png" alt="o"> <a href="?MagicForest"><font color=lime>Юрский парк</font></a></li></div>';
echo "<li><img width='16' height='16' src='images/turnir.png' alt='o'> <a href='?tur'><font color=palevioletred> Малиновый Турнир</font></a></li><br>";
echo '<li><img width="16" height="16" src="/images/cut.png" alt="o"> <a href="?mywork"><font color=violet>Салон Красоты</font></a></li>';
echo "<li><img width='16' height='16' src='images/diamond.png' alt='o'> <a href='?paseka'><font color=lavender>Кристаллизатор</font></a>";
echo "<li><img width='16' height='16' src='images/admm/diamond.png' alt='o'> <a href='?almaznaya'><font color=lavender>Алмазная</font></a></div></li>";
echo '<li><img width="16" height="16" src="images/space.png" alt="o"> <a href="?elysium"><font color=lavender>Элизиум</font></a></li>';
echo '<li><img alt="" width="16" height="16" src="images/icons/trophy.png"> <a href="?gos"><font color=lavender>Госзаказ</font></a><br>';
$count_chat = mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_chat` "),0);
$count_forum = mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_forum` "),0);
echo '</li><div class="title"><div class="block"><img width="16" height="16" src="images/icons/forum.png" alt="o"> <a href="?forum"><font color=mistyrose>Форум</font></a> ('.$count_forum.')</div></li><li>
<div class="block"><img width="16" height="16" src="images/icons/ruby.png" alt="o"> <a href="?payment"><font color=mistyrose>БАНК</font></a></li><li><li><div class="title"><div class="block"><img width="16" height="16" src="images/icons/chat.png" alt="o"> <a href="?chat"><font color=mistyrose>Чат</font></a> ('.$count_chat.')</div>
</li>';
echo '<div class="block">';
echo '<span class="epic"><b>Последние темы на форуме:</b></span>';
$q=mysql_query("SELECT * FROM `kolhoz_forum` WHERE `type` = 'tema' ORDER BY `time_obnov` DESC LIMIT 3");
while($post=mysql_fetch_array($q))
{
echo "<li><div>".($post['locked']==1?"<img width='16' height='16' src='images/icons/forum_topic_closed.png' alt='x' title='x'>":"<img width='16' height='16' src='images/icons/forum_topic.png' alt='*' title='*'>")." <a href='?forum=$post[id]'><span style='font-
weight:bold'>".hsc($post['name'])."</span></a></div><div class='small'></div></li>";
}
echo "</div>";
echo "<li class='pt'><img width='16' height='16' src='images/icons/mails.png' alt='o'> <a href='?mail'><b><font color=mistyrose>Сообщения</font></b></a> ".(mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)!=0?"<span class='title'>(".mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0).")</span>":null)."</li></div>";
echo "<li><img width='16' height='16' src='images/icons/favorite.png' alt='o'> <a href='?friends'><font color=lavender>Друзья</font></a></div></li>";
echo "<li>";
echo ' <div class="block">'.on_k($ku['id']).'<a href="?user='.$ku['id'].'"> <font color=lavender>Профиль</font></a></div></li>';
if(isset($mc))
{
echo '<li><div class="title"><img alt="" width="16" height="16" src="images/icons/guild.png"> <a href="?mycollective"><font color=lavender>Колхоз</font></a></div></div></li>';
$count_selsovet = mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_collective_chat` WHERE `id_collective` = '$mc[id]'"),0);
echo "<li><div class='title'><img width='16' height='16' src='images/icons/village_council.png' alt='o'> <a href='?collective=".$mc['id']."&selsovet'><font color=lavender>Сельсовет</font></a> ($count_selsovet)</div></div></li>";
echo "<b><div class='block'><li><img width='16' height='16' src='images/icons/user_male_45.png' alt='o'> <a href='?pisadm'><font color=mistyrose>Быстрая связь с администрацией</font></b></div></a></li>";
}
echo '</div></div>';
echo "</div>";
//нижняя панель (Деньги опыт и прочее)
echo "<font color='yellow'><div class='event'>
<img width='16' height='16' src='images/icons/money.png' alt='o'> <span>".$money_new."</span> |
<img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span>".$rubies_new."</span> |
<img width='16' height='16' src='images/icons/zkl.png' alt='o'> <span>".$zkl_new."</span> |
<img width='16' height='16' src='images/euro.png' alt='o'> <span>".$euro_new."</span> |
<img width='16' height='16' src='images/diamond.png' alt='o'> <span>".$crystal_new."</span>";
echo "<li><img width='16' height='16' src='images/icons/".(isset($dexp)?"doubleexp":"experience").".png' alt='o'> <span> ".($ku['level']<$bigl?"".rating($kr)." / ".rating($level['rating'])."":"".rating($ku['rating'])."")." </span>";
echo "".on_k($ku['id'])."";
echo " <span>$ku[level]</span> уровень</div></font>";
echo "<li><div class='block'><img width='16' height='16' src='images/icons/online.png' alt='o'> <a href='?online'>Онлайн</a> <span class='title'>(<span>".mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_user` WHERE `date_last` > '".(time()-300)."'"), 0)."</span>)</span></li>";
echo "<div></div><div style='text-align:center;'><div class='pt'>Вы вошли как <span class='epic'>$ku[nick]</span>, <a href='?out'>выйти</a>?<br><br></div><div class='small minor'><div><a href='?forum=8011'>Помощь</a> | <a href='?rules'>Правила</a> | <a href='?support'>Тех. поддержка</a>".($ku['status']==1 || $ku['status']==3?" | <a class='epic blok' href='?tikets'>Тикеты".(mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_tikets` WHERE `read` = '0'"),0)!=0?" (+".mysql_result(mysql_querll("SELECT COUNT(`id`) FROM `kolhoz_tikets` WHERE `read` = '0'"),0).")":null)."</a>":null)." ".($ku['status']==3?" <br> <a href='?mailr'>Рассылка</a>":null)." ".($ku['status']==3?" <br> <a href='?admin'>Админка</a>":null)." ".($ku['status']==3?" <br> <a href='?admin_mod'>Дополнение</a>":null)." </div></div>";
echo "<div class='small'><a href='?bb'>BB code</a></div>";
include_once 'inc/next_level_collective.php';
if($_SESSION['foot_sys']>=25){
include_once 'inc/station_act.php';
include_once 'inc/count_cash.php';
$count = $ku['flowerbed']+$ku['cultivator']+$ku['cultivator_sh']+$ku['f_cultivator']+$ku['cultivator2']+$ku['irregate']+$ku['irregate_sh']+$ku['f_irregate']+$ku['soiler']+$ku['soiler_sh']+$ku['f_soiler']+$ku['conveyor2']+$ku['conveyor']+$ku['seeder']+$ku['seeder_sh']+$ku['seeder2']+$ku['f_seeder']+$ku['fooder2']+$ku['fooder']+$ku['harvester2']+$ku['harvester']+$ku['harvester_sh']+$ku['f_harvester'];
mysql_querll('UPDATE `kolhoz_user` SET `tehnika`="'.$count.'" WHERE `id`="'.$ku['id'].'"');
mysql_querll('UPDATE `kolhoz_user` SET `count_cp`="0" WHERE `time_cp`<"'.$time.'"');
include_once 'inc/dostig2.php';
$_SESSION['foot_sys']=1;
}
$_SESSION['foot_sys']++;
mysql_querll("UPDATE `kolhoz_user` SET `flowerbed` = '12' WHERE `flowerbed` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `cultivator` = '12' WHERE `cultivator` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `irregate` = '12' WHERE `irregate` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `soiler` = '12' WHERE `soiler` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `conveyor` = '12' WHERE `conveyor` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `seeder` = '12' WHERE `seeder` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `fooder` = '12' WHERE `fooder` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `fooder2` = '12' WHERE `fooder2` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `harvester` = '12' WHERE `harvester` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `conveyor2` = '12' WHERE `conveyor2` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `sponder` = '12' WHERE `sponder` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `catchfish` = '12' WHERE `catchfish` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `harvester2` = '12' WHERE `harvester2` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `seeder2` = '12' WHERE `seeder2` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `cultivator2` = '12' WHERE `cultivator2` > '12'");
mysql_querll("UPDATE `kolhoz_user` SET `conveyor2` = '12' WHERE `conveyor2` > '12'");
$count=$ku['flowerbed']+$ku['cultivator']+$ku['cultivator_sh']+$ku['f_cultivator']+$ku['cultivator2']+$ku['irregate']+$ku['irregate_sh']+$ku['f_irregate']+$ku['soiler']+$ku['soiler_sh']+$ku['f_soiler']+$ku['conveyor2']+$ku['conveyor']+$ku['seeder']+$ku['seeder_sh']+$ku['seeder2']+$ku['f_seeder']+$ku['fooder2']+$ku['fooder']+$ku['harvester2']+$ku['harvester']+$ku['harvester_sh']+$ku['f_harvester'];
mysql_querll("UPDATE `kolhoz_user` SET `tehnika` = '$count' WHERE `id` = '$ku[id]'");
if($ku['time_start']==0 || $ku['time_start']==NULL)mysql_querll("UPDATE `kolhoz_user` SET `time_start` = '$time' WHERE `id` = '$ku[id]'");
mysql_querll("UPDATE `kolhoz_user` SET `count_cp` = '0' WHERE `time_cp` < '$time'");
mysql_querll("UPDATE `kolhoz_user` SET `money` = '".floor($ku['money'])."' WHERE `id` = '$ku[id]'");
mysql_querll("UPDATE `kolhoz_collective_user` SET `rubies` = '0' WHERE `rubies` = ''");
include_once 'inc/dostig2.php';
echo "</div></div></div>";
echo '<span class="pt small minor"><center>'."n";
echo '<li>Добавь в закладки <a class="vvs2" href="http://'.$_SERVER['HTTP_HOST'].'/">'.$_SERVER['HTTP_HOST'].'</a></li>'."n";
echo '<li><a class="vvs2" href="?user=1">Контакты</a></li>'."n";
echo '<li>'.date('d.m.Y H:i').'</li>'."n";
// Информационная системная строка
echo '<br/>'."n";
echo '</center>'."n";
if($_SESSION['id_user'] == $log_sql){
echo '<br>'."n";
$th = 0;
while(count($_SESSION['sql_log'])>=$th){
echo '<li><nobr>'.$_SESSION['sql_log'][$th].'</nobr></li>'."n";
$th++;
}
unset($_SESSION['sql_log']);
}
echo '</span>'."n";
echo '</body></html>'."n";
// Завершаем работу скрипта и закрывает соединение с sql сервером
mysql_close($db);
exit;
?>