<?

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';

$set['title']='Соседи!'; // заголовок страницы
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='neighbors.gif'><br/><div class='grad16'>Ваши соседи</div></center>";
echo"<div class='ferm3'>";
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];


if ($k_post==0)
{
echo "  <td class='p_t'>\n";
echo "Нет результатов\n";
echo "  </td>\n";
}
$q=mysql_query("SELECT * FROM `user` ORDER BY `fermer_oput` DESC LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_array($q))
{

echo "<div class='p_t'>\n";
if($ank['id']!=$user['id'])
echo "<a href='fermers_gr.php?id=$ank[id]'>$ank[nick]</a>".online($ank['id'])."\n";
else
echo "<b>$ank[nick]</b> ".online($ank['id'])."\n";

echo "</div>\n";
echo "<div class='p_m'>";
include "inc/fermer_level.php";

echo "</div>";
}


if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class='foot'>";
echo "<a href='index.php'><img src='egg.png'> В игру</a><br/>";
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "</div>";

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