2020-06-03 15:31:18 +00:00
|
|
|
<?php
|
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
|
|
|
$HTML->setHTMLTitle("Online Anzeige");
|
2023-08-23 16:16:35 +00:00
|
|
|
$HTML->importSeitenInhalt("online-anzeige.html");
|
2020-06-03 15:31:18 +00:00
|
|
|
|
|
|
|
$table = '<table class="table"><thead><tr><th scope="col">Benutzername</th><th scope="col">Region</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
|
|
|
|
2023-08-23 16:16:34 +00:00
|
|
|
$statement = $RUNTIME['PDO']->prepare("SELECT RegionID,UserID FROM Presence ORDER BY RegionID ASC");
|
2020-06-03 15:31:18 +00:00
|
|
|
$statement->execute();
|
|
|
|
|
|
|
|
while($row = $statement->fetch())
|
|
|
|
{
|
|
|
|
if($row['RegionID'] != "00000000-0000-0000-0000-000000000000")
|
|
|
|
{
|
2023-08-23 16:16:35 +00:00
|
|
|
$entry = '<tr><td>'.htmlspecialchars(trim($opensim->getUserName($row['UserID']))).'</td><td>'.htmlspecialchars($opensim->getRegionName($row['RegionID'])).'</td></tr>';
|
2020-06-03 15:31:18 +00:00
|
|
|
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$table = str_replace("%%ENTRY%%", "", $table);
|
|
|
|
$HTML->ReplaceSeitenInhalt("%%ONLINE-LIST%%", $table);
|
|
|
|
|
|
|
|
$HTML->build();
|
|
|
|
echo $HTML->ausgabe();
|
|
|
|
?>
|