if ($result >= 0) { header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit; } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); } else { setEventMessage($object->error, 'errors'); } } } // bascule du statut d'un contact if ($action == 'swapstatut' && $user->rights->projet->creer) { if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } } // Efface un contact if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer) { $object->fetch($id); $result = $object->delete_contact(GETPOST("lineid")); if ($result >= 0) { header("Location: contact.php?id=" . $object->id); exit; } else { dol_print_error($db); } }
$langs->load("errors"); $mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>'; } else { $mesg = '<div class="error">'.$project->error.'</div>'; } } } // bascule du statut d'un contact if ($_GET["action"] == 'swapstatut' && $user->rights->projet->creer) { if ($project->fetch($id)) { $result=$project->swapContactStatus(GETPOST('ligne')); } else { dol_print_error($db); } } // Efface un contact if ($_GET["action"] == 'deleteline' && $user->rights->projet->creer) { $project->fetch($id); $result = $project->delete_contact($_GET["lineid"]); if ($result >= 0) {