Файл: online/include.online.php
Строк: 32
<?php
$on24 = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '" . TIME_TODAY . "'"), 0);
$on1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` >" . (TIME - 300) . ""), 0);
$on2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > " . (TIME - 500) . " AND `pereh` > '0'"), 0);
$on3 = $on1 + $on2;
echo "<div class = 'foot'><center>";
echo "<a href = '/online/'>Онлайн " . mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > " . (TIME - 300) . ""), 0) . "</a>";
echo " | ";
echo "<a href = '/online/guest.php'>Гостей " . mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > " . (TIME - 500) . " AND `pereh` > '0'"), 0) . "</a>";
echo " <span id = 'hide'><a href = '/online/info.php' title = 'Подробнее'><img src = '/style/icons/info_mini.png' /></a></span>";
echo "</center></div>";
$q = mysql_query("SELECT `id` FROM `user` WHERE `date_last` > '" . (TIME - 300) . "' ORDER BY `date_last` DESC LIMIT 7");
echo "<table class = 'foot'><tr><td class = 'null'>";
while ($ank = mysql_fetch_assoc($q)) {
$ank = get_user($ank['id']);
echo "<a href = '/info.php?id=$ank[id]' title = '$ank[nick]'>n";
avatar($ank['id'], '36');
echo "</a>";
}
echo "</td></tr></table>";