show profile list when file was deleted successfully

This commit is contained in:
Roland Gruber 2010-05-26 18:08:52 +00:00
parent e6c6087ab1
commit 16df1a2a77
2 changed files with 15 additions and 12 deletions

View File

@ -49,32 +49,29 @@ if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
exit;
}
// print standard header
include '../main_header.php';
echo ("<p><br></p>\n");
// check if admin has submited delete operation
if ($_POST['submit']) {
// delete user profile
if(!deletePDFStructureDefinition($_POST['type'],$_POST['delete'])) {
StatusMessage('ERROR', '', _('Unable to delete PDF structure!') . ' ' . _('Scope') . ': ' . $_POST['type'] . ' ' . _('Name') . ': ' . $_POST['delete']);
metaRefresh('pdfmain.php?deleteScope=' . $_POST['type'] . '&amp;deleteFailed=' . $_POST['delete']);
exit();
}
else {
StatusMessage('INFO', '', _('Deleted PDF structure:') . ' ' . _('Scope') . ': ' . $_POST['type'] . ' ' . _('Name') . ': ' . $_POST['delete']);
metaRefresh('pdfmain.php?deleteScope=' . $_POST['type'] . '&amp;deleteSucceeded=' . $_POST['delete']);
exit();
}
echo ("<br><a href=\"pdfmain.php\">" . _("Back to PDF Editor") . "</a>");
echo ("</body></html>\n");
exit;
}
// check if admin has aborted delete operation
if ($_POST['abort']) {
StatusMessage("INFO", "", _("Delete operation canceled."));
echo ("<br><a href=\"pdfmain.php\">" . _("Back to PDF Editor") . "</a>");
echo ("</body></html>\n");
metaRefresh('pdfmain.php');
exit;
}
// print standard header
include '../main_header.php';
echo ("<p><br></p>\n");
// check if right type was given
$type = $_GET['type'];
echo ("<p align=\"center\"><big>" . _("Do you really want to delete this PDF structure?") . "</big>");

View File

@ -118,6 +118,12 @@ include '../main_header.php';
if (isset($_GET['savedSuccessfully'])) {
StatusMessage("INFO", _("PDF structure was successfully saved."), htmlspecialchars($_GET['savedSuccessfully']));
}
if (isset($_GET['deleteFailed'])) {
StatusMessage('ERROR', _('Unable to delete PDF structure!'), getTypeAlias($_GET['deleteScope']) . ': ' . htmlspecialchars($_GET['deleteFailed']));
}
if (isset($_GET['deleteSucceeded'])) {
StatusMessage('INFO', _('Deleted PDF structure.'), getTypeAlias($_GET['deleteScope']) . ': ' . htmlspecialchars($_GET['deleteSucceeded']));
}
?>
<br>