File size: 1.06Kb
<?php
// by mides, wmclub.mobi
$title = 'Пользователи онлайн';
require('../config.php');
require('../includes/sys.php');
require('../includes/start.php');
require('../includes/header.php');
tp('Пользователи онлайн');
$all_online = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `online`"), 0);
if($all_online > 0){
$pages = ceil($all_online/$config['onpage']);
if(intval($_REQUEST['page'])){
$page = intval($_REQUEST['page']);
}else{
$page = 1;
}
$from = ($page-1)*$config['onpage'];
$online_result = mysql_query("SELECT * FROM `online` ORDER BY `time` DESC LIMIT $from, $config[onpage]");
while($online = mysql_fetch_assoc($online_result)){
if(empty($online['place'])){
$online['place'] = 'Главная';
}
echo '<a href="profile.php?u='.$online['id_user'].'">'.login($online['id_user']).'</a> » '.$online['place'].'<br />';
}
}
echo '<hr />';
navig($page, '?', $pages);
echo '<a href="../">На главную</a><br />';
echo '</div>';
require('../includes/tail.php');
?>