2020-06-03 15:31:18 +00:00
|
|
|
<?php
|
|
|
|
$HTML->setHTMLTitle("Gruppen");
|
|
|
|
$HTML->importSeitenInhalt("pages/HTML/deine-regionen.html");
|
|
|
|
|
2021-01-06 14:28:13 +00:00
|
|
|
if(@$_REQUEST['action'] == 'leave' && @$_REQUEST['group'] != '')
|
|
|
|
{
|
|
|
|
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM os_groups_membership WHERE GroupID = ? AND PrincipalID = ?");
|
|
|
|
$statementMembership->execute(array($_REQUEST['group'], $_SESSION['UUID']));
|
|
|
|
}
|
|
|
|
|
2020-06-03 15:31:18 +00:00
|
|
|
$table = '<table class="table"><thead><tr><th scope="col">Name</th><th scope="col">Gründer</th><th scope="col">Aktionen</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
|
|
|
|
|
|
|
$statementMembership = $RUNTIME['PDO']->prepare("SELECT * FROM os_groups_membership WHERE PrincipalID = ? ORDER BY GroupID ASC");
|
|
|
|
$statementMembership->execute(array($_SESSION['UUID']));
|
|
|
|
|
|
|
|
while($rowMembership = $statementMembership->fetch())
|
|
|
|
{
|
|
|
|
$statementGroups = $RUNTIME['PDO']->prepare("SELECT * FROM os_groups_groups WHERE GroupID = ? LIMIT 1");
|
|
|
|
$statementGroups->execute(array($rowMembership['GroupID']));
|
|
|
|
|
|
|
|
while($rowGroups = $statementGroups->fetch())
|
|
|
|
{
|
2021-01-06 14:28:13 +00:00
|
|
|
$entry = '<tr><td>'.$rowGroups['Name'].'</td><td>'.$RUNTIME['OPENSIM']->getUserName($rowGroups['FounderID']).'</td><td><a href="index.php?page=groups&action=leave&group='.$rowGroups['GroupID'].'">VERLASSEN</a></td></tr>';
|
2020-06-03 15:31:18 +00:00
|
|
|
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$table = str_replace("%%ENTRY%%", "", $table);
|
|
|
|
$HTML->ReplaceSeitenInhalt("%%REGION-LIST%%", $table);
|
|
|
|
|
|
|
|
$HTML->build();
|
|
|
|
echo $HTML->ausgabe();
|
|
|
|
?>
|