Index: config_defaults_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
retrieving revision 1.237
diff -u -r1.237 config_defaults_inc.php
--- config_defaults_inc.php	23 Dec 2004 14:43:15 -0000	1.237
+++ config_defaults_inc.php	11 Jan 2005 23:04:51 -0000
@@ -1502,4 +1502,8 @@
 	# NOTE: These are meaningless under Windows! Just ignore them!
 	$g_dot_tool							= '/usr/bin/dot';
 	$g_neato_tool						= '/usr/bin/neato';
+	
+	
+	# Shows the list of all connected users in the footer of each pages (guideweb)
+	$g_show_who_is_connected= ON;
 ?>
Index: core/html_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/html_api.php,v
retrieving revision 1.145
diff -u -r1.145 html_api.php
--- core/html_api.php	22 Dec 2004 20:25:55 -0000	1.145
+++ core/html_api.php	11 Jan 2005 23:06:37 -0000
@@ -391,6 +391,41 @@
 				}
 				echo "\t", '<tr><td></td><td>', $t_total, '</td><td></td></tr>', "\n";
 				echo "\t",  '</table>', "\n";
+				
+				
+			}
+		}
+		
+		
+		# This allow users or anonymous to see who are connected 
+		# It simply chech who has updated a page in the last 5 minutes (guideweb)
+		if( ON == config_get( 'show_who_is_connected' ) ) {
+		
+			
+			
+			# Generate timestamp 
+			$t_last_5min_timestamp = mktime(date("H"), date("i") -5, date("s"), date("m"), date("d"),  date("Y"));
+			$t_date_last_5min_date = date("Y-m-d H:i:s" , $t_last_5min_timestamp);
+						
+			
+			# Execute query
+			$t_user_table = config_get( 'mantis_user_table' );
+			$query = "SELECT username 
+			  FROM $t_user_table
+			  WHERE last_visit > '$t_date_last_5min_date'";
+			$result = db_query( $query );
+			
+			# Get the list of connected users
+			while ( $row = db_fetch_array( $result ) ) {
+				$t_users_connected[]	= $row['username'];
+			} 
+			
+			# This message is displayed on the login page, so we need to say if no user are currently connected
+			if (count($t_users_connected) == 0 ) {
+				echo 'No user  connected.';
+			}
+			else {
+				echo 'Users connected : ' . implode(', ',$t_users_connected) . '.';
 			}
 		}
 	}
