$_GET["id"] = ""; } if (!isset($_GET["plugin_resources_contracttypes_id"])) { $_GET["plugin_resources_contracttypes_id"] = 0; } if (!isset($_GET["checklist_type"])) { $_GET["checklist_type"] = 0; } if (!isset($_GET["plugin_resources_resources_id"])) { $_GET["plugin_resources_resources_id"] = -1; } $checklist = new PluginResourcesChecklist(); //from central //update checklist if (isset($_POST["add"])) { $checklist->add($_POST); Html::back(); } else { if (isset($_POST["update"])) { if ($checklist->canCreate()) { $checklist->update($_POST); } Html::back(); } else { $checklist->checkGlobal("r"); Html::header(PluginResourcesResource::getTypeName(2), '', "plugins", "resources"); $options = array('checklist_type' => $_GET["checklist_type"], 'plugin_resources_contracttypes_id' => $_GET["plugin_resources_contracttypes_id"], 'plugin_resources_resources_id' => $_GET["plugin_resources_resources_id"]); $checklist->showForm($_GET["id"], $options); Html::footer(); } }
LICENSE This file is part of Resources. Resources is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Resources 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 Resources. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); Session::checkLoginUser(); $item = new PluginResourcesChecklist(); if (isset($_POST["plugin_resources_contracttypes_id"]) && isset($_POST["checklist_type"])) { $options = array('target' => $_POST["target"], 'plugin_resources_contracttypes_id' => $_POST["plugin_resources_contracttypes_id"], 'checklist_type' => $_POST["checklist_type"], 'plugin_resources_resources_id' => $_POST["plugin_resources_resources_id"]); $item->showForm($_POST["id"], $options); } else { _e("You don't have permission to perform this action."); } Html::ajaxFooter();