$type = $_POST["type"];
        $statut = $contact->statut;
        $result = $object->update_contact($_POST["line"], $statut, $type);
        if ($result >= 0) {
            $db->commit();
        } else {
            dol_print_error($db, "result={$result}");
            $db->rollback();
        }
    } else {
        setEventMessage($object->error, 'errors');
    }
} else {
    if ($action == 'swapstatut') {
        if ($object->id > 0) {
            $result = $object->swapContactStatus(GETPOST('ligne'));
        }
    } else {
        if ($action == 'deletecontact') {
            $result = $object->delete_contact($lineid);
            if ($result >= 0) {
                header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
                exit;
            } else {
                dol_print_error($db);
            }
        }
    }
}
/*
 * View