Always redirect after making changes
parent
b3db0383a1
commit
16ee118c98
|
@ -1,16 +1,19 @@
|
|||
<?php
|
||||
$HTML->setHTMLTitle("Online Anzeige");
|
||||
$HTML->importSeitenInhalt("pages/HTML/online-anzeige.html");
|
||||
|
||||
if(@$_REQUEST['action'] == 'remove' && @$_REQUEST['uuid'] != '')
|
||||
{
|
||||
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM Friends WHERE Friend = ? AND PrincipalID = ?");
|
||||
$statementMembership->execute(array($_REQUEST['uuid'], $_SESSION['UUID']));
|
||||
|
||||
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM Friends WHERE PrincipalID = ? AND Friend = ?");
|
||||
$statementMembership->execute(array($_REQUEST['uuid'], $_SESSION['UUID']));
|
||||
$statementMembership->execute(array($_REQUEST['uuid'], $_SESSION['UUID']));
|
||||
|
||||
header('Location: index.php?page=friends');
|
||||
die();
|
||||
}
|
||||
|
||||
$HTML->setHTMLTitle("Online Anzeige");
|
||||
$HTML->importSeitenInhalt("pages/HTML/online-anzeige.html");
|
||||
|
||||
$table = '<table class="table"><thead><tr><th scope="col">Name</th><th scope="col">Optionen</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
||||
|
||||
$statement = $RUNTIME['PDO']->prepare("SELECT PrincipalID,Friend FROM Friends WHERE PrincipalID = ? ORDER BY Friend ASC");
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
<?php
|
||||
$HTML->setHTMLTitle("Gruppen");
|
||||
$HTML->importSeitenInhalt("pages/HTML/deine-regionen.html");
|
||||
|
||||
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']));
|
||||
|
||||
header('Location: index.php?page=groups');
|
||||
die();
|
||||
}
|
||||
|
||||
$HTML->setHTMLTitle("Gruppen");
|
||||
$HTML->importSeitenInhalt("pages/HTML/deine-regionen.html");
|
||||
|
||||
$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 GroupID FROM os_groups_membership WHERE PrincipalID = ? ORDER BY GroupID ASC");
|
||||
|
|
|
@ -84,6 +84,9 @@
|
|||
$statementUserIdentitys = $RUNTIME['PDO']->prepare('INSERT INTO UserIdentitys (PrincipalID, IdentityID) VALUES (:PrincipalID, :IdentityID)');
|
||||
$statementUserIdentitys->execute(['PrincipalID' => $_SESSION['UUID'], 'IdentityID' => $avatarUUID]);
|
||||
//print_r($statementUserIdentitys->errorInfo());
|
||||
|
||||
header('Location: index.php?page=identities');
|
||||
die();
|
||||
}else{
|
||||
$HTML->ReplaceSeitenInhalt("%%MESSAGE%%", '<div class="alert alert-danger" role="alert">Dieser Name ist schon in Benutzung.</div>');
|
||||
}
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
$statement = $RUNTIME['PDO']->prepare('UPDATE auth SET passwordHash = :PasswordHash WHERE UUID = :PrincipalID');
|
||||
$statement->execute(['PasswordHash' => md5(md5($NewPassword).":".$_SESSION['SALT']), 'PrincipalID' => $_SESSION['UUID']]);
|
||||
$_SESSION['PASSWORD'] = md5(md5($NewPassword).":".$_SESSION['SALT']);
|
||||
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", 'Neues Passwort gespeichert.');
|
||||
$_SESSION['pwChanged'] = true;
|
||||
|
||||
header('Location: index.php?page=password');
|
||||
die();
|
||||
}else{
|
||||
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", 'Passwörter stimmen nicht überein!');
|
||||
}
|
||||
|
@ -61,10 +64,14 @@
|
|||
$HTML->ReplaceSeitenInhalt("%%lastname%%", htmlspecialchars($_SESSION['LASTNAME']));
|
||||
$HTML->ReplaceSeitenInhalt("%%partner%%", htmlspecialchars($PartnerName));
|
||||
$HTML->ReplaceSeitenInhalt("%%email%%", htmlspecialchars($RUNTIME['OPENSIM']->getUserMail($_SESSION['UUID'])));
|
||||
$HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", "");
|
||||
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');
|
||||
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');
|
||||
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');
|
||||
$HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", "");
|
||||
|
||||
$pwChanged = false;
|
||||
if(isset($_SESSION['pwChanged'])) {
|
||||
$pwChanged = true;
|
||||
unset($_SESSION['pwChanged']);
|
||||
}
|
||||
$HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", $pwChanged ? 'Neues Passwort gespeichert.' : ' ');
|
||||
|
||||
$HTML->build();
|
||||
echo $HTML->ausgabe();
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
return array();
|
||||
}
|
||||
|
||||
if(@$_REQUEST['action'] == 'remove' && @$_REQUEST['region'] != '')
|
||||
if(isset($_REQUEST['action']) && isset($_REQUEST['region']) && $_REQUEST['action'] == 'remove' && $_REQUEST['region'] != '')
|
||||
{
|
||||
if(@$_SESSION['LEVEL'] >= 100)
|
||||
if(isset($_SESSION['LEVEL']) && $_SESSION['LEVEL'] >= 100)
|
||||
{
|
||||
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM regions WHERE uuid = ?");
|
||||
$statementMembership->execute(array($_REQUEST['region']));
|
||||
|
@ -50,6 +50,9 @@
|
|||
$statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM regions WHERE uuid = ? AND owner_uuid = ?");
|
||||
$statementMembership->execute(array($_REQUEST['region'], $_SESSION['UUID']));
|
||||
}
|
||||
|
||||
header('Location: index.php?page=regions');
|
||||
die();
|
||||
}
|
||||
|
||||
$table = '<table class="table"><thead><tr><th scope="col">Region Name</th><th scope="col">Eigentümer</th><th scope="col">Position</th><th scope="col">Aktionen</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
$_SESSION['LEVEL'] = 0;
|
||||
$_SESSION['DISPLAYNAME'] = strtoupper(trim($RUNTIME['REGISTER']['Name']));
|
||||
$_SESSION['LOGIN'] = 'true';
|
||||
include "./pages/dashboard.php";
|
||||
|
||||
header('Location: index.php?page=dashboard');
|
||||
die();
|
||||
?>
|
Loading…
Reference in New Issue