Online users on home?

778
.
Ego vir viden
# SpAgEtE (24.12.2014 / 18:48)
xD can u give another code
I asked on the forum
I'll tell you when I get an answer
.
Ok ill wait
.
selemet
Ego vir viden
# SpAgEtE (24.12.2014 / 20:14)
Ok ill wait


http://johncms.com/forum/index ... 76887
.
$onl = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 600) . "'"), 0);
$gonl = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_sessions` WHERE `lastdate` > '" . (time() - 600) . "'"), 0);
$ston = $onl + $gonl;
.
echo' <div class="menu">ONline '.$ston.' person</div>';
.
Assalomu alaykum do'stlar!
sniper_uz, bugun shu bolaga juda ko'p yordam berdiz-da
.
SpAgEtE
Here is my code this works

echo '</div><div class="menu">' . counters::online() . '<br />';
$sql = mysql_query("SELECT `id`, `name` FROM `users` WHERE `lastdate` > " . (time() - 300) . "");
$count = mysql_num_rows($sql);
if ($count) {
$i = $count;
//echo '<div style="text-align: center">';
while ($res = mysql_fetch_assoc($sql)) {
echo '<a href="' . $home . '/users/profile.php?user=' . $res['id'] . '">' . $res['name'] . '</a>' . ($count > 1 ? ', ' : '');
$count --;
.
# tronixit_uz (29.12.2014 / 14:26)
sniper_uz, bugun shu bolaga juda ko'p yordam berdiz-da
Rossiyada ikki uzbek korishib qoptida))
.
Assalomu alaykum do'stlar!
# sniper_uz (30.12.2014 / 17:39)
Rossiyada ikki uzbek korishib qoptida))
на русском пиши, а то забаню! .гг. Men Rossiyada emasman. Hakermisiz yoki koder, balki krakerdirsiz?
.
Assalomu alaykum do'stlar!
SpAgEtE, thanks my friend!
Всего: 24