Файл: forum/online.php
Строк: 32
<?php
require_once '../sys/inc/start.php';
require_once '../sys/inc/compress.php';
require_once '../sys/inc/sess.php';
require_once '../sys/inc/settings.php';
require_once '../sys/inc/db_connect.php';
require_once '../sys/inc/ipua.php';
require_once '../sys/inc/fnc.php';
require_once '../sys/inc/user.php';
$set['title'] = 'Кто сейчас на форуме';
require_once '../sys/inc/thead.php';
aut();
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '" . (time() - 300) . "' AND `url` like '/forum/%'"), 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 `date_last` > '" . (time() - 300) . "' AND `url` like '/forum/%' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
if ($k_post == 0) {
echo "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/bullet_error.png' /> Нет результатов";
echo "</td></tr></table>";
}
while ($forum = mysql_fetch_array($q)) {
echo "<table class = 'foot'><tr><td class = 'icon14'>";
avatar($forum['id'], '36');
echo "</td><td class = 'null'>";
user($forum['id']);
echo "</td></tr></table>";
}
if ($k_page > 1) {
str("?", $k_page, $page);
}
echo "<div class = 'foot'>";
echo "<img src = '/style/icons/left.png' /> <a href = '/forum/'>Форум</a>";
echo "</div>";
require_once '../sys/inc/tfoot.php';