diff --git a/api/onlineDisplay.php b/api/onlineDisplay.php
index d111e99..c31b441 100644
--- a/api/onlineDisplay.php
+++ b/api/onlineDisplay.php
@@ -15,13 +15,15 @@
echo '
Name | Region |
';
$entryColor = TRUE;
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
while($row = $statement->fetch())
{
if($entryColor == TRUE)
- $entry = ''.trim($RUNTIME['OPENSIM']->getUserName($row['UserID'])).' | '.$RUNTIME['OPENSIM']->getRegionName($row['RegionID']).' |
';
+ $entry = ''.trim($opensim->getUserName($row['UserID'])).' | '.$opensim->getRegionName($row['RegionID']).' |
';
if($entryColor == FALSE)
- $entry = ''.trim($RUNTIME['OPENSIM']->getUserName($row['UserID'])).' | '.$RUNTIME['OPENSIM']->getRegionName($row['RegionID']).' |
';
+ $entry = ''.trim($opensim->getUserName($row['UserID'])).' | '.$opensim->getRegionName($row['RegionID']).' |
';
echo $entry;
$entryColor = !$entryColor;
diff --git a/api/viewerWelcomeSite.php b/api/viewerWelcomeSite.php
index 3cddc43..a88294f 100644
--- a/api/viewerWelcomeSite.php
+++ b/api/viewerWelcomeSite.php
@@ -1,4 +1,7 @@
setHTMLTitle("Spalsh");
$HTML->importHTML("style/viewerWelcomeSite/default.html");
@@ -26,7 +29,7 @@
$HTML->ReplaceSeitenInhalt("%%SHOWNEWS%%", $RUNTIME['GRID']['MAIN_NEWS']);
- $HTML->ReplaceSeitenInhalt("%%SHOWSTATS%%", "Registrierte User: ".$RUNTIME['OPENSIM']->getUserCount()."
Regionen: ".$RUNTIME['OPENSIM']->getRegionCount()."
Aktuell Online: ".($RUNTIME['OPENSIM']->getOnlineCount()-1));
+ $HTML->ReplaceSeitenInhalt("%%SHOWSTATS%%", "Registrierte User: ".$opensim->getUserCount()."
Regionen: ".$opensim->getRegionCount()."
Aktuell Online: ".($opensim->getOnlineCount()-1));
$HTML->build();
diff --git a/cron/IARMonitor.php b/cron/IARMonitor.php
index 66af9e6..2da7792 100644
--- a/cron/IARMonitor.php
+++ b/cron/IARMonitor.php
@@ -1,4 +1,7 @@
prepare("CREATE TABLE IF NOT EXISTS `iarstates` (`userID` VARCHAR(36) NOT NULL COLLATE 'utf8_unicode_ci', `filesize` BIGINT(20) NOT NULL DEFAULT '0', `iarfilename` VARCHAR(64) NOT NULL COLLATE 'utf8_unicode_ci', `running` INT(1) NOT NULL DEFAULT '0', PRIMARY KEY (`userID`) USING BTREE) COLLATE='utf8_unicode_ci' ENGINE=InnoDB;");
$statement->execute();
@@ -7,11 +10,11 @@
if($row = $statement->fetch())
{
- $email = $RUNTIME['OPENSIM']->getUserMail($row['userID']);
+ $email = $opensim->getUserMail($row['userID']);
$fullFilePath = "/var/www/html/data/".$row['iarfilename'];
- echo "Aktive IAR für ".$RUNTIME['OPENSIM']->getUserName($row['userID'])." gefunden. File: ".$fullFilePath."\n";
+ echo "Aktive IAR für ".$opensim->getUserName($row['userID'])." gefunden. File: ".$fullFilePath."\n";
if(file_exists($fullFilePath))
{
@@ -22,18 +25,18 @@
$statementUpdate = $RUNTIME['PDO']->prepare('UPDATE iarstates SET filesize = :filesize WHERE userID = :userID');
$statementUpdate->execute(['filesize' => $filesize, 'userID' => $row['userID']]);
- echo "Status der IAR für ".$RUNTIME['OPENSIM']->getUserName($row['userID']).": Speichert...\n";
+ echo "Status der IAR für ".$opensim->getUserName($row['userID']).": Speichert...\n";
}else{
$APIURL = $RUNTIME['SIDOMAN']['URL']."api.php?CONTAINER=".$RUNTIME['SIDOMAN']['CONTAINER']."&KEY=".$RUNTIME['SIDOMAN']['PASSWORD']."&METODE=RESTART";
$APIResult = file_get_contents($APIURL);
- echo "Status der IAR für ".$RUNTIME['OPENSIM']->getUserName($row['userID']).": Sende Mail...\n";
+ echo "Status der IAR für ".$opensim->getUserName($row['userID']).": Sende Mail...\n";
$statementUpdate = $RUNTIME['PDO']->prepare('DELETE FROM iarstates WHERE userID = :userID');
$statementUpdate->execute(['userID' => $row['userID']]);
sendInworldIM("00000000-0000-0000-0000-000000000000", $row['userID'], "Inventory", $RUNTIME['GRID']['HOMEURL'], "Deine IAR ist fertig zum Download: ".$RUNTIME['IAR']['BASEURL'].$row['iarfilename']);
}
}else{
- $name = explode(" ", $RUNTIME['OPENSIM']->getUserName($row['userID']));
+ $name = explode(" ", $opensim->getUserName($row['userID']));
$APIURL = $RUNTIME['SIDOMAN']['URL']."api.php?CONTAINER=".$RUNTIME['SIDOMAN']['CONTAINER']."&KEY=".$RUNTIME['SIDOMAN']['PASSWORD']."&METODE=COMMAND&COMMAND=".urlencode("save iar ".$name[0]." ".$name[1]." /* PASSWORD /downloads/".$row['iarfilename']);
$APIResult = file_get_contents($APIURL);
@@ -49,7 +52,7 @@
$statementUpdate = $RUNTIME['PDO']->prepare('UPDATE iarstates SET running = :running WHERE userID = :userID');
$statementUpdate->execute(['running' => 1, 'userID' => $row['userID']]);
- $name = explode(" ", $RUNTIME['OPENSIM']->getUserName($row['userID']));
+ $name = explode(" ", $opensim->getUserName($row['userID']));
$APIURL = $RUNTIME['SIDOMAN']['URL']."api.php?CONTAINER=".$RUNTIME['SIDOMAN']['CONTAINER']."&KEY=".$RUNTIME['SIDOMAN']['PASSWORD']."&METODE=COMMAND&COMMAND=".urlencode("save iar ".$name[0]." ".$name[1]." /* PASSWORD /downloads/".$row['iarfilename']);
$APIResult = file_get_contents($APIURL);
diff --git a/cron/offlineIM.php b/cron/offlineIM.php
index 49bbed9..bc84ce9 100644
--- a/cron/offlineIM.php
+++ b/cron/offlineIM.php
@@ -39,8 +39,11 @@
while($row = $statement->fetch())
{
- $email = $RUNTIME['OPENSIM']->getUserMail($row['PrincipalID']);
- $allowOfflineIM = $RUNTIME['OPENSIM']->allowOfflineIM($row['PrincipalID']);
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
+ $email = $opensim->getUserMail($row['PrincipalID']);
+ $allowOfflineIM = $opensim->allowOfflineIM($row['PrincipalID']);
if($email != "" && $allowOfflineIM == "TRUE")
{
@@ -58,7 +61,7 @@
$mail->SMTPAuth = false;
$mail->setFrom($RUNTIME['SMTP']['ADRESS'], $RUNTIME['GRID']['NAME']);
- $mail->addAddress($email, $RUNTIME['OPENSIM']->getUserName($row['PrincipalID']));
+ $mail->addAddress($email, $opensim->getUserName($row['PrincipalID']));
$XMLMESSAGE = new SimpleXMLElement($row['Message']);
@@ -71,9 +74,9 @@
{
if($XMLMESSAGE->Position->X != 0 || $XMLMESSAGE->Position->X != 0 || $XMLMESSAGE->Position->X != 0)
{
- $HTMLMESSAGE .= " @ ".$RUNTIME['OPENSIM']->getRegionName($XMLMESSAGE->RegionID)."/".$XMLMESSAGE->Position->X."/".$XMLMESSAGE->Position->Y."/".$XMLMESSAGE->Position->Z;
+ $HTMLMESSAGE .= " @ ".$opensim->getRegionName($XMLMESSAGE->RegionID)."/".$XMLMESSAGE->Position->X."/".$XMLMESSAGE->Position->Y."/".$XMLMESSAGE->Position->Z;
}else{
- $HTMLMESSAGE .= " @ ".$RUNTIME['OPENSIM']->getRegionName($XMLMESSAGE->RegionID);
+ $HTMLMESSAGE .= " @ ".$opensim->getRegionName($XMLMESSAGE->RegionID);
}
}
diff --git a/cron/regionChecker.php b/cron/regionChecker.php
index 9ad49a2..e88377a 100644
--- a/cron/regionChecker.php
+++ b/cron/regionChecker.php
@@ -19,7 +19,9 @@
if($result == FALSE || $result == "")
{
- echo "Die Region ".$row['regionName']." von ".$RUNTIME['OPENSIM']->getUserName($row['owner_uuid'])." ist nicht erreichbar.\n";
+ include '../app/OpenSim.php';
+
+ echo "Die Region ".$row['regionName']." von ".$opensim->getUserName($row['owner_uuid'])." ist nicht erreichbar.\n";
$infoStatement = $RUNTIME['PDO']->prepare("SELECT OfflineTimer FROM regions_info WHERE regionID = :regionID");
$infoStatement->execute(['regionID' => $row['uuid']]);
@@ -28,7 +30,7 @@
{
if(($infoRow['OfflineTimer'] + 3600) <= time())
{
- echo "Die Region ".$row['regionName']." von ".$RUNTIME['OPENSIM']->getUserName($row['owner_uuid'])." ist seit über eine Stunde nicht erreichbar!\n";
+ echo "Die Region ".$row['regionName']." von ".$opensim->getUserName($row['owner_uuid'])." ist seit über eine Stunde nicht erreichbar!\n";
//sendInworldIM("00000000-0000-0000-0000-000000000000", $row['owner_uuid'], "Region", $RUNTIME['GRID']['HOMEURL'], "WARNUNG: Deine Region '".$row['regionName']."' ist nicht erreichbar und wurde deshalb aus dem Grid entfernt.");
diff --git a/crone.php b/crone.php
index 49d657b..54f6209 100644
--- a/crone.php
+++ b/crone.php
@@ -5,12 +5,9 @@ session_start();
include_once("classen/utils.php");
include_once("classen/HTML.php");
-include_once("classen/OpenSim.php");
include_once("classen/discord.php");
$RUNTIME = array();
-$RUNTIME['OPENSIM'] = new OpenSim();
-
include_once("config.php");
diff --git a/index.php b/index.php
index 3e7f969..740eaf1 100644
--- a/index.php
+++ b/index.php
@@ -19,11 +19,8 @@ if(!isset($_SESSION['csrf']) || strlen($_SESSION['csrf']) != 64) {
include_once("classen/utils.php");
include_once("classen/HTML.php");
-include_once("classen/OpenSim.php");
include_once("classen/discord.php");
-$RUNTIME['OPENSIM'] = new OpenSim();
-
function isValidEndpoint(string $pageName, string $dirPrefix) {
return preg_match("/[a-zA-Z0-9\.]{1,100}/", $pageName) && file_exists("./".$dirPrefix."/".$pageName.".php");
}
diff --git a/pages/dashboard.php b/pages/dashboard.php
index 2b70789..852e252 100644
--- a/pages/dashboard.php
+++ b/pages/dashboard.php
@@ -1,9 +1,12 @@
setHTMLTitle("Dashboard");
$HTML->importSeitenInhalt("pages/HTML/dashboard.html");
- $HTML->ReplaceSeitenInhalt("%%GLOBAL-USER-COUNT%%", $RUNTIME['OPENSIM']->getUserCount());
- $HTML->ReplaceSeitenInhalt("%%GLOBAL-REGION-COUNT%%", $RUNTIME['OPENSIM']->getRegionCount());
+ $HTML->ReplaceSeitenInhalt("%%GLOBAL-USER-COUNT%%", $opensim->getUserCount());
+ $HTML->ReplaceSeitenInhalt("%%GLOBAL-REGION-COUNT%%", $opensim->getRegionCount());
$HTML->ReplaceLayoutInhalt("%%USERNAME%%", htmlspecialchars($_SESSION['DISPLAYNAME']));
diff --git a/pages/friends.php b/pages/friends.php
index 548484b..2f847f3 100644
--- a/pages/friends.php
+++ b/pages/friends.php
@@ -25,14 +25,17 @@
$FriendData = explode(";", $row['Friend']);
$Friend = $FriendData[0];
- $entry = ''.trim($RUNTIME['OPENSIM']->getUserName($Friend)).' | LÖSCHEN |
';
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
+ $entry = ''.trim($opensim->getUserName($Friend)).' | LÖSCHEN |
';
if(count($FriendData) > 1)
{
$FriendData[1] = str_replace("http://", "", $FriendData[1]);
$FriendData[1] = str_replace("https://", "", $FriendData[1]);
$FriendData[1] = str_replace("/", "", $FriendData[1]);
- $entry = ''.htmlspecialchars(trim($RUNTIME['OPENSIM']->getUserName($Friend)).' @ '.strtolower($FriendData[1])).' | LÖSCHEN |
';
+ $entry = ''.htmlspecialchars(trim($opensim->getUserName($Friend)).' @ '.strtolower($FriendData[1])).' | LÖSCHEN |
';
}
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
diff --git a/pages/groups.php b/pages/groups.php
index 037e803..50fed48 100644
--- a/pages/groups.php
+++ b/pages/groups.php
@@ -8,6 +8,9 @@
die();
}
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
$HTML->setHTMLTitle("Gruppen");
$HTML->importSeitenInhalt("pages/HTML/deine-regionen.html");
@@ -23,7 +26,7 @@
while($rowGroups = $statementGroups->fetch())
{
- $entry = ''.htmlspecialchars($rowGroups['Name']).' | '.htmlspecialchars($RUNTIME['OPENSIM']->getUserName($rowGroups['FounderID'])).' | VERLASSEN |
';
+ $entry = ''.htmlspecialchars($rowGroups['Name']).' | '.htmlspecialchars($opensim->getUserName($rowGroups['FounderID'])).' | VERLASSEN |
';
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
}
}
diff --git a/pages/identities.php b/pages/identities.php
index 6f1b31f..4d8ebd8 100644
--- a/pages/identities.php
+++ b/pages/identities.php
@@ -64,6 +64,9 @@
}
}
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
if(isset($_REQUEST['createIdent']) && isset($_REQUEST['newName']) && $_REQUEST['createIdent'] == "" && $_REQUEST['newName'] != "")
{
$avatarNameParts = explode(" ", trim($_REQUEST['newName']));
@@ -75,7 +78,7 @@
if($statement->rowCount() == 0)
{
- $avatarUUID = $RUNTIME['OPENSIM']->gen_uuid();
+ $avatarUUID = $opensim->gen_uuid();
$statementAccounts = $RUNTIME['PDO']->prepare('INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created, UserLevel, UserFlags, UserTitle, active) VALUES (:PrincipalID, :ScopeID, :FirstName, :LastName, :Email, :ServiceURLs, :Created, :UserLevel, :UserFlags, :UserTitle, :active )');
$statementAccounts->execute(['PrincipalID' => $avatarUUID, 'ScopeID' => "00000000-0000-0000-0000-000000000000", 'FirstName' => $avatarNameParts[0], 'LastName' => $avatarNameParts[1], 'Email' => $_SESSION['EMAIL'], 'ServiceURLs' => "HomeURI= GatekeeperURI= InventoryServerURI= AssetServerURI= ", 'Created' => time(), 'UserLevel' => 0, 'UserFlags' => 0, 'UserTitle' => "", 'active' => 1]);
@@ -93,7 +96,7 @@
}else{
$HTML->ReplaceSeitenInhalt("%%MESSAGE%%", 'Der Name muss aus einem Vor und einem Nachnamen bestehen.
');
}
-}
+ }
$table = '';
$statement = $RUNTIME['PDO']->prepare("SELECT IdentityID FROM UserIdentitys WHERE PrincipalID = ? ORDER BY IdentityID ASC");
@@ -103,9 +106,9 @@
{
if($row['IdentityID'] == $_SESSION['UUID'])
{
- $entry = ''.htmlspecialchars(trim($RUNTIME['OPENSIM']->getUserName($row['IdentityID']))).' Aktiv | - |
';
+ $entry = ''.htmlspecialchars(trim($opensim->getUserName($row['IdentityID']))).' Aktiv | - |
';
}else{
- $entry = ''.htmlspecialchars(trim($RUNTIME['OPENSIM']->getUserName($row['IdentityID']))).' | |
';
+ $entry = ''.htmlspecialchars(trim($opensim->getUserName($row['IdentityID']))).' | |
';
}
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
diff --git a/pages/password.php b/pages/password.php
index 77df625..5ff1faf 100644
--- a/pages/password.php
+++ b/pages/password.php
@@ -56,15 +56,18 @@
}
}
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
$PartnerName = "";
- $PartnerUUID = $RUNTIME['OPENSIM']->getPartner($_SESSION['UUID']);
- if($PartnerUUID != null)$PartnerName = $RUNTIME['OPENSIM']->getUserName($PartnerUUID);
+ $PartnerUUID = $opensim->getPartner($_SESSION['UUID']);
+ if($PartnerUUID != null)$PartnerName = $opensim->getUserName($PartnerUUID);
$HTML->ReplaceSeitenInhalt("%%offlineIMSTATE%%", ' ');
$HTML->ReplaceSeitenInhalt("%%firstname%%", htmlspecialchars($_SESSION['FIRSTNAME']));
$HTML->ReplaceSeitenInhalt("%%lastname%%", htmlspecialchars($_SESSION['LASTNAME']));
$HTML->ReplaceSeitenInhalt("%%partner%%", htmlspecialchars($PartnerName));
- $HTML->ReplaceSeitenInhalt("%%email%%", htmlspecialchars($RUNTIME['OPENSIM']->getUserMail($_SESSION['UUID'])));
+ $HTML->ReplaceSeitenInhalt("%%email%%", htmlspecialchars($opensim->getUserMail($_SESSION['UUID'])));
$HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", "");
$pwChanged = false;
diff --git a/pages/profile.php b/pages/profile.php
index b47114c..c6e5104 100644
--- a/pages/profile.php
+++ b/pages/profile.php
@@ -101,18 +101,21 @@
$statement->execute(['IMState' => 'false', 'PrincipalID' => $_SESSION['UUID']]);
}
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
if(isset($_REQUEST['formInputFeldPartnerName']) && $_REQUEST['formInputFeldPartnerName'] != "")
{
$NewPartner = trim($_REQUEST['formInputFeldPartnerName']);
- $CurrentPartner = $RUNTIME['OPENSIM']->getPartner($_SESSION['UUID']);
+ $CurrentPartner = $opensim->getPartner($_SESSION['UUID']);
- if($CurrentPartner != "")$CurrentPartner = $RUNTIME['OPENSIM']->getUserName($CurrentPartner);
+ if($CurrentPartner != "")$CurrentPartner = $opensim->getUserName($CurrentPartner);
if($NewPartner != "")
{
if($CurrentPartner != $NewPartner)
{
- $newPartnerUUID = $RUNTIME['OPENSIM']->getUserUUID($NewPartner);
+ $newPartnerUUID = $opensim->getUserUUID($NewPartner);
if($newPartnerUUID != null)
{
@@ -144,18 +147,18 @@
$allUsers .= '," "';
- $PartnerUUID = $RUNTIME['OPENSIM']->getPartner($_SESSION['UUID']);
+ $PartnerUUID = $opensim->getPartner($_SESSION['UUID']);
$PartnerName = "";
- if($PartnerUUID != null)$PartnerName = $RUNTIME['OPENSIM']->getUserName($PartnerUUID);
+ if($PartnerUUID != null)$PartnerName = $opensim->getUserName($PartnerUUID);
- if($RUNTIME['OPENSIM']->allowOfflineIM($_SESSION['UUID']) == "TRUE")$HTML->ReplaceSeitenInhalt("%%offlineIMSTATE%%", ' checked');
+ if($opensim->allowOfflineIM($_SESSION['UUID']) == "TRUE")$HTML->ReplaceSeitenInhalt("%%offlineIMSTATE%%", ' checked');
$HTML->ReplaceSeitenInhalt("%%offlineIMSTATE%%", ' ');
$HTML->ReplaceSeitenInhalt("%%firstname%%", htmlspecialchars($_SESSION['FIRSTNAME']));
$HTML->ReplaceSeitenInhalt("%%lastname%%", htmlspecialchars($_SESSION['LASTNAME']));
$HTML->ReplaceSeitenInhalt("%%partner%%", htmlspecialchars($PartnerName));
- $HTML->ReplaceSeitenInhalt("%%email%%", htmlspecialchars($RUNTIME['OPENSIM']->getUserMail($_SESSION['UUID'])));
+ $HTML->ReplaceSeitenInhalt("%%email%%", htmlspecialchars($opensim->getUserMail($_SESSION['UUID'])));
$HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", "");
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');
$HTML->ReplaceSeitenInhalt("%%IARINFOMESSAGE%%", ' ');
diff --git a/pages/regions.php b/pages/regions.php
index cc72dd4..b676ba8 100644
--- a/pages/regions.php
+++ b/pages/regions.php
@@ -61,11 +61,14 @@
$statement = $RUNTIME['PDO']->prepare("SELECT uuid,regionName,owner_uuid,locX,locY FROM regions ".($showAll ? "ORDER BY owner_uuid ASC" : "WHERE owner_uuid = ? ORDER BY uuid ASC"));
$statement->execute(array($_SESSION['UUID']));
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
while($row = $statement->fetch())
{
$stats = getRegionStatsData($row['uuid']);
- $entry = ''.htmlspecialchars($row['regionName']).' | '.htmlspecialchars($RUNTIME['OPENSIM']->getUserName($row['owner_uuid'])).' | '.fillString(($row['locX'] / 256), 4).' / '.fillString(($row['locY'] / 256), 4).' | LÖSCHEN |
';
+ $entry = ''.htmlspecialchars($row['regionName']).' | '.htmlspecialchars($opensim->getUserName($row['owner_uuid'])).' | '.fillString(($row['locX'] / 256), 4).' / '.fillString(($row['locY'] / 256), 4).' | LÖSCHEN |
';
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
}
diff --git a/pages/register.php b/pages/register.php
index 88ebba0..d944f76 100644
--- a/pages/register.php
+++ b/pages/register.php
@@ -91,7 +91,11 @@
{
displayPage("Der gewählte Standardavatar existiert nicht.");
}
- $avatarUUID = $RUNTIME['OPENSIM']->gen_uuid();
+
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
+ $avatarUUID = $opensim->gen_uuid();
$passwordHash = password_hash($RUNTIME['REGISTER']['PASS'], PASSWORD_ARGON2ID);
$avatarNameParts = explode(" ", $RUNTIME['REGISTER']['Name']);
$statementAuth = $RUNTIME['PDO']->prepare('INSERT INTO `auth` (`UUID`, `passwordHash`, `webLoginKey`, `accountType`) VALUES (:UUID, :HASHVALUE, :WEBKEY, :ACCTYPE)');
@@ -101,10 +105,10 @@
$statementProfile = $RUNTIME['PDO']->prepare('INSERT INTO `userprofile` (`useruuid`, `profilePartner`, `profileImage`, `profileFirstImage`) VALUES (:useruuid, :profilePartner, :profileImage, :profileFirstImage)');
$statementProfile->execute(['useruuid' => $avatarUUID, 'profilePartner' => "00000000-0000-0000-0000-000000000000", 'profileImage' => "00000000-0000-0000-0000-000000000000", 'profileFirstImage' => "00000000-0000-0000-0000-000000000000"]);
$Inventory = array('Calling Cards' => 2, 'Objects' => 6, 'Landmarks' => 3, 'Clothing' => 5, 'Gestures' => 21, 'Body Parts' => 13, 'Textures' => 0, 'Scripts' => 10, 'Photo Album' => 15, 'Lost And Found' => 16, 'Trash' => 14, 'Notecards' => 7, 'My Inventory' => 8, 'Sounds' => 1, 'Animations' => 20);
- $InventoryRootFolder = $RUNTIME['OPENSIM']->gen_uuid();
+ $InventoryRootFolder = $opensim->gen_uuid();
foreach ($Inventory as $FolderName => $InventoryType)
{
- $FolderUUID = $RUNTIME['OPENSIM']->gen_uuid();
+ $FolderUUID = $opensim->gen_uuid();
if ($InventoryType == 8)
{
$FolderUUID = $InventoryRootFolder;
diff --git a/pages/user-online-state.php b/pages/user-online-state.php
index a4bef00..0cc416d 100644
--- a/pages/user-online-state.php
+++ b/pages/user-online-state.php
@@ -1,4 +1,7 @@
setHTMLTitle("Online Anzeige");
$HTML->importSeitenInhalt("pages/HTML/online-anzeige.html");
@@ -11,7 +14,7 @@
{
if($row['RegionID'] != "00000000-0000-0000-0000-000000000000")
{
- $entry = ''.htmlspecialchars(trim($RUNTIME['OPENSIM']->getUserName($row['UserID']))).' | '.htmlspecialchars($RUNTIME['OPENSIM']->getRegionName($row['RegionID'])).' |
';
+ $entry = ''.htmlspecialchars(trim($opensim->getUserName($row['UserID']))).' | '.htmlspecialchars($opensim->getRegionName($row['RegionID'])).' |
';
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
}
}
diff --git a/pages/users.php b/pages/users.php
index 2565b01..3934276 100644
--- a/pages/users.php
+++ b/pages/users.php
@@ -12,6 +12,9 @@
die();
}
+ include '../app/OpenSim.php';
+ $opensim = new OpenSim();
+
$HTML->setHTMLTitle("Benutzer");
$HTML->importSeitenInhalt("pages/HTML/users.html");
@@ -22,7 +25,7 @@
$statement = $RUNTIME['PDO']->prepare('UPDATE auth SET passwordHash = :PasswordHash WHERE UUID = :PrincipalID');
$statement->execute(['PasswordHash' => password_hash($NEWPW, PASSWORD_ARGON2ID), 'PrincipalID' => $_REQUEST['userid']]);
- $HTML->ReplaceSeitenInhalt("%%MESSAGE%%", 'Das Passwort für '.htmlspecialchars($RUNTIME['OPENSIM']->getUserName($_REQUEST['userid'])).' wurde geändert. Das neue Passwort ist '.htmlspecialchars($NEWPW).'
');
+ $HTML->ReplaceSeitenInhalt("%%MESSAGE%%", 'Das Passwort für '.htmlspecialchars($opensim->getUserName($_REQUEST['userid'])).' wurde geändert. Das neue Passwort ist '.htmlspecialchars($NEWPW).'
');
}
$statement = $RUNTIME['PDO']->prepare("CREATE TABLE IF NOT EXISTS `InviteCodes` (`InviteCode` VARCHAR(64) NOT NULL, PRIMARY KEY (`InviteCode`))");