2020-06-03 15:31:18 +00:00
< html >
< head >
< meta http - equiv = " refresh " content = " 15 " >
</ head >
< body style = " background-image: url('./style/images/fabric-pattern.png') " >
< ? php
2023-08-23 16:16:34 +00:00
$statement = $RUNTIME [ 'PDO' ] -> prepare ( " SELECT UserID,RegionID FROM Presence WHERE RegionID != '00000000-0000-0000-0000-000000000000' ORDER BY RegionID ASC " );
2020-06-03 15:31:18 +00:00
$statement -> execute ();
if ( $statement -> rowCount () == 0 )
{
echo " <h1>Es ist niemand online!</h1> " ;
} else {
echo '<table style="width:350px;margin-left:auto;margin-right:auto;margin-top:25px"><tr><th align="left" style="background-color: #FF8000;">Name</th><th align="left" style="background-color: #FF8000;">Region</th></tr>' ;
$entryColor = TRUE ;
2023-08-23 16:16:35 +00:00
include 'app/OpenSim.php' ;
2023-08-23 16:16:35 +00:00
$opensim = new OpenSim ();
2020-06-03 15:31:18 +00:00
while ( $row = $statement -> fetch ())
{
if ( $entryColor == TRUE )
2023-08-23 16:16:35 +00:00
$entry = '<tr style="background-color: #F2F2F2;"><td>' . trim ( $opensim -> getUserName ( $row [ 'UserID' ])) . '</td><td>' . $opensim -> getRegionName ( $row [ 'RegionID' ]) . '</td></tr>' ;
2020-06-03 15:31:18 +00:00
if ( $entryColor == FALSE )
2023-08-23 16:16:35 +00:00
$entry = '<tr style="background-color: #E6E6E6;"><td>' . trim ( $opensim -> getUserName ( $row [ 'UserID' ])) . '</td><td>' . $opensim -> getRegionName ( $row [ 'RegionID' ]) . '</td></tr>' ;
2020-06-03 15:31:18 +00:00
echo $entry ;
$entryColor = ! $entryColor ;
}
echo '</table>' ;
}
?>
</ body >
</ html >