You should have received a copy of the GNU General Public License along with GLPI. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ /** @file * @brief */ include '../inc/includes.php'; Session::checkCentralAccess(); if (!isset($_GET["id"])) { $_GET["id"] = ""; } $language = new NotificationTemplateTranslation(); if (isset($_POST["add"])) { $language->check(-1, CREATE, $_POST); $newID = $language->add($_POST); Event::log($newID, "notificationtemplatetranslations", 4, "notification", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $_POST["language"])); Html::back(); } else { if (isset($_POST["purge"])) { $language->check($_POST["id"], PURGE); $language->delete($_POST, 1); Event::log($_POST["id"], "notificationtemplatetranslations", 4, "notification", sprintf(__('%s purges an item'), $_SESSION["glpiname"])); $language->redirectToList(); } else { if (isset($_POST["update"])) { $language->check($_POST["id"], UPDATE); $language->update($_POST); Event::log($_POST["id"], "notificationtemplatetranslations", 4, "notification", sprintf(__('%s updates an item'), $_SESSION["glpiname"])); Html::back();
along with GLPI; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -------------------------------------------------------------------------- */ // ---------------------------------------------------------------------- // Original Author of file: // Purpose of file: // ---------------------------------------------------------------------- define('GLPI_ROOT', '..'); include GLPI_ROOT . "/inc/includes.php"; if (!isset($_GET["id"])) { $_GET["id"] = ""; } $language = new NotificationTemplateTranslation(); if (isset($_POST["add"])) { $language->check(-1, 'w', $_POST); $newID = $language->add($_POST); Event::log($newID, "notificationtemplates", 4, "notification", $_SESSION["glpiname"] . " " . $LANG['log'][20] . " : " . $_POST["language"] . "."); glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_POST["delete"])) { $language->check($_POST["id"], 'd'); $language->delete($_POST); Event::log($_POST["id"], "notificationtemplates", 4, "notification", $_SESSION["glpiname"] . " " . $LANG['log'][22]); $language->redirectToList(); } else { if (isset($_POST["update"])) { $language->check($_POST["id"], 'w'); $language->update($_POST); Event::log($_POST["id"], "notificationtemplates", 4, "notification", $_SESSION["glpiname"] . " " . $LANG['log'][21]); glpi_header($_SERVER['HTTP_REFERER']);