Файл: user/inc/online.php
Строк: 85
<?php
$set['title'] = 'Онлайн на сайте';
$k_post = mysql_result(query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '" . (time() - $set['user_online']) . "'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
$q = query("SELECT `id` FROM `user` WHERE `date_last` > '" . (time() - $set['user_online']) . "' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle fa-fw'></span> " . lang('Сейчас на сайте никого нет');
echo "</div>";
}
while ($ank = mysql_fetch_assoc($q)) {
$ank = get_user($ank['id']);
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], 80, 80);
echo "</td><td class='null'>";
echo nick($ank['id']);
if ($user['id'] != $ank['id']) {
echo "<span style='float:right;'>";
echo "<a href='/mail.php?id=$ank[id]'><span class='fa fa-envelope fa-2x'></span></a>";
echo "</span>";
}
if ($ank['group_access'] > 1) {
echo " <span class='label label-default'>" . lang($ank['group_name']) . "</span> ";
}
if ($ank['url_title'] != null and $user['group_access'] > 1) {
echo "<br /><span class='fa fa-map-marker fa-fw'></span> ".output_text($ank['url_title']);
}
//echo "<br />" . lang('Регистрация') . ": <span style='color:grey;'>" . date::time($ank['date_reg']) . "</span>n";
echo "<br /><span class='fa fa-clock-o fa-fw'></span> " . lang('Посл. посещение') . ": <span style='color:grey;' title='" . date::time($ank['date_last']) . "'>" . date::times($ank['date_last']) . "</span><br />n";
/*
if (user_access('user_show_ip') && $ank['ip'] != 0 and $ank['ip'] != NULL and $user['level'] > $ank['level']) {
echo "IP: <span style='color:grey;'>" . long2ip($ank['ip']) . "</span><br />";
}
*
*/
if (user_access('user_collisions') and $user['level'] > $ank['level'] and $set['user_collision_online'] == 1) {
echo '<small>';
$mass[0] = $ank['id'];
$collisions = user_collision($mass);
if (count($collisions) > 1) {
echo lang('Возможные логины') . ": n";
echo "<span style='color:grey;'>n";
for ($i = 1; $i < count($collisions); $i++) {
$ank_coll = mysql_fetch_assoc(query("SELECT * FROM `user` WHERE `id` = '$collisions[$i]' LIMIT 1"));
echo "<a href='/" . $ank_coll['mylink'] . "'>" . nick($ank_coll['nick']) . "</a>";
}
echo "</span>n";
}
echo '</small>';
}
echo '</td></tr></table>';
}
if ($k_page > 1) {
str("?", $k_page, $page);
} // Вывод страниц