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 " );
2023-08-27 03:31:32 +00:00
$statement -> execute ();
2020-06-03 15:31:18 +00:00
2023-08-27 03:31:32 +00:00
if ( $statement -> rowCount () == 0 ) {
2020-06-03 15:31:18 +00:00
echo " <h1>Es ist niemand online!</h1> " ;
2023-08-27 03:31:32 +00:00
} else {
2020-06-03 15:31:18 +00:00
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>' ;
2023-08-27 03:31:32 +00:00
$entryColor = true ;
include_once 'app/OpenSim.php' ;
2023-08-23 16:16:35 +00:00
$opensim = new OpenSim ();
2023-08-27 03:31:32 +00:00
while ( $row = $statement -> fetch ()) {
if ( $entryColor ) {
$entry = '<tr style="background-color: #F2F2F2;"><td>' . trim ( $opensim -> getUserName ( $row [ 'UserID' ])) . '</td><td>' . $opensim -> getRegionName ( $row [ 'RegionID' ]) . '</td></tr>' ;
} else {
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>' ;
2023-08-27 03:31:32 +00:00
}
2020-06-03 15:31:18 +00:00
echo $entry ;
$entryColor = ! $entryColor ;
}
echo '</table>' ;
}
?>
</ body >
</ html >