$notificationtemplate->check($_POST["id"], 'd'); $notificationtemplate->delete($_POST); Event::log($_POST["id"], "notificationtemplates", 4, "notification", $_SESSION["glpiname"] . " " . $LANG['log'][22]); $notificationtemplate->redirectToList(); } else { if (isset($_POST["delete_languages"])) { $notificationtemplate->check(-1, 'd'); $language = new NotificationTemplateTranslation(); if (isset($_POST['languages'])) { foreach ($_POST['languages'] as $key => $val) { if ($val == 'on') { $input['id'] = $key; $language->delete($input); } } } glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_POST["update"])) { $notificationtemplate->check($_POST["id"], 'w'); $notificationtemplate->update($_POST); Event::log($_POST["id"], "notificationtemplates", 4, "notification", $_SESSION["glpiname"] . " " . $LANG['log'][21]); glpi_header($_SERVER['HTTP_REFERER']); } else { commonHeader($LANG['mailing'][113], $_SERVER['PHP_SELF'], "config", "mailing", "notificationtemplate"); $notificationtemplate->showForm($_GET["id"]); commonFooter(); } } } }