prepare( "UPDATE shipments SET offer_owner = :offer_owner, offer_price = :offer_price, status = 'offered' WHERE id = :id AND status IN ('posted','offered')" ); $stmt->execute([ ':offer_owner' => $offerOwner, ':offer_price' => $offerPrice, ':id' => $shipmentId, ]); if ($stmt->rowCount() > 0) { set_flash('success', t('success_offer')); header('Location: ' . url_with_lang('truck_owner_dashboard.php')); exit; } else { $errors[] = t('error_invalid'); } } } $shipments = []; try { $stmt = db()->query("SELECT * FROM shipments WHERE status IN ('posted','offered') ORDER BY created_at DESC LIMIT 20"); $shipments = $stmt->fetchAll(); } catch (Throwable $e) { $shipments = []; } render_header(t('owner_dashboard'), 'owner'); $flash = get_flash(); ?>

total