<?Error_Reporting (E_ALL & ~E_NOTICE);
if(isset($_GET['history']))include_once 'inc/history.php';
elseif(isset($_GET['bans']) && ($ank['id']==$ku['id'] || $ku['status']>0))include_once 'inc/bans.php';

if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_collective_user` WHERE `id_user` = '$ank[id]'"),0)!=0)
{
$uctu=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_collective_user` WHERE `id_user` = '$ank[id]'"));
$uct=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_collective` WHERE `id` = '$uctu[id_collective]'"));
if($au['pol']==1)$uctu['status_name']='колхозник';else $uctu['status_name']='колхозница';
if($uctu['status']==1)$uctu['status_name']='председатель';
elseif($uctu['status']==2)$uctu['status_name']='зампред';
elseif($uctu['status']==3)$uctu['status_name']='агроном';
elseif($uctu['status']==4)$uctu['status_name']=($au['pol']==1?'бригадир':'хозяйка');
elseif($uctu['status']==5)$uctu['status_name']='староста';
elseif($uctu['status']==6)$uctu['status_name']=($au['pol']==1?'механизатор':'товаровед');
}

if(isset($_GET['izg']) && ($ku['id']==1 || $ku['status']==3 || $ku['status']==1) && $ku['id']!=$ank['id'])
{
if(isset($_POST['msg']))
{
if(strlen2($_POST['msg'])<1)err_game("Введите причину");
else
{
mysql_querll("INSERT INTO `kolhoz_ban` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `msg` = '".my_esc($_POST['msg'])."', `izg` = '1'");
header("Location:?user=$ank[id]");
exit;
}
}
echo "<div class='event'><h1>$au[nick]</h1></div>";
echo '<div class="content"><div class="block">';
echo "<form method='post'>";
echo "Причина:<br />\n";
echo "<textarea name=\"msg\"></textarea><br />\n";
echo "<input type='submit' value='Забанить' />\n";
echo "</form>\n";
echo "</div>";
include_once 'inc/foot.php';
}
elseif(isset($_GET['ban']) && ($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])
{
if(isset($_POST['msg']))
{
$timeban=$time;
if ($_POST['time']=='min')$timeban+=intval($_POST['timec'])*60;
if ($_POST['time']=='chas')$timeban+=intval($_POST['timec'])*60*60;
if ($_POST['time']=='sut')$timeban+=intval($_POST['timec'])*60*60*24;
if ($_POST['time']=='mes')$timeban+=intval($_POST['timec'])*60*60*24*30;
if ($timeban<$time)err_game('Ошибка времени бана');
elseif(strlen2($_POST['msg'])<1)err_game("Введите причину");
else
{
mysql_querll("INSERT INTO `kolhoz_ban` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `msg` = '".my_esc($_POST['msg'])."', `izg` = '0', `time` = '$timeban'");
header("Location:?user=$ank[id]");
exit;
}
}
echo "<div class='event'><h1>$au[nick]</h1></div>";
echo '<div class="content"><div class="block">';
echo "<form method='post'>";
echo "Причина:<br />\n";
echo "<textarea name=\"msg\"></textarea><br />\n";
echo "Время бана:<br />\n";
echo "<input type='text' name='timec' title='Время бана' value='1' maxlength='11' size='3' />\n";
echo "<select name=\"time\">\n";
echo "<option value='min'>Минуты</option>\n";
echo "<option value='chas'>Часы</option>\n";
echo "<option value='sut'>Сутки</option>\n";
echo "<option value='mes'>Месяцы</option>\n";
echo "</select><br />\n";
echo "<input type='submit' value='Забанить' />\n";
echo "</form>";
echo "</div>";
include_once 'inc/foot.php';
}
elseif(isset($_GET['inct']) && $mcu['status']<=3 && isset($mc) && !isset($uct) && $ank['level']>=10)
{
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_collective_invite` WHERE `id_user` = '$ank[id]'"),0)!=0)err_game("Этому фермеру уже выслано приглашение.");
elseif($mc['users']==$mc['users_max'])err_game("В колхозе нет свободных мест!");
else
{
mysql_querll("INSERT INTO `kolhoz_collective_invite` SET `id_user` = '$ank[id]', `id_collective` = '$mc[id]', `id_who` = '$ku[id]', `time` = '$time'");
echo "<div class='feedback'><ul class='feedbackPanel'><li class='feedbackPanelINFO'><span class='feedbackPanelINFO'>Приглашение выслано.</span></li></ul></div>";
}
}
if(isset($_GET['status_ct']) && $mcu['status']<=3 && isset($mc) && $ank['id']!=$ku['id'] && $uctu['status']>$mcu['status'] && isset($uct) && $uct['id']==$mc['id'])
{
if($_GET['status_ct']!=NULL && ($_GET['status_ct']==0 || $_GET['status_ct']==1 && $mcu['status']==1 || $_GET['status_ct']==2 || $_GET['status_ct']==3 || $_GET['status_ct']==4 || $_GET['status_ct']==5 || $_GET['status_ct']==6 || $_GET['status_ct']==7))
{
$status_ct=intval($_GET['status_ct']);
if($status_ct>1 && $status_ct<=7 && $status_ct>$mcu['status'])
{
mysql_querll("UPDATE `kolhoz_collective_user` SET `status` = '$status_ct' WHERE `id` = '$uctu[id]'");
if($status_ct<$uctu['status'])mysql_querll("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `id_collective` = '$uct[id]', `time` = '$time', `type` = 'st_up', `dei` = 'who', `status` = '$status_ct'");
else mysql_querll("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `id_collective` = '$uct[id]', `time` = '$time', `type` = 'st_down', `dei` = 'who', `status` = '$status_ct'");
header("Location:?user=$ank[id]");
}
elseif($status_ct==1 && $mcu['status']==1)
{
if(isset($_GET['ok']))
{
mysql_querll("UPDATE `kolhoz_collective_user` SET `status` = '1' WHERE `id` = '$uctu[id]'");
mysql_querll("UPDATE `kolhoz_collective_user` SET `status` = '2' WHERE `id` = '$mcu[id]'");
mysql_querll("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `id_collective` = '$uct[id]', `time` = '$time', `type` = 'st_up', `dei` = 'who', `status` = '1'");
mysql_querll("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ku[id]', `id_who` = '$ku[id]', `id_collective` = '$uct[id]', `time` = '$time', `type` = 'st_down', `dei` = 'who', `status` = '2'");
header("Location:?user=$ank[id]");
}
podtv("?user=$ank[id]&status_ct=1&ok","?user=$ank[id]&status_ct");
include_once 'inc/foot.php';
}
elseif($status_ct==0 && $mcu['status']<=3 && isset($mc))
{
if(isset($_GET['ok']))
{
mysql_querll("DELETE FROM `kolhoz_collective_user` WHERE `id` = '$uctu[id]'");
mysql_querll("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `id_collective` = '$uct[id]', `time` = '$time', `type` = 'out', `dei` = 'who'");
mysql_querll("UPDATE `kolhoz_user` SET `time_shmel` = '0', `time_yastreb` = '0', `time_drakon` = '0' WHERE `id` = '$ank[id]'");
header("Location:?user=$ank[id]");
}
podtv("?user=$ank[id]&status_ct=0&ok","?user=$ank[id]&status_ct");
include_once 'inc/foot.php';
}
}
echo "<div class='event'><h1>$au[nick]</h1></div>";
echo '<div class="content"><div class="block">';
$array_status=array('председатель/' => '1', 'зампред/' => '2', 'агроном/' => '3', 'бригадир/хозяйка' => '4', 'староста/' => '5', 'механизатор/товаровед' => '6', 'колхозник/колхозница' => '7', 'исключить/' => '0');
echo "<ul>";
foreach($array_status AS $key => $value)
{
$sname=explode('/',$key);
if($sname[1]==NULL)$sname[1]=$sname[0];
if($value==0)$img='cross';elseif($value==1)$img='crown';elseif($value==$uctu['status'])$img='arrow';elseif($value>$uctu['status'])$img='down';elseif($value<$uctu['status'])$img='up';
echo "<li><img src='img/icons/".$img.".png'> ";
echo ($value>$mcu['status'] && $mcu['status']!=$value || $mcu['status']==1 && $value==1 || $value==0?"<a href='?user=$ank[id]&status_ct=$value'>":null)."".($au['pol']==1?$sname[0]:$sname[1])."".($value>$mcu['status'] && $mcu['status']!=$value || $mcu['status']==1 && $value==1 || $value==0?"</a>":null)."</li>";
}
echo "</ul>";
echo "</div>";
include_once 'inc/foot.php';
}
if(isset($_GET['status']) && $ku['status']==3 && $ank['id']!=$ku['id'] && ($ku['status']>$ank['status'] || $ku['id']==1))
{
if($_GET['status']!=NULL && ($_GET['status']==0 || $_GET['status']==1 || $_GET['status']==2 || $_GET['status']==3))
{
mysql_querll("UPDATE `kolhoz_user` SET `status` = '".intval($_GET['status'])."' WHERE `id` = '$ank[id]'");
header("Location:?user=$ank[id]");
}
echo "<div class='event'><h1>$au[nick]</h1></div>";
echo '<div class="content"><div class="block">';
echo "<li><img src='img/icons/".($ank['status']==3?"arrow.png":"up.png")."'> ".($ank['status']!=3?"<a href='?user=$ank[id]&status=3'>":null)."администратор".($ank['status']==3?"</a>":null)."</li>";
echo "<li><img src='img/icons/".($ank['status']==2?"arrow.png":"".($ank['status']>2?"down.png":"up.png")."")."'> ".($ank['status']!=2?"<a href='?user=$ank[id]&status=2'>":null)."модератор".($ank['status']==2?"</a>":null)."</li>";
echo "<li><img src='img/icons/".($ank['status']==1?"arrow.png":"".($ank['status']>1?"down.png":"up.png")."")."'> ".($ank['status']!=1?"<a href='?user=$ank[id]&status=1'>":null)."тех. поддержка".($ank['status']==1?"</a>":null)."</li>";
echo "<li><img src='img/icons/".($ank['status']==0?"arrow.png":"".($ank['status']>0?"down.png":"up.png")."")."'> ".($ank['status']!=0?"<a href='?user=$ank[id]&status=0'>":null)."игрок".($ank['status']!=0?"</a>":null)."</li>";
echo "</div>";
include_once 'inc/foot.php';
}
if(isset($_GET['adm']) && $ku['id']==1 && $ank['id']!=$ku['id'] && ($ku['dostup']>$ank['dostup'] || $ku['id']==1))
{
if($_GET['adm']!=NULL && ($_GET['dostup']==0 || $_GET['dostup']==1))
{
mysql_querll("UPDATE `kolhoz_user` SET `dostup` = '".intval($_GET['adm'])."' WHERE `id` = '$ank[id]'");
header("Location:?user=$ank[id]");
}
echo "<div class='event'><h1>$au[nick], $ank[level] ур.</h1></div>";
echo '<div class="content"><div class="block">';
echo "<li><img src='img/icons/".($ank['dostup']==1?"arrow.png":"up.png")."'> ".($ank['dostup']!=1?"<a href='?user=$ank[id]&adm=1'>":null)."Доступ открыт".($ank['dostup']==1?"</a>":null)."</li>";
echo "<li><img src='img/icons/".($ank['dostup']==0?"arrow.png":"".($ank['dostup']>0?"down.png":"up.png")."")."'> ".($ank['dostup']!=0?"<a href='?user=$ank[id]&adm=0'>":null)."Доступ закрыт".($ank['dostup']!=0?"</a>":null)."</li>";
echo "</div>";
include_once 'inc/foot.php';
}
$t=time()-600;
echo "<div class='event'><h2>";
on_k($au['id']);
echo " <span class='nick".($ank['status']==1?"Supporter":null)."".($ank['status']==2?"Moderator":null)."".($ank['status']==3?"Admin":null)."'>$au[nick]</span><span></span> <span>".($au['date_last']<=$t?"<font color='orangered'>Off</font>":"<font color='green'>Online</font>")."</span>";
if($au['date_last']<=$t)echo "".vremja($au['date_last'])."";
echo "</li></h2></div>";

