Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: online_user

Parašė And2s· 2009 Bir. 14 15:06:49
#14


openside("Vartotojai");
echo "<br><img src='".THEME."images/bullet.gif' alt=''> Vartotojų istorija:<br><br>";

$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,6");
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen= ONLINE;
} elseif ($lastseen < 360){
$lastseen="< 5min";
} elseif ($iW > 0){
if ($iW == 1) { $text = "Savaitė"; } else { $text = "Savaitės"; }
$lastseen = $iW." ".$text;
} elseif ($iD > 0){
if ($iD == 1) { $text = "Diena"; } else { $text = "Dienos"; }
$lastseen = $iD." ".$text;
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
closeside()




Redagavo And2s· 2009 Bir. 14 15:06:23