On/Off uživatelé + statistika členů a hostů
Přidal/a chelty dne May 07 2010 21:55:44
1) Jdi do administrace/panely/přidat panel
2) Smaž celé pole a vlož tam toto
[php]openside("online uživatelé");
echo "
";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 10");
echo "";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
if ($lastseen < 60) {
$lastseen = "
Online";
} elseif ($lastseen < 300) {
$lastseen = "
Offline";
} else {
$lastseen = "
Offline";
}
echo "\n | \n";
echo "
\n";
echo trimlink($data['user_name'], 15)."".$lastseen." | \n
\n";
}
}
echo "
";
echo "
";
echo "
";
echo "
";
echo "uživatelů: ".number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'"));
echo "
";
echo "online: 0";
echo "
";
echo "hostů: 0";
echo "
";
echo "
";
echo "
";
echo "
";
closeside();[/php]
Panel přidej/povol toť vše.