1
0
Fork 0
Manager/api/viewerWelcomeSite.php

32 lines
932 B
PHP
Raw Normal View History

2020-06-03 15:31:18 +00:00
<?php
2023-08-27 03:31:32 +00:00
include_once 'app/OpenSim.php';
$opensim = new OpenSim();
2020-06-03 15:31:18 +00:00
$HTML = new HTML();
$HTML->setHTMLTitle("Spalsh");
2023-08-23 16:16:35 +00:00
$HTML->importHTML("viewerWelcomeImages.html");
2020-06-03 15:31:18 +00:00
$IMAGES = array();
2023-08-27 03:31:32 +00:00
if ($handle = opendir('./data/viewerWelcomeImages')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
2020-06-03 15:31:18 +00:00
$IMAGES = array_merge($IMAGES, array("./data/viewerWelcomeImages/".$entry));
}
}
closedir($handle);
}
shuffle($IMAGES);
2023-08-27 03:31:32 +00:00
$HTML->ReplaceLayoutInhalt("%%JSONIMAGEARRAY%%", json_encode($IMAGES));
$HTML->ReplaceLayoutInhalt("%%GRIDNAME%%", $RUNTIME['GRID']['NAME']);
$HTML->ReplaceLayoutInhalt("%%SHOWNEWS%%", $RUNTIME['GRID']['MAIN_NEWS']);
2020-06-03 15:31:18 +00:00
2023-08-27 03:31:32 +00:00
$HTML->ReplaceLayoutInhalt("%%SHOWSTATS%%", "Registrierte User: ".$opensim->getUserCount()."<br>Regionen: ".$opensim->getRegionCount()."<br>Aktuell Online: ".($opensim->getOnlineCount()-1));
2020-06-03 15:31:18 +00:00
$HTML->build();
echo $HTML->ausgabe();