Positions is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Positions. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; if (!isset($_GET["id"])) { $_GET["id"] = ""; } $info = new PluginPositionsInfo(); if (isset($_POST["add"])) { $info->check(-1, 'w', $_POST); $newID = $info->add($_POST); Html::back(); } else { if (isset($_POST["update"])) { $info->check($_POST['id'], 'w'); $info->update($_POST); Html::back(); } else { if (isset($_POST["delete"])) { $info->check($_POST['id'], 'w'); $info->delete($_POST); $info->redirectToList(); } else { if (isset($_POST["restore"])) { $info->check($_POST['id'], 'w');
Positions is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Positions. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; if (!isset($_GET["id"])) { $_GET["id"] = ""; } $info = new PluginPositionsInfo(); if (isset($_POST["add"])) { $info->check(-1, CREATE, $_POST); $newID = $info->add($_POST); if ($_SESSION['glpibackcreated']) { Html::redirect($info->getFormURL() . "?id=" . $newID); } else { Html::back(); } } else { if (isset($_POST["update"])) { $info->check($_POST['id'], UPDATE); $info->update($_POST); Html::back(); } else { if (isset($_POST["delete"])) { $info->check($_POST['id'], DELETE); $info->delete($_POST);