echo '<div class="content"><div class="block">';
if($ank['status']>0 || $ank['status']==0 && $ku['status']==3)echo "".($ank['status']==0?"Игрок":"<span class='nick".($ank['status']==1?"Supporter":null)."".($ank['status']==2?"Moderator":null)."".($ank['status']==3?"Admin":null)."'>".($ank['status']==1?"Тех.поддержка":null)."".($ank['status']==2?"Модератор":null)."".($ank['status']==3?"Администратор":null)."</span>")." ".($ku['status']==3 && $ank['id']!=$ku['id'] && ($ku['status']>$ank['status'] || $ku['status']==3)?"<a href='?user=$ank[id]&status'>[ред]</a>":null)."";
echo "<li><img src='img/icons/chasi.gif'> Время онлайн: <span class='title'>".time_left($ank['time'])."</span></li>";
if(($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])echo "<img src='img/icons/bann.gif'> <a href='?user=$ank[id]&ban'><font color='orange'>Выдать ОБед молчания</font></a>";
if(($ku['id']==1 || $ku['status']==1 || $ku['status']==3) && $ku['id']!=$ank['id'])echo "<div><img src='img/icons/bann.gif'> <a href='?user=$ank[id]&izg'><font color='red'>Выдать Изгнание</font></a></div>";
echo "</div></div></div>";
echo '<div class="content"><div class="block">';
if($ank['id']==$ku['id'])
echo "<a href='?ava'>";
if (file_exists('img/avatars/'.$au['id'].'.png'))
{
echo "<img src='img/avatars/$au[id].png' alt='o'>";
}
else
{
echo "<img src='img/noavatar.png' alt='o'>";

}
echo "</a>";

