<?
require ($_SERVER['DOCUMENT_ROOT'].'/maintenance/vars.php');
require (ROOT.'/maintenance/dbconn.php');
require (ROOT.'/maintenance/functions.php');
$pers = user(UID);
?>
<script type="text/javascript" src="JS/chlist_v01.js"></script>
<script type="text/javascript">
<?
if ($pers["online"]==1):
	$all = query ("SELECT user,level FROM users WHERE online=1 ORDER BY level DESC");
	$out = '';
	while ($a=mysql_fetch_array($all)):
		if ($out<>''): $out = $out .','; endif;
		$out = $out . '["'.$a["user"].'",'.$a["level"].']';
	endwhile;
	echo 'var users = ['.$out.'];
whos_there(users);';
	
endif;
?>
</script>