<?php
/*===================================================+
|| # Woodpecker Housekeeping
|+====================================================+
|| # Copyright © 2008 SuperFun. All rights reserved.
|| # http://www.superfunn.nl/
|+===================================================+
|| # Notice: This is free software.
|+===================================================+
|| # Versions.
|| # Housekeeping version: V3.5
|| # Version of this file: V1.1 (whosonline.php)
|+===================================================+
||
|| # Usage of this page:
|| # The log file for every action that has been made inside the housekeeping
||
|+===================================================*/

include('inc/header.php');
if(min_fuse('whosonline_server', $my_id)){
	$expiry = time() - 100;
	$a = mysql_query("SELECT * FROM users WHERE lastactivity >= SUBDATE( CURRENT_DATE, INTERVAL 1 HOUR)");
	echo '<table border="1">';
	echo '<tr>';
	echo '<td><B>#</B></td>';
	echo '<td><B>User</B></td>';
	echo '<td><B>Rank</B></td>';
	echo '</tr>';
	while($b = mysql_fetch_assoc($a)){
		if(useronline($b['id'])){
			echo '<tr>';
			echo '<td>'.$b['id'].'</td>';
			echo '<td>'.$b['username'].'</td>';
			echo '<td>'.role($b['role']).'</td>';
			$time = $b['lastactivity'];
			$time = explode(' ', $time);
			$time1 = explode('-', $time[0]);
			$time2 = explode(':', $time[1]);
			echo '<tr>';
		}
	}
	echo '</table>';
}else{
	echo $acc_denied;
}
include('inc/footer.php');
?>