show profile list when file was deleted successfully
This commit is contained in:
parent
16df1a2a77
commit
c4955f49bc
|
@ -51,30 +51,29 @@ if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// print standard header
|
|
||||||
include '../main_header.php';
|
|
||||||
echo ("<p><br></p>\n");
|
|
||||||
|
|
||||||
// check if admin has submited delete operation
|
// check if admin has submited delete operation
|
||||||
if ($_POST['submit']) {
|
if ($_POST['submit']) {
|
||||||
// delete profile
|
// delete profile
|
||||||
if (!delAccountProfile($_POST['del'], $_POST['type'])) {
|
if (!delAccountProfile($_POST['del'], $_POST['type'])) {
|
||||||
StatusMessage("ERROR", _("Unable to delete profile!"), $_POST['del'] . "." . $_POST['type']);
|
metaRefresh('profilemain.php?deleteScope=' . $_POST['type'] . '&deleteFailed=' . $_POST['del']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
metaRefresh('profilemain.php?deleteScope=' . $_POST['type'] . '&deleteSucceeded=' . $_POST['del']);
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
else StatusMessage("INFO", _("Deleted profile:"), $_POST['del'] . "." . $_POST['type']);
|
|
||||||
echo ("<br><a href=\"profilemain.php\">" . _("Back to profile editor") . "</a>");
|
|
||||||
echo ("</body></html>\n");
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if admin has aborted delete operation
|
// check if admin has aborted delete operation
|
||||||
if ($_POST['abort']) {
|
if ($_POST['abort']) {
|
||||||
StatusMessage("INFO", "", _("Delete operation canceled."));
|
metaRefresh('profilemain.php');
|
||||||
echo ("<br><a href=\"profilemain.php\">" . _("Back to profile editor") . "</a>");
|
|
||||||
echo ("</body></html>\n");
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print standard header
|
||||||
|
include '../main_header.php';
|
||||||
|
echo ("<p><br></p>\n");
|
||||||
|
|
||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
echo ("<p align=\"center\"><big>" . _("Do you really want to delete this profile?") . " <b>");
|
echo ("<p align=\"center\"><big>" . _("Do you really want to delete this profile?") . " <b>");
|
||||||
echo ($_GET['del'] . "</b></big><br></p>\n");
|
echo ($_GET['del'] . "</b></big><br></p>\n");
|
||||||
|
|
|
@ -107,6 +107,12 @@ echo "<h1>" . _('Profile editor') . "</h1>\n";
|
||||||
if (isset($_GET['savedSuccessfully'])) {
|
if (isset($_GET['savedSuccessfully'])) {
|
||||||
StatusMessage("INFO", _("Profile was saved."), htmlspecialchars($_GET['savedSuccessfully']));
|
StatusMessage("INFO", _("Profile was saved."), htmlspecialchars($_GET['savedSuccessfully']));
|
||||||
}
|
}
|
||||||
|
if (isset($_GET['deleteFailed'])) {
|
||||||
|
StatusMessage('ERROR', _('Unable to delete profile!'), getTypeAlias($_GET['deleteScope']) . ': ' . htmlspecialchars($_GET['deleteFailed']));
|
||||||
|
}
|
||||||
|
if (isset($_GET['deleteSucceeded'])) {
|
||||||
|
StatusMessage('INFO', _('Deleted profile.'), getTypeAlias($_GET['deleteScope']) . ': ' . htmlspecialchars($_GET['deleteSucceeded']));
|
||||||
|
}
|
||||||
|
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
echo "<form action=\"profilemain.php\" method=\"post\">\n";
|
echo "<form action=\"profilemain.php\" method=\"post\">\n";
|
||||||
|
|
Loading…
Reference in New Issue