<?php
require_once '../core/system.php';
echo only_reg();
$header = 'Игроки онлайн';
require_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `online` > '".(time()-600)."'"),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 `user` WHERE `online` > '".(time()-600)."' ORDER BY `online` DESC LIMIT $start, $set[p_str]");
echo "<div class='player'>";
while($post = mysql_fetch_assoc($q)) {
echo '<img src="/images/icon/user.png"> <a href="/user/'.$post['id'].'/">'.$post['nick'].'</a> <img src="/images/icon/level.png"> '.$post['level'].'<br />';
} 
echo "</div>";
if ($k_page>1){
echo "<div class='dot-line'></div>";
str('?',$k_page,$page); // Вывод страниц
}
require_once '../core/foot.php';
?>