<?php
include('../global.php');
header('Refresh: 5');
  
echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>User list</title>
<meta http-equiv="Content-Language" content="cs">
<meta http-equiv="Content-Type" content="text/html; charset='.$Config['Web']['Charset'].'">
</head><body>');
  
if(array_key_exists('nick',$_GET)) 
{
  $_SESSION['nick'] = $_GET['nick'];  
  include_once('webchatsend.php');
  Send('Alive','');  
} 
 
$List = array();
echo('<table style="height: 100%; font-family: Arial;" width="100%" cellspacing="0" cellpadding="2" border="1" bgcolor="#d0d0d0"><tr>
<td bgcolor="#ffffff" valign="top" width="10%" style="font-size: 14px;">');
$DbResult = $Database->select('sunrisechat_onlinelist','*');
while($Row = $DbResult->fetch_array())
{ 
  if($Row['status'] == 'Away') echo('<img src="images/UserNotAvailable.png" alt="away icon">');
  else if($Row['status'] == 'Writting') echo('<img src="images/UserWritting.png" alt="writting icon">');
  else echo('<img src="images/UserOnline.png" alt="online icon">');
  echo($Row['nick'].'<br>');
}
echo('</td></tr></table>
</body></html>');

?>
