Posted on: 12/08/03 07:13am
By: pernas
function phpblock_5latest() { global $_CONF; $list = ""; $quer = mysql_query ("SELECT uid,lastlogin FROM gl_userinfo ORDER BY lastlogin DESC limit 5"); while ($line = mysql_fetch_array($quer)){ $uidsql= mysql_query ("SELECT username,photo FROM gl_users WHERE uid=$line[uid]"); $uidresult = DB_fetchArray($uidsql); $lastlogin = DB_getItem (gl_userinfo, 'lastlogin', "uid = $line[uid]"); $lasttime = COM_getUserDateTimeFormat ($lastlogin); $list = $list.'<a href="'.$_CONF["site_url"].'/users.php?mode=profile&uid='.$line["uid"].'" title="'.$lasttime[0].'">'.$uidresult[username ]; if ($uidresult[photo] != ""){ $list = $list.' <img src="'.$_CONF['layout_url'].'/images/smallcamera.gif" border="0" alt="">'; } $list = $list.'</a><br>'; } return $list; }
Posted on: 12/30/03 04:57pm
By: Anonymous (Striker)
function phpblock_5latest() { global $_CONF, $_TABLES; $list = ""; $quer = mysql_query ("SELECT u.uid,u.lastlogin,p.showonline FROM {$_TABLES['userinfo']} AS u, {$_TABLES['userprefs']} AS p WHERE u.uid = p.uid AND u.uid != '1' AND p.showonline = '1' ORDER BY lastlogin DESC limit 5"); while ($line = mysql_fetch_array($quer)){ $uidsql= mysql_query ("SELECT username,photo FROM {$_TABLES['users']} WHERE uid=$line[uid]"); $uidresult = DB_fetchArray($uidsql); $lastlogin = DB_getItem ($_TABLES['userinfo'], 'lastlogin', "uid = $line[uid]"); $lasttime = COM_getUserDateTimeFormat ($lastlogin); $list = $list.'<a href="'.$_CONF["site_url"].'/users.php?mode=profile&uid='.$line["uid"].'" title="'.$lasttime[0].'">'.$uidresult[username]; if ($uidresult[photo] != ""){ $list = $list.' <img src="'.$_CONF['layout_url'].'/images/smallcamera.gif" border="0" alt="">'; } $list = $list.'</a><br>'; } return $list; }
Posted on: 12/30/03 06:40pm
By: geKow
Posted on: 01/08/04 04:38am
By: pernas
Posted on: 07/19/04 04:37pm
By: arthur
Posted on: 01/12/05 03:25pm
By: jetshack
Posted on: 01/12/05 06:51pm
By: ScurvyDawg