[ Index ]
 

Code source de e107 0.7.8

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

title

Body

[fermer]

/e107_plugins/online_menu/ -> online_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/online_menu/online_menu.php,v $
  14  |     $Revision: 1.14 $
  15  |     $Date: 2006/12/09 06:43:48 $
  16  |     $Author: e107coders $
  17  +----------------------------------------------------------------------------+
  18  */
  19  
  20  if (!defined('e107_INIT')) { exit; }
  21  
  22  $caption = (file_exists(THEME."images/online_menu.png") ? "<img src='".THEME."images/online_menu.png' alt='' /> ".ONLINE_L4 : ONLINE_L4);
  23  
  24  if(!defined("e_TRACKING_DISABLED") && (isset($pref['track_online']) && $pref['track_online'])) {
  25      $text = ONLINE_L1.GUESTS_ONLINE."<br />";
  26      //if($pref['user_reg'] == 1){
  27      $text .= ONLINE_L2.MEMBERS_ONLINE.(MEMBERS_ONLINE ? ", ": "").MEMBER_LIST."<br />";
  28      //}
  29      $text .= ONLINE_L3.ON_PAGE;
  30  
  31      global $e107cache;
  32      $members_totals = $e107cache->retrieve("online_menu_totals", 120);
  33      if($members_totals == false) {
  34          $total_members = $sql->db_Count("user");
  35          $newest_member = $sql->db_Select("user", "user_id, user_name", "user_ban='0' ORDER BY user_join DESC LIMIT 0,1");
  36          $row = $sql->db_Fetch();
  37          extract($row);
  38          $members_totals = "<br />".ONLINE_L5.": ".$total_members.", ".ONLINE_L6.": <a href='".e_HTTP."user.php?id.{$user_id}'>{$user_name}</a>";
  39          $e107cache->set("online_menu_totals", $members_totals);
  40      }
  41      $text .= $members_totals;
  42  
  43  } else {
  44      if(ADMIN) {
  45          global $tp;  
  46          $text = $tp->toHtml(TRACKING_MESSAGE,TRUE);
  47      } else {
  48          return;
  49      }
  50  }
  51  
  52  $ns->tablerender($caption, $text, 'online');
  53  
  54  ?>


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