$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
 */
$form = new Form($db);
$formcompany = new FormCompany($db);
$contactstatic = new Contact($db);