if(isset($_GET['friend'])){if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"),0)==0){if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"),0)!=0)mysql_querll("DELETE FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"); mysql_querll("INSERT INTO `kolhoz_friends` SET `id_user` = '$ku[id]', `id_ank` = '$ank[id]'");}
else mysql_querll("DELETE FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"); echo mysql_error(); }elseif(isset($_GET['blacklist'])) {if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"),0)==0){if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"),0)!=0)mysql_querll("DELETE FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"); mysql_querll("INSERT INTO `kolhoz_blacklist` SET `id_user` = '$ku[id]', `id_ank` = '$ank[id]'");}
else mysql_querll("DELETE FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]'"); echo mysql_error(); }

echo "</br><img alt='' width='16' height='16' src='img/icons/gift_plus.png'> <a href='?presents=$ank[id]'>Подарки</a>";
if($ank['id']!=$ku['id'])
{
echo "<div class='ptm'>";
echo "<img width='16' height='16' src='img/icons/pencil.png' alt='o'> <a href='?mail&new_msg=$ank[id]'>Сообщение</a>";
echo "</div>";
echo "<div><img width='16' height='16' src='img/icons/gift_plus.png' alt='o'> <a href='?presents=$ank[id]&do'>Отправить подарок</a></div>";
if($ank['id']!=$ku['id'])echo "<li><img alt='' width='16' height='16' src='img/icons/favorite.png'> <a href='?user=$ank[id]&friend'><span>".(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]' LIMIT 1"),0)==0?"Добавить в друзья":"Убрать из друзей")."</span></a></li>";
if($ku['status']==3)echo "<li><img alt='' width='16' height='16' src='img/icons/money.png'> ".($ku['rating']>=$ank['rating']?"<a href='?perevod=$ank[id]'>":null)."Дать монет".($ku['rating']>=$ank['rating']?"</a>":null)."</li>";
if($ank['id']!=$ku['id'] && $ku['status']==3)echo "<li><img alt='' width='16' height='16' src='img/icons/ruby.png'> <a href='?perevod2=$ank[id]'>Дать рубинов</a></li>";
if($ank['id']!=$ku['id'])echo "<li><img alt='' width='16' height='16' src='img/icons/ignore.png'> <a href='?user=$ank[id]&blacklist'><span>".(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '$ank[id]' LIMIT 1"),0)==0?"Добавить в ЧС":"Убрать из ЧС")."</span></a></li>";
}

echo '</div></div></div><div class="content"><div class="block">';
if($ank['status_icon']==0 && $ank['status_text']==NULL){
echo'<font color="yellow">Всем привет..</font> ';
if($ank['id']==$ku['id'])echo'[<a href="?pr">Ред</a>]<br>';
}else{
echo '<span class="nick'.($ank['status']==1?'Supporter':null).''.($ank['status']==2?'Moderator':null).''.($ank['status']==3?'Admin':null).'">'.$ank['status_text'].'</span>';
if($ank['id']==$ku['id'])echo' [<a href="?pr">Изм</a>]<br>';
}
echo '</div></div><div class="content"><div class="block">';
echo "<li><font color='#7CFC00'>Имя:</font> <span>".($ank['name']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['name']))."</span></br><font color='#7CFC00'>Фамилия:</font> <span>".($ank['famil']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['famil']))."</span></br><font color='#7CFC00'>Обо мне:</font> <span>".($ank['obo']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['obo']))."</span></br><font color='#7CFC00'>Город:</font> <span>".($ank['strana']==NULL?'':hsc($ank['strana']))."</span>,<span>".($ank['city']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['city']))."</span></br><font color='#7CFC00'>Дата рождения:</font> <span>".($ank['date']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['date']))."</span></br><font color='#7CFC00'>Тел:</font> <span>".($ank['contacts']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['contacts']))."</span></br><font color='#7CFC00'>ICQ:</font> <span>".($ank['icq']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['icq']))."</span></br><font color='#7CFC00'>Skype:</font> ".($ank['skype']==NULL?'<font color="#4F4F4F">Не указано</font>':hsc($ank['skype']))."</span></li>".($ku['id']==$ank['id']?"<a href='?anketa'>[<font color='orange'>Изменить данные</font>]":"<span>")."".($ku['id']==$ank['id']?"</a>":"</span>")."";
if($ku['id']==1 || $ank['status']==0 && $ku['id']==1)echo "<li><font color='violet'>Доступ: </font>".($ank['dostup']==0?"<font color='red'>Закрыт</font>":"<span class='nick".($ank['dostup']==1?"Supporter":null)."'>".($ank['dostup']==1?"<font color='green'>Открыт</font>":null)."</span>")." ".($ank['dostup']==0?"".($ku['id']==1 && $ank['id']!=$ku['id'] && ($ku['dostup']==1 || $ku['id']==1)?"[<a href='?user=$ank[id]&adm'><font color='green'>Открыть</font></a>]":null)."":"<span class='nick".($ank['dostup']==1?"Supporter":null)."'>".($ank['dostup']==1?"".($ku['id']==1 && $ank['id']!=$ku['id'] && ($ku['dostup']==1 || $ku['id']==1)?"[<a href='?user=$ank[id]&adm'><font color='red'>Закрыть</font></a>]":null)."":null)."</span>")."</br>".($ku['status']==3?"[<a href='?admin=users&edit=$au[id]'>Ред перса</a>]":null)."";
echo '</div></div><div class="content"><div class="block">';
echo "<div><h3>Техника <span class='nick".($ank['status']==1?"Supporter":null)."".($ank['status']==2?"Moderator":null)."".($ank['status']==3?"Admin":null)."'>$au[nick]</span> <span class='title'>(<span>$ank[tehnika]</span>)</span></h3>";
echo "<ul>";
if($ank['flowerbed']>0)echo "<li><img width='16' height='16' src='img/icons/flowerbed.png' alt='o'> <a class='epic' href='?shop=flowerbed'>Клумба</a> <span class='minor'>(<span>$ank[flowerbed]</span>)</span></li>";
if($ank['cultivator']>0)echo "<li><img width='16' height='16' src='img/icons/dig.png' alt='o'> <a class='epic' href='?shop=cultivator'>Культиватор</a> <span class='minor'>(<span>$ank[cultivator]</span>)</span></li>";
if($ank['cultivator2']>0)echo "<li><img width='16' height='16' src='img/icons/autoplug.png' alt='o'> <a class='epic' href='?shop=cultivator2'>Пылесос</a> <span class='minor'>(<span>$ank[cultivator2]</span>)</span></li>";
if($ank['irregate']>0)echo "<li><img width='16' height='16' src='img/icons/water.png' alt='o'> <a class='epic' href='?shop=irregate'>Ороситель</a> <span class='minor'>(<span>$ank[irregate]</span>)</span></li>";
if($ank['seeder']>0)echo "<li><img width='16' height='16' src='img/icons/seat.png' alt='o'> <a class='epic' href='?shop=seeder'>Сеялка</a>
<span class='minor'>(<span>$ank[seeder]</span>)</span></li>";
if($ank['seeder2']>0)echo "<li><img width='16' height='16' src='img/icons/seylka.png' alt='o'> <a class='epic' href='?shop=seeder2'>Поставилка</a> <span class='minor'>(<span>$ank[seeder2]</span>)</span></li>";
if($ank['harvester']>0)echo "<li><img width='16' height='16' src='img/icons/harvest.png' alt='o'> <a class='epic' href='?shop=harvester'>Комбайн</a> <span class='minor'>(<span>$ank[harvester]</span>)</span></li>";
if($ank['harvester2']>0)echo "<li><img width='16' height='16' src='img/icons/konveer.png' alt='o'> <a class='epic' href='?shop=harvester2'>Комбайн Дон</a> <span class='minor'>(<span>$ank[harvester2]</span>)</span></li>";
if($ank['catchfish']>0)echo "<li><img width='16' height='16' src='img/icons/riboulovitel.png' alt='o'> <a class='epic' href='?shop=catchfish'>Рыбоуловитель</a> <span class='minor'>(<span>$ank[catchfish]</span>)</span></li>";
if($ank['sponder']>0)echo "<li><img width='16' height='16' src='img/icons/prudfilter.png' alt='o'> <a class='epic' href='?shop=sponder'>Пруд фильтр</a> <span class='minor'>(<span>$ank[sponder]</span>)</span></li>";
if($ank['soiler']>0)echo "<li><img width='16' height='16' src='img/icons/soil.png' alt='o'> <a class='epic' href='?shop=soiler'>Удобритель</a> <span class='minor'>(<span>$ank[soiler]</span>)</span></li>";
if($ank['conveyor']>0)echo "<li><img width='16' height='16' src='img/icons/harvest.png' alt='o'> <a class='epic' href='?shop=conveyor'>Конвейер</a> <span class='minor'>(<span>$ank[conveyor]</span>)</span></li>";
if($ank['fooder']>0)echo "<li><img width='16' height='16' src='img/icons/plate.png' alt='o'> <a class='epic' href='?shop=fooder'>Кормушка</a> <span class='minor'>(<span>$ank[fooder]</span>)</span></li>";
if($ank['fooder2']>0)echo "<li><img width='16' height='16' src='img/fooder2.png' alt='o'> <a class='epic' href='?shop=fooder2'>Удобрыныч</a> <span class='minor'>(<span>$ank[fooder2]</span>)</span></li>";
if($ank['conveyor2']>0)echo "<li><img width='16' height='16' src='img/conv2.png' alt='o'> <a class='epic' href='?shop=conveyor2'>Трейлер</a> <span class='minor'>(<span>$ank[conveyor2]</span>)</span></li>";
if($ank['hydropinics_time']>$time)echo "<li><img width='16' height='16' src='img/icons/hydropinics.png' alt='o'> <a class='epic' href='?shop=hydropinics'>Гидропоника</a><span class='minor'> $ank[hydropinics_type]% на <span>".time_left($ank['hydropinics_time']-$time)."</span></span></li>";
if($ank['scarecrow_time']>$time)echo "<li><img width='16' height='16' src='img/icons/scarecrow.png' alt='o'> <a class='epic' href='?shop=scarecrow'>Пугало</a><span class='minor'> на <span>".time_left($ank['scarecrow_time']-$time)."</span></span></li>";
if($ank['vetriak_time']>time())echo "<li><img width='16' height='16' src='img/icons/vetriak.png' alt='o'> <a class='epic' href='?shop=vetriak'>Ветряк</a><span class='minor'> на <span>".time_left($ank['vetriak_time']-$time)."</span></span></li>";
//echo "<li><img width='16' height='16' src='img/icons/dog.png' alt='o'> <a class='epic' href='?shop=dog'>Собака</a><span class='minor'> на <span>".time_left($ank['dog_time']-$time)."</span></span></li>";
if($ank['time_shmel']>$time)echo "<li><img width='16' height='16' alt='o' src='img/icons/heli1n.png'> <a class='epic' href='?shop=helicopter&1'>Шмель</a><span class='minor'> на <span>".time_left($ank['time_shmel']-$time)."</span></span></li>";
if($ank['time_yastreb']>$time)echo "<li><img width='16' height='16' alt='o' src='img/icons/heli2n.png'> <a class='epic' href='?shop=helicopter&2'>Ястреб</a><span class='minor'> на <span>".time_left($ank['time_yastreb']-$time)."</span></span></li>";
if($ank['time_drakon']>$time)echo "<li><img width='16' height='16' alt='o' src='img/icons/heli3n.png'> <a class='epic' href='?shop=helicopter&3'>Дракон</a><span class='minor'> на <span>".time_left($ank['time_drakon']-$time)."</span></span></li>";
echo "</ul>";
$ban=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_ban` WHERE `id_user` = '$ank[id]' AND (`time` > '$time' OR `izg` = '1') ORDER BY `id` DESC LIMIT 1"));
$us_ban=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_user` WHERE `id` = '$ban[id_who]'"));
if($ban['id'])
{
echo "<ul class='pt'>
<div>
<li class='major'><span>".($ban['izg']==1?'Изгнание':"Обет Молчания до ".vremja($ban['time']))."</span>, выдал".($us_ban['pol']==0?'a':null)." <span>";
echo on_k($us_ban['id']);
echo "<a href='?user=$us_ban[id]'> ".nc($us_ban['id'])."</a></span><span>, (".output_text($ban['msg']).")</span></li></div></ul>";
}

