setHTMLTitle("Deine Regionen");
$HTML->importSeitenInhalt("pages/HTML/deine-regionen.html");
if(@$_REQUEST['action'] == 'remove' && @$_REQUEST['region'] != '')
{
if(@$_SESSION['LEVEL'] >= 100)
{
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM regions WHERE uuid = ?");
$statementMembership->execute(array($_REQUEST['region']));
}else{
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM regions WHERE uuid = ? AND owner_uuid = ?");
$statementMembership->execute(array($_REQUEST['region'], $_SESSION['UUID']));
}
}
$table = '
Region Name | Eigentümer | Position | Aktionen |
%%ENTRY%%
';
if(@$_SESSION['LEVEL'] >= 100 && @$_REQUEST['SHOWALL'] == "1")
{
$statement = $RUNTIME['PDO']->prepare("SELECT * FROM regions ORDER BY owner_uuid ASC");
$statement->execute(array($_SESSION['UUID']));
}else{
$statement = $RUNTIME['PDO']->prepare("SELECT * FROM regions WHERE owner_uuid = ? ORDER BY uuid ASC");
$statement->execute(array($_SESSION['UUID']));
}
$statement->execute(array($_SESSION['UUID']));
while($row = $statement->fetch())
{
$entry = ''.$row['regionName'].' | '.$RUNTIME['OPENSIM']->getUserName($row['owner_uuid']).' | '.fillString(($row['locX'] / 256), 4).' / '.fillString(($row['locY'] / 256), 4).' | LÖSCHEN |
';
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
}
$table = str_replace("%%ENTRY%%", "", $table);
$HTML->ReplaceSeitenInhalt("%%REGION-LIST%%", $table);
$HTML->build();
echo $HTML->ausgabe();
?>