$newID = $projet->add($_POST); $values["items_id"] = $_POST["helpdesk_id"]; $values["itemtype"] = $_POST["helpdesk_itemtype"]; $values["plugin_projet_projets_id"] = $newID; $projet_item->addItem($values); Html::redirect($CFG_GLPI["root_doc"] . "/plugins/projet/front/projet.form.php"); } else { $projet->check(-1, 'w', $_POST); $newID = $projet->add($_POST); Html::back(); } } else { if (isset($_POST["delete"])) { $projet->check($_POST['id'], 'w'); if (!empty($_POST["withtemplate"])) { $projet->delete($_POST, 1); } else { $projet->delete($_POST); } if (!empty($_POST["withtemplate"])) { Html::redirect($CFG_GLPI["root_doc"] . "/plugins/projet/front/setup.templates.php?add=0"); } else { $projet->redirectToList(); } } else { if (isset($_POST["restore"])) { $projet->check($_POST['id'], 'w'); $projet->restore($_POST); $projet->redirectToList(); } else { if (isset($_POST["purge"])) {