<?php

require_once __DIR__ . '/../../auth/verifica.php';
require_once __DIR__ . '/../../config/conexao.php';

$id = intval($_GET['id'] ?? 0);

if ($id <= 0) {
    die('Venda inválida');
}

$stmt = $pdo->prepare("
    UPDATE evento_vendas
    SET pago = 'S'
    WHERE id = ?
");

$stmt->execute([$id]);

header('Location: vendas.php');
exit;