Файл: zfarm.mobi/inc/user/user.php
Строк: 673
<?
$title='Игрок';
include_once '../system/config.php';
if(isset($_GET['user']) && ($_GET['user'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".($_GET['user'])."' LIMIT 1"),0)!=0){
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['user'])."'"));
$au=$ank;
$mc['users_max']=($mc['level']*5)+10+$mc['users_add'];
$mc['users']=mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_user` WHERE `id_collective` = '$mc[id]'"),0);
$referals = mysql_result (mysql_query("SELECT COUNT(*) FROM `referals` WHERE `id_user` = '".$ank['id']."'"),0);
if(isset($_GET['history']))include_once'../user/history.php';
elseif(isset($_GET['bans']) && ($ank['id']==$ku['id'] || $ku['status']>0))include_once'../user/bans.php';
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_user` WHERE `id_user` = '$ank[id]'"),0)!=0)
{
$uctu=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_user` WHERE `id_user` = '$ank[id]'"));
$uct=mysql_fetch_array(mysql_query("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['razvod']) && isset($_GET['ok']))
{
$love = mysql_query("SELECT * FROM `kolhoz_user` WHERE `id`='".($ku['brak'])."'");
$love=mysql_fetch_assoc($love);
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$love[id]', `id_kont` = '0', `msg` = 'Вы разведены с ".($ku['nick']).".', `time` = '$time', `type` = 'to'");
if($ku['pol']==0)
{
$c=mysql_query("SELECT * FROM `kolhoz_zags` WHERE `he`='".$ku['brak']."'");$c=mysql_fetch_assoc($c);
mysql_query("INSERT INTO `kolhoz_zags` SET `who`='0', `he` = '$c[he]', `she` = '$ku[id]', `she_yes` = '1', `collective` = '".($c['collective'])."', `time` = '$time'");
}
if($ku['pol']==1)
{
$c=mysql_query("SELECT * FROM `kolhoz_zags` WHERE `she`='".$ku['brak']."'");$c=mysql_fetch_assoc($c);
mysql_query("INSERT INTO `kolhoz_zags` SET `who`='0', `he` = '$ku[id]', `she` = '$c[she]', `she_yes` = '1', `collective` = '$mc[id]', `time` = '$time'");
}
mysql_query("UPDATE `kolhoz_user` SET `brak`='' WHERE `id`='".($ku['brak'])."'");
mysql_query("UPDATE `kolhoz_user` SET `brak`='' WHERE `id`='".($ku['id'])."'");
echo "<div class='feedback'>
<ul class='feedbackPanel'>
<li class='feedbackPanelINFO'>
<span class='feedbackPanelINFO'>Вы развелись с ".nc($ku['brak']).".</span>
</li>
</ul>
</div>";
}
elseif(isset($_GET['razvod']))
{
$brak = mysql_query("SELECT * FROM `kolhoz_user` WHERE `id`='$ank[brak]'"); $brak = mysql_fetch_assoc($brak);
echo '<div class="event"><h1>Подтверждение</h1></div>
<div class="content"><ul class="block">
<li><span >Вы уверены что хотите разветись с '.nc($brak["id"]).'?</span></li>
<li class="pt"><img alt="" src="/img/icons/tick.png"> <a href="/user/'.$ku["id"].'/razvod/ok"><span> Да, подтверждаю</span></a></li>
<li><img alt="" src="/img/icons/cross.png"> <a href="/user/'.$ku["id"].'"><span> Нет, отказываюсь</span></a></li></ul>';
include_once '../system/foot.php';
exit;
}
if(isset($_GET['no_chat']) && ($ku['status']>0)){
{
mysql_query("Delete from `kolhoz_chat` WHERE `id_user` = '".$ank['id']."'");
header("Location: /user/".$ank['id']."");
}
}
if(isset($_GET['no_forum']) && ($ku['status']>0)){
{
mysql_query("Delete from `kolhoz_forum` WHERE `id_user` = '".$ank['id']."'");
header("Location: /user/".$ank['id']."");
}
}
if(isset($_GET['izg']) && ($ku['id']==1 || $ku['status']==3 || $ku['status']==1) && $ku['id']!=$ank['id'])
{
include_once'../user/userban.php';
}
if(isset($_GET['technics']))
{
include_once'../user/technics.php';
}
if(isset($_GET['heli']))
{
include_once'../user/heli.php';
}
if(isset($_GET['heli']))
{
include_once'../user/heli.php';
}
if(isset($_GET['bonus']))
{
include_once'../user/bonus.php';
}
elseif(isset($_GET['ban']) && ($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id']){
if(isset($_POST['msg'])){
$timeban=$time;
$msg=$_POST['msg'];
if ($_POST['time']=='min')$timeban+=1*60;
if ($_POST['time']=='chas')$timeban+=1*60*60;
if ($_POST['time']=='sut')$timeban+=1*60*60*24;
if ($_POST['time']=='ned')$timeban+=7*60*60*24;
if($timeban<$time)err_game('Ошибка времени бана');
elseif(strlen2($_POST['reason'])<1)err_game("Введите нарушение");
else {
$reason=$_POST['reason'];
mysql_query("INSERT INTO `kolhoz_ban` SET `id_user` = '$ank[id]', `id_who` = '$ku[id]', `msg` = '".my_esc($_POST['msg'])."', `izg` = '0', `reason` = '".($reason)."', `time` = '$timeban'");
header("Location:/user/$ank[id]");
exit;
}
}
echo "<form method='post'>";
echo "<div class='title'>Время бана:</div><div class='div'>n";
echo'<select name="time">
<option value="chas">Час<br>
</option>
<option value="sut">Сутки
</option>
<option value="ned">Неделю
</option></select>';
echo "</div><div class='title'>Нарушение:<br /></div><div class='div'>n";
echo'<select name="msg">
<option value="Мат">Мат<br>
</option>
<option value="Ругань">Ругань
</option>
<option value="Спамер">Спамер
</option>
<option value="Оффтоп">Оффтоп
</option>
<option value="Провокация">Провокация
</option>
<option value="Прилетело НЛО и забанило">НЛО
</option>
<option value="Оскорбление игроков">Оскорбление игроков
</option>
<option value="Оскорбление администрации">Оскорбление администрации
</option>
<option value="Обсуждение администрации">Обсуждение администрации
</option>
<option value="Нарушение правил чата">Нарушение правил чата
</option>
<option value="Нарушение правил форума">Нарушение правил форума
</option>
<option value="Нарушение правил общения с администрацией">Нарушение правил общения с адм.
</option>
<option value="Здесь дети играют">Здесь дети играют
</option>';
echo"<textarea class='wide' rows='3' name='reason'></textarea><br>";
echo "<input type='submit' value='Забанить' />n";
echo "</div>";
include_once '../system/foot.php';
}
elseif(isset($_GET['inct']) && $mcu['status']<=3 && isset($mc) && !isset($uct) && $ank['level']>=10)
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_invite` WHERE `id_user` = '$ank[id]'"),0)!=0)err_game("Этому фермеру уже выслано приглашение.");
elseif($mc['users']==$mc['users_max'])err_game("В колхозе нет свободных мест!");
elseif($ank['invitect']==1)err_game("Этот фермер установил запрет на приглашение в колхоз!");
else
{
mysql_query("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_query("UPDATE `kolhoz_collective_user` SET `status` = '$status_ct' WHERE `id` = '$uctu[id]'");
if($status_ct<$uctu['status'])mysql_query("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_query("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_query("UPDATE `kolhoz_collective_user` SET `status` = '1' WHERE `id` = '$uctu[id]'");
mysql_query("UPDATE `kolhoz_collective_user` SET `status` = '2' WHERE `id` = '$mcu[id]'");
mysql_query("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_query("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]/statusKolhoz/1/ok","/user/$ank[id]/statusKolhoz");
include_once '../system/foot.php';
}
elseif($status_ct==0 && $mcu['status']<=3 && isset($mc))
{
if(isset($_GET['ok']))
{
mysql_query("DELETE FROM `kolhoz_collective_user` WHERE `id` = '$uctu[id]'");
mysql_query("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_query("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]/statusKolhoz/0/ok","/user/$ank[id]/statusKolhoz");
include_once '../system/foot.php';
}
}
echo "<div class='title'>$au[nick]</h2></div>";
echo '<div class="content"><div class="div">';
$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]/statusKolhoz/$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 '../system/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_query("UPDATE `kolhoz_user` SET `status` = '".intval($_GET['status'])."' WHERE `id` = '$ank[id]'");
header("Location:/user/$ank[id]");
}
echo "<div class='title'>$au[nick]</h2></div>";
echo '<div class="content"><div class="div">';
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 '../system/foot.php';
}
echo"<div class='rzd2'></div><div class='menuin2'>";
echo "<div class='title'>$au[nick], $ank[level] ур.</h2></div>";
echo"<div class='div'>";
if(($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])echo "<a href='/user/$ank[id]/ban'>[бан]</a>";
if(($ku['id']==1 || $ku['status']==1 || $ku['status']==3) && $ku['id']!=$ank['id'])echo " <a href='/user/$ank[id]/izg'>[изгн]</a>";
if(($ku['id']==1 || $ku['status']==3) && $ku['id']!=$ank['id'])echo " <a href='/user/$ank[id]/status'>[статус]</a>";
if(($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])echo " <a href='/user/$ank[id]/bans'>[нарушения]</a>";
if(($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])echo " <br>Очистить: </a>";
if(($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])echo " <a href='/user/$ank[id]/noChat'>[чат]</a>";
if(($ku['id']==1 || $ku['status']>0) && $ku['id']!=$ank['id'])echo " <a href='/user/$ank[id]/noForum'>[форум]</a><hr color='#CCCC00' size='1'>";
echo "<a class='epic' href='/user/$ank[id]/technics'>Техника</a><span class='minor'>: <span class='n'><span>$ank[tehnika]</span></span>";
if($ank['scarecrow_time']>$time || $ank['hydropinics_time']>$time)echo ", <a class='epic' href='/user/$ank[id]/bonus'> Бонусы</a>: ";
if($ank['scarecrow_time']>$time)echo "<img src='/img/icons/scarecrow.png' alt='o'>";
if($ank['hydropinics_time']>$time)echo "<img src='/img/icons/hydropinics.png' alt='o'>$ank[hydropinics_type]%";
if($ank['time_shmel']>$time || $ank['time_yastreb']>$time || $ank['time_drakon']>$time)echo ", <a class='epic' href='/user/$ank[id]/heli'> Вертолеты</a>: ";
if($ank['time_shmel']>$time)echo "<img alt='o' src='/img/icons/heli1n.png'>";
if($ank['time_yastreb']>$time)echo "<img alt='o' src='/img/icons/heli2n.png'>";
if($ank['time_drakon']>$time)echo "<img alt='o' src='/img/icons/heli3n.png'>";
if(isset($uct))
{
echo "<li>
Колхоз: ";
if($uct['medal']>0)echo "<img alt='o' src='/img/medal/$uct[medal].png'>";
echo"
<a href='/kolhoz/$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>";
}
echo "<hr color='#CCCC00' size='1'>";
echo "".($ku['id']==$ank['id']?"<a href='/AboutMe'>":"<span>")."О себе".($ku['id']==$ank['id']?"</a>":"</span>").": <span>".($ank['name']==NULL?'-':hsc($ank['name']))."</span>, <span>".($ank['city']==NULL?'-':hsc($ank['city']))."</span>, <span>".($ank['date']==NULL?'-':hsc($ank['date']))."</span>, <span>".($ank['contacts']==NULL?'-':hsc($ank['contacts']))."</span>";
echo "<hr color='#CCCC00' size='1'>";
$users =mysql_fetch_array(mysql_query("SELECT * FROM `dostig` WHERE `id_user` = '$ank[id]'"));
if($ank['id']==$ku['id'])echo '<a href="/achievement/Rating">';
if($users['rati']>0)echo ' <img width="32" height="32" src="/img/star.png" alt="" n="Опытный"/>';
if($users['rati']!=1)echo ' <img width="32" height="32"src="/img/star_no.png" alt="" n="Опытный"/></a>';
if($ank['id']==$ku['id'])echo '<a href="/achievement/Online">';
if($users['onli']>0)echo ' <img width="32" height="32" src="/img/star.png" alt="" n="Хардкорный Геймер"/>';
if($users['onli']!=1)echo ' <img width="32" height="32"src="/img/star_no.png" alt="" n="Хардкорный Геймер"/></a>';
if($ank['id']==$ku['id'])echo '<a href="/achievement/Forum">';
if($users['forumi']>0)echo ' <img width="32" height="32" src="/img/star.png" alt="" n="В каждой бочке..."/>';
if($users['forumi']!=1)echo ' <img width="32" height="32"src="/img/star_no.png" alt="" n="В каждой бочке..."/></a>';
if($ank['id']==$ku['id'])echo '<a href="/achievement/Chat">';
if($users['chati']>0)echo ' <img width="32" height="32" src="/img/star.png" alt="" n="Мастер Дискуссий"/>';
if($users['chati']!=1)echo ' <img width="32" height="32"src="/img/star_no.png" alt="" n="Мастер Дискуссий"/></a>';
if($ank['id']==$ku['id'])echo '<a href="/achievement/Donat">';
if($users['donati']>0)echo ' <img width="32" height="32" src="/img/star.png" alt="" n="Донатер"/>';
if($users['donati']!=1)echo ' <img width="32" height="32" src="/img/star_no.png" alt="" n="Донатер"/></a> ';
if($ank['id']==$ku['id'])echo ' <a href="/achievement/">(?)</a></li>';
echo "<hr color='#CCCC00' size='1'>";
$foto=mysql_fetch_array(mysql_query("SELECT * FROM `user_avatar` WHERE `id_user` = '$ank[id]' AND `moderation` = '1'"));
if ($foto['moderation'])
{
echo "<img style='width: 150px; border-radius: 5px;' src='/photo/$au[id].png' alt='o'>";
}
else
{
if($ank['pol']==1)echo "<img src='/photo/ava-m.png' alt='o' alt='farm' style='border-radius: 5px'>";
if($ank['pol']==0)echo "<img src='/photo/ava-f.png' alt='o' alt='farm' style='border-radius: 5px'>";
}
if($ank['forum']+$ank['chat']>1000)echo "</div><div class='div'><center>";
if($ank['forum']+$ank['chat']>1000)echo "<li><img src='/img/medal/bronze.png' alt='o' alt='bronze' >";
if($ank['forum']+$ank['chat']>2000)echo "<img src='/img/medal/silver.png' alt='o' alt='silver'>";
if($ank['forum']+$ank['chat']>4000)echo "<img src='/img/medal/gold.png' alt='o' alt='gold'>";
if($ank['forum']+$ank['chat']>1000)echo "</div><div class='div'></center>";
echo "<div class='pt'><img src='/img/icons/chat.png' alt='o'> ".($ku['id']==$ank['id']?"<a href='/MeStatus'>":"<span>")."Статус".($ku['id']==$ank['id']?"</a>":"</span>").": <span>".($ank['stat']==NULL?'-':hsc($ank['stat']))."</span></div>";
if($ank['id']==$ku['id'])echo "<img src='/img/icons/search.png' alt='o'> <a href='/photoUpload'>Сменить фото</a>";
if($ank['id']!=$ku['id'])
{
echo "<div class='ptm'>";
echo "<img src='/img/icons/pencil.png' alt='o'> <a href='/mail/newMsg/$ank[id]'>Написать</a>";
echo "</div>";
echo "<div><img src='/img/icons/gift_plus.png' alt='o'> <a href='/presents/$ank[id]/do'>Подарить</a></div>";
}
echo "</ul>";
$ban=mysql_fetch_array(mysql_query("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_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$ban[id_who]'"));
if($ban['id'])
{
echo'<div style="margin-top:1px"></div>';
echo "<br>
<div>
<li class='major'><span>".($ban['izg']==1?'Изгнание':"Обет Молчания до ".vremja($ban['time']))."</span>, выдал".($us_ban['pol']==0?'a':null)." <span>";
if($us_ban['id']>0)
{
echo on_k($us_ban['id']);
echo "<a href='/user/$us_ban[id]'>".nc($us_ban['id'])."</a></span>";
}
else
{
echo'<font color="red">Система</font>';
}
echo"<span>, (".output_text($ban['msg']).")</span></li></div></ul><br>";
}
if($ank['status']>0)echo "<br>Роль: ".($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['id']==1)?"":null)."</li></ul><br>";
if(isset($uct))
{
echo "<ul class='minor pt'>n
<li>Опыт в колхозе: <span><img src='/img/icons/experience.png' alt='o'><span class='n'>".rating($uctu['rating'])."</span> <span class='minor'>(<span>$uctu[rating]</span>)</span></span></li>n
<li>Опыт за неделю: <span><img src='/img/icons/experience.png' alt='o'> <span class='n'>".rating($uctu['rating_week'])."</span> <span class='minor'>(<span>$uctu[rating_week]</span>)</span></span></li>n
</ul>n";
$collective=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_user` WHERE `id_user` = '$ank[id]'"));
if($mcu['id_collective']==$collective['id_collective']){echo"
<ul class='minor'>n
<li>Вклад рубинов: <span><img src='/img/icons/ruby.png' alt='o'> <span class='n'>$uctu[rubies]</span></span></li>n
<li>Вклад монет: <span><img src='/img/icons/money.png' alt='o'> <span class='n'>$uctu[money]</span></span></li>n
</ul>n";
}
}
echo "<ul class='minor pt'><li>Опыт личный: <span><img src='/img/icons/experience.png' alt='o'><span class='n'>".rating($ank['rating'])."</span> <span class='minor'>(<span>$ank[rating]</span>)</span></span></li>";
$qusR=mysql_query("SELECT * FROM `kolhoz_user` ORDER BY rating DESC");
$i=0;
while($usR=mysql_fetch_array($qusR))
{
$i++;
if($usR[id]==$ank[id]){
echo ' Место в рейтинге: <img src="/img/icons/experience.png" alt="" title=""/>'.$i.'';
}
}
echo "<li>Уровень: <span class='n'>$ank[level]</span></li>";
echo "<li>Игровое время: <span class='n'>".time_left($ank['time'])."</span></li>";
$t=time()-3600;
echo "<li>Статус: ";
echo "".on_k($ank['id'])."";
echo " <span>".($ank['date_last']<=$t?"<font color='red'>Оффлайн</font>":"<font color='green'>Онлайн</font>")."</span></li>";
if($au['date_last']<=$t)echo "<li>Последний вход: ".vremja($au['date_last'])."</li>";
echo "<li>Дата регистрации: <span>".vremja($ank['time_start'])."</span> (id:<span>$ank[id]</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='n'>$day</span></li>";
if($ank['brak']!=NULL)
{
$brak = mysql_query("SELECT * FROM `kolhoz_user` WHERE `id`='$ank[brak]'"); $brak = mysql_fetch_assoc($brak);
echo "<li>";
if ($ank['pol']==1)
echo "Женат на: ";
else
echo "Замужем за: ";
echo ''.on_k($brak["id"]).'';
echo '<span> <a href="/user/'.$brak["id"].'">'.nc($brak["id"]).'</a> </span>';
if($ank['id']==$ku['id'])echo ' <a href="/user/'.$ku["id"].'/razvod"><span class="minor pt">[развод]</span></a> </li>';
}
if($ank['id']==$ku['id'] || $ku['status']>0){echo "<li><a href='/infouser/$ank[id]'>Операции с рубинами</a></li>";}
if($ku['status']==1 || $ku['status']==3)echo "<li><span><img src='/img/icons/money.png' alt='o'> $ank[money] <img src='/img/icons/ruby.png' alt='o'> $ank[rubies]</span></li>";
echo "</ul>";
echo "<br>";
if($mc['id']>0 && $mcu['status']<=3 && !isset($uct))echo "<li><img 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 src='/img/icons/work_log.png' alt='o'> <a href='/user/$ank[id]/history'>Трудовая книжка</a></li>";
if($ank['id']!=$ku['id'])
{
echo "<li></li>";
echo "<li><img alt='' src='/img/icons/plants.png'> <a href='/uf/$ank[id]'>Грядки</a></li>";
if($ank['level']>=10)echo "<li><img alt='' src='/img/icons/animal.png'> <a href='/upf/$ank[id]'>Загоны</a></li>";
if($ank['level']>=10)echo "<li><img alt='' src='/img/icons/last_recipes.png'> <a href='/uc/$ank[id]'>Погреб</a></li>";
}
echo "<li><img src='/img/icons/chat.png' alt='o'> <a href='/communication/$ank[id]'>Общение</a></li>";
echo "</ul>";
if($ank['id']==$ku['id'])
{
}
echo "</div>";
echo"</div></div><div class='rzd2'></div>";
include_once '../system/foot.php';
}
?>