|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $ |
| 4 | + ------------------------------------------------------------------------- |
| 5 | + satisfaction plugin for GLPI |
| 6 | + Copyright (C) 2016-2022 by the satisfaction Development Team. |
| 7 | +
|
| 8 | + https://github.com/pluginsglpi/satisfaction |
| 9 | + ------------------------------------------------------------------------- |
| 10 | +
|
| 11 | + LICENSE |
| 12 | +
|
| 13 | + This file is part of satisfaction. |
| 14 | +
|
| 15 | + satisfaction is free software; you can redistribute it and/or modify |
| 16 | + it under the terms of the GNU General Public License as published by |
| 17 | + the Free Software Foundation; either version 2 of the License, or |
| 18 | + (at your option) any later version. |
| 19 | +
|
| 20 | + satisfaction is distributed in the hope that it will be useful, |
| 21 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | + GNU General Public License for more details. |
| 24 | +
|
| 25 | + You should have received a copy of the GNU General Public License |
| 26 | + along with satisfaction. If not, see <http://www.gnu.org/licenses/>. |
| 27 | + -------------------------------------------------------------------------- |
| 28 | + */ |
| 29 | + |
| 30 | +include('../../../inc/includes.php'); |
| 31 | + |
| 32 | +if (!isset($_POST['survey_id']) || !isset($_POST['action'])) { |
| 33 | + exit(); |
| 34 | +} |
| 35 | + |
| 36 | +$redirection = Plugin::getWebDir('satisfaction')."/front/survey.form.php?id="; |
| 37 | +$translation = new PluginSatisfactionSurveyTranslation(); |
| 38 | +switch($_POST['action']){ |
| 39 | + case 'NEW': |
| 40 | + $translation->newSurveyTranslation($_POST); |
| 41 | + Html::redirect($redirection.$_POST['survey_id']); |
| 42 | + break; |
| 43 | + |
| 44 | + case 'EDIT': |
| 45 | + $translation->editSurveyTranslation($_POST); |
| 46 | + Html::redirect($redirection.$_POST['survey_id']); |
| 47 | + break; |
| 48 | +} |
0 commit comments