Welcome to Geeklog, Anonymous Thursday, February 29 2024 @ 01:05 pm EST

Geeklog Forums

My first try with a "5 last logged in users"

Status: offline


Forum User
Registered: 11/15/03
Posts: 7

Could someone please help me with the date conversion here in this block;

Text Formatted Code
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 FROM gl_users WHERE uid=$line[uid]");                                                          
    $uidresult = DB_fetchArray($uidsql);                                                                                                  
    $lastlogin = mysql_query ("SELECT lastlogin FROM gl_userinfo WHERE uid=$line[uid]");                                                  
/*    $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="'.$line["lastlogin"].'">'.$uidresul

    $list = $list.'</a><br>';
return $list;

Using COM_getUserDateTimeFormat only returns "Array" and before that the format is "1070653936" - not making sense..


All times are EST. The time is now 01:05 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content