mirror of
https://github.com/e107inc/e107.git
synced 2025-10-24 11:16:22 +02:00
new module creation
This commit is contained in:
27
e107_plugins/online_menu/languages/English.php
Normal file
27
e107_plugins/online_menu/languages/English.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/online_menu/languages/English.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:32 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define("ONLINE_L1", "Guests: ");
|
||||
define("ONLINE_L2", "Members: ");
|
||||
define("ONLINE_L3", "On this page: ");
|
||||
define("ONLINE_L4", "Online");
|
||||
define("ONLINE_L5", "Members");
|
||||
define("ONLINE_L6", "Newest");
|
||||
define("TRACKING_MESSAGE", "Online user tracking is currently disabled, please enable it <a href='".e_ADMIN."users.php?options'>here</a><br />");
|
||||
?>
|
||||
53
e107_plugins/online_menu/online_menu.php
Normal file
53
e107_plugins/online_menu/online_menu.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/online_menu/online_menu.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:32 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$caption = (file_exists(THEME."images/online_menu.png") ? "<img src='".THEME."images/online_menu.png' alt='' /> ".ONLINE_L4 : ONLINE_L4);
|
||||
|
||||
if(!defined("e_TRACKING_DISABLED") && (isset($pref['track_online']) && $pref['track_online'])) {
|
||||
$text = ONLINE_L1.GUESTS_ONLINE."<br />";
|
||||
//if($pref['user_reg'] == 1){
|
||||
$text .= ONLINE_L2.MEMBERS_ONLINE.(MEMBERS_ONLINE ? ", ": "").MEMBER_LIST."<br />";
|
||||
//}
|
||||
$text .= ONLINE_L3.ON_PAGE;
|
||||
|
||||
global $e107cache;
|
||||
$members_totals = $e107cache->retrieve("online_menu_totals", 120);
|
||||
if($members_totals == false) {
|
||||
$total_members = $sql->db_Count("user");
|
||||
$newest_member = $sql->db_Select("user", "user_id, user_name", "user_ban='0' ORDER BY user_join DESC LIMIT 0,1");
|
||||
$row = $sql->db_Fetch();
|
||||
extract($row);
|
||||
$members_totals = "<br />".ONLINE_L5.": ".$total_members.", ".ONLINE_L6.": <a href='".e_HTTP."user.php?id.{$user_id}'>{$user_name}</a>";
|
||||
$e107cache->set("online_menu_totals", $members_totals);
|
||||
}
|
||||
$text .= $members_totals;
|
||||
|
||||
} else {
|
||||
if(ADMIN) {
|
||||
$text = TRACKING_MESSAGE;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$ns->tablerender($caption, $text, 'online');
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user