if(isset($uct))
{
echo "<ul class='minor pt'>\n
<li>Колхоз: <a href='?collective=$uct[id]'><span>".hsc($uct['name'])."</span></a> (".($mcu['status']<=3 && isset($mc) && $ank['id']!=$ku['id'] && $uctu['status']>$mcu['status'] && $uct['id']==$mc['id']?"<a href='?user=$ank[id]&status_ct'>":null)."<span><span>$uctu[status_name]</span></span>".($mcu['status']<=3 && isset($mc) && $ank['id']!=$ku['id'] && $uctu['status']>$mcu['status'] && $uct['id']==$mc['id']?"</a>":null).")</li>\n
<li>Опыт в колхозе: <span><img width='16' height='16' src='img/icons/experience.png' alt='o'> <span class='title'>".rating($uctu['rating'])."</span> <span class='minor'>(<span>$uctu[rating]</span>)</span></span></li>\n
<li>Опыт за неделю: <span><img width='16' height='16' src='img/icons/experience.png' alt='o'> <span class='title'>".rating($uctu['rating_week'])."</span> <span class='minor'>(<span>$uctu[rating_week]</span>)</span></span></li>\n
</ul>\n
<ul class='minor'>\n
<li>Вклад рубинов: <span><img width='16' height='16' src='img/icons/ruby.png' alt='o'> <span class='title'>$uctu[rubies]</span></span></li>\n
<li>Вклад монет: <span><img width='16' height='16' src='img/icons/money.png' alt='o'> <span class='title'>$uctu[money]</span></span></li>\n
</ul>\n";
}

//if($ku['id']==1 || $ank['status']==0 && $ku['id']==1)echo "<ul class='bd'><li class='minor'>Доступ: ".($ank['dostup']==0?"Закрыт":"<span class='nick".($ank['dostup']==1?"Supporter":null)."'>".($ank['dostup']==1?"Открыт":null)."</span>")." ".($ku['id']==1 && $ank['id']!=$ku['id'] && ($ku['dostup']==1 || $ku['id']==1)?"<a href='?user=$ank[id]&adm'>[ред]</a>":null)."</li></ul>".($ku['status']==3?" <a href='?admin=users&edit=$au[id]'>[Ред игрока]</a>":null)."<span class='minor'>";

echo"<span class='minor'>";
echo "<li>Опыт личный: <span><img width='16' height='16' src='img/icons/experience.png' alt='o'> <span class='title'>".rating($ank['rating'])."</span> <span class='minor'>(<span>$ank[rating]</span>)</span></span></li>";
echo "<li>Уровень: <span class='title'>$ank[level]</span></li>";
//echo "<li>Игровое время: <span class='title'>".time_left($ank['time'])."</span></li>";
echo "<li>Дата регистрации: <span>".vremja($ank['time_start'])."</span> (id:<span>$ank[id]</span>)</li>";
if($ank['brak']!=NULL){
$brak = mysql_querll("SELECT * FROM `kolhoz_user` WHERE `nick`='$ank[brak]'"); $brak = mysql_fetch_assoc($brak);
if ($ank['pol']==1) echo "Женат на: "; else echo "Замужем за: ";
echo''.on_k($brak["id"]).''; echo'<span> <a href="?user='.$brak["id"].'">'.nc($brak["id"]).'</a> </span></li>'; }
if($ank['expdouble']=='Mon')$day='понедельник';
if($ank['expdouble']=='Tue')$day='вторник';
if($ank['expdouble']=='Wed')$day='среда';
if($ank['expdouble']=='Thu')$day='четверг';
if($ank['expdouble']=='Fri')$day='пятница';
if($ank['expdouble']=='Sat')$day='суббота';
if($ank['expdouble']=='Sun')$day='воскресенье';
echo "<li>Двойной опыт: <span class='title'>$day</span></li>";
if($ku['status']==1 || $ku['status']==3)echo "<li><span><img width='16' height='16' src='img/icons/money.png' alt='o'> $ank[money] <img width='16' height='16' src='img/icons/ruby.png' alt='o'> $ank[rubies] <img width='16' height='16' src='img/icons/almaz.png' alt='o'> $ank[almaz]</span></li>";
echo "</ul></span>";
echo "<ul class='pt'>";
if(isset($mc) && $mcu['status']<=3 && isset($mc) && !isset($uct))echo "<li><img width='16' height='16' src='img/icons/guild.png' alt='o'> ".($ank['level']>=10?"<a href='?user=$ank[id]&inct'>":"<span>")."Пригласить в колхоз".($ank['level']>=10?"</a>":"</span> <span class='minor'>(уровень ниже 10-того)</span>")."</li>";
echo "<li><span><img width='16' height='16' src='img/icons/work_log.png' alt='o'> <a href='?user=$ank[id]&history'>Трудовая книжка</a> <span class='title'>(<span>".mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_collective_history` WHERE `id_user` = '$ank[id]'"),0)."</span>)</span></li>";
echo "<li></span><img width='16' height='16' src='img/icons/rating.png' alt='o'> <a href='?dostig=$ank[id]'>Достижения</a> <span class='title'>(<span>$ank[dostig]</span>)</span>
</li>";
if($ank['id']!=$ku['id'])
{
echo "<li></li>";
echo "<li><img alt='' width='16' height='16' src='img/icons/plants.png'> <a href='?uf=$ank[id]'>Грядки</a></li>";
if($ank['level']>=10)echo "<li><img alt='' width='16' height='16' src='img/icons/animal.png'> <a href='?upf=$ank[id]'>Загоны</a></li>";
if($ank['level']>=1)echo "<li><img alt='' width='16' height='16' src='img/cook.png'> <a href='?uc=$ank[id]'>Погреб</a></li>";
if($ank['level']>=2)echo "<li><img alt='' width='16' height='16' src='img/icons/fish.png'> <a href='?uo=$ank[id]'>Пруды</a></li>";
if($ank['level']>=1)echo "<li><img alt='' width='16' height='16' src='img/icons/dig.png'> <a href='?uw=$ank[id]'>Работа</a></li>";
}
//echo "<li><img width='16' height='16' src='img/icons/chat.png' alt='o'> <a href='?communication=$ank[id]'>Общение</a></li>";
echo "</ul>";
if($ank['id']==$ku['id'])
{
echo "<div><a href='?settings'>Настройки</a></div>";
echo "<div><a href='http://$_SERVER[HTTP_HOST]/?user=$ku[id]&autologin'>Автологин</a></div>";
if(isset($_GET['autologin'])){
echo'<input value="http://'.$_SERVER[HTTP_HOST].'/?autologin='.$ku[autologin].'" name="avto" size="50"/><br/>';
}
//echo'<a href="www.'.$_SERVER[HTTP_HOST].'/?autologin='.$ku[autologin].'"/>t</a>';
echo "<div><a href='?ikonka'>Иконки</a></div>";
echo "<div><a href='?ref'>Рефералы</a></div>";
echo "<div><a href='http://$_SERVER[HTTP_HOST]/?user=$ku[id]&theme'>Тема оформления</a></div>";
if(isset($_GET['theme']))
{
if($_GET['theme']=="ok" and !empty ($_POST['menu']))
{
mysql_querll("UPDATE `kolhoz_user` SET `theme` = '$_POST[menu]' WHERE `id` = '$ku[id]'");
msg_game("Тема успешно изменена");
}
else
{
error_reporting(E_ALL^E_NOTICE);
echo'<form action="http://'.$_SERVER[HTTP_HOST].'/?user='.$ku[id].'&theme=ok" method="post" name="them"> <select name="menu" size="1"> <option value="1">Стандартная</option> <option selected="2" value="2">Класическая</option> <option selected="3" value="3">Синяя</option> <option selected="4" value="4">Светло-зеленая</option> <option selected="5" value="5">Темная</option> <input type="submit" value="Изменить"></select></form>';
}
}
if($ank['level']>=1000)echo "<div><a href='http://$_SERVER[HTTP_HOST]/?user=$ku[id]&ikonka'>Иконка</a></div>";
if(isset($_GET['ikonka']))
{
if($_GET['ikonka']=="ok" and !empty ($_POST['menu']))
{
mysql_querll("UPDATE `kolhoz_user` SET `ikonka` = '$_POST[menu]' WHERE `id` = '$ku[id]'");
msg_game("Иконка успешно изменена");
}
else
{
error_reporting(E_ALL^E_NOTICE);
echo'<form action="http://'.$_SERVER[HTTP_HOST].'/?user='.$ku[id].'&ikonka=ok" method="post" name="them"> <select name="menu" size="1"> <option value="1">NEW</option> <option selected="2" value="2">Обычная</option> <option selected="2" value="3">Синяя</option> <input type="submit" value="Изменить"></select></form>';
}
}
echo "<div><a href='?change_nickname'>Сменить ник</a></div>";
}
if($ku['status']>0)echo "<div><a href='?user=$ank[id]&bans'>История нарушений</a></div>";
echo "</div>";
include_once 'inc/foot.php';
?>br /