[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/lastseen/ -> lastseen_menu.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/lastseen/lastseen_menu.php,v $
  14  |     $Revision: 1.7 $
  15  |     $Date: 2005/12/14 19:28:44 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19  
  20  if (!defined('e107_INIT')) { exit; }
  21  
  22  if (file_exists(e_PLUGIN."lastseen/languages/".e_LANGUAGE.".php"))
  23  {
  24      include_once(e_PLUGIN."lastseen/languages/".e_LANGUAGE.".php");
  25  }
  26  else
  27  {
  28      include_once(e_PLUGIN."lastseen/languages/English.php");
  29  }
  30  
  31  $sql -> db_Select("user", "user_id, user_name, user_currentvisit", "ORDER BY user_currentvisit DESC LIMIT 0,10", "nowhere");
  32  $userArray = $sql -> db_getList();
  33  
  34  $gen = new convert;
  35  $text = "<ul style='margin-left:15px; margin-top:0px; padding-left:0px;'>";
  36  foreach($userArray as $user)
  37  {
  38  //    extract($user);
  39      $seen_ago = $gen -> computeLapse($user['user_currentvisit'], false, false, true, 'short');
  40      $lastseen = ($seen_ago ? $seen_ago : "1 ".LANDT_09)." ".LANDT_AGO; 
  41  $text .= "<li style='list-style-type: square;'><a href='".e_BASE."user.php?id.".$user['user_id']."'>".$user['user_name']."</a><br /> [ ".$lastseen." ]</li>";
  42  }
  43  $text .= "</ul>";
  44  
  45  $ns->tablerender(LSP_LAN_1, $text, 'lastseen');
  46  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7