GNU General Public License for more details. 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 * @since version 0.85 */ include '../inc/includes.php'; $rule = new Rule(); $rule->getFromDB(intval($_POST['rules_id'])); $action = new RuleAction($rule->fields['sub_type']); if (isset($_POST["add"])) { $action->check(-1, CREATE, $_POST); $action->add($_POST); Html::back(); } else { if (isset($_POST["update"])) { $action->check($_POST['id'], UPDATE); $action->update($_POST); Html::back(); } else { if (isset($_POST["purge"])) { $action->check($_POST['id'], PURGE); $action->delete($_POST, 1); Html::back(); } } }
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 GLPI. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ /** @file * @brief * @since version 0.85 */ include '../inc/includes.php'; $criteria = new RuleAction(); if (isset($_POST["add"])) { $criteria->check(-1, CREATE, $_POST); $criteria->add($_POST); Html::back(); } else { if (isset($_POST["update"])) { $criteria->check($_POST['id'], UPDATE); $criteria->update($_POST); Html::back(); } else { if (isset($_POST["purge"])) { $criteria->check($_POST['id'], PURGE); $criteria->delete($_POST, 1); Html::back(); } } }