Parašė GoBiS· 2009 Sau. 14 21:01:49
#28
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,4");
opentable("Vartotojų istorija");
echo "<center><table cellpadding='0' cellspacing='0' width='100%'><tr>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
if ($lastseen < 60){
$lastseen = "<font color='green'><blink>Prisijungęs</blink></font>";
} else { $lastseen = "<font color='red'><blink>Atsijungęs</blink></font>"; }
echo "<td width='25%' valign='top' align='center'>".$data['user_name']." ( <a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'>AM</a> )<br>".$lastseen."<br><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."'><img border='0' src='".IMAGES."avatars/"; if($data['user_avatar']) {echo $data['user_avatar'];} else { echo "noavatar.gif";} echo "'></a></br></td>";
}} else { echo "<td align='center'>Nebuvo prisijungusių narių</td>";}
echo "</tr></table><center>";
closetable();
Redagavo GoBiS· 2009 Sau. 14 21:01:14