<?php
require_once ('system/func.php');
$title = 'IP проверка';
require_once ('system/header.php');
auth(); // Закроем от гостей
access(1);
$id = abs(intval($_GET['id']));
if($id){
$prof = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '".$id."'"));
if(!$prof){
$_SESSION['msg'] = "Такой игрок не найден";
header("Location: ?");
exit();
}
$set['p_str'] = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `ip` = '$prof[ip]'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `users` WHERE `ip` = '$prof[ip]' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
echo "<div class='block'><b>IP: $prof[ip] [$k_post]</b><br>";
while($post = mysql_fetch_assoc($q)) {
echo " <a href='/profile/$post[id]'>".text($post['login'])."</a> ".ico('icons','level.png')." $post[level]ур.<br>";
}
str('?',$k_page,$page); // Вывод страниц
echo "</div>";

}
require_once ('system/footer.php');
?>
