Confirmar Exclusão
Você tem certeza de que deseja excluir permanentemente a instalação para o cliente no endereço ?
Atenção: Esta ação não pode ser desfeita.
prepare("DELETE FROM installation_images WHERE installation_id = ?"); $stmt->execute([$id]); // Delete the installation $stmt = $pdo->prepare("DELETE FROM installations WHERE id = ?"); $stmt->execute([$id]); $_SESSION['message'] = 'Instalação excluída com sucesso!'; $_SESSION['message_type'] = 'success'; } catch (Exception $e) { $_SESSION['message'] = 'Erro ao excluir a instalação: ' . $e->getMessage(); $_SESSION['message_type'] = 'danger'; } } header("Location: index.php"); exit; } // Handle the GET request to show the confirmation page $id = $_GET['id'] ?? null; if (!$id) { header("Location: index.php"); exit; } // Fetch installation data for display $stmt = $pdo->prepare("SELECT * FROM installations WHERE id = ?"); $stmt->execute([$id]); $installation = $stmt->fetch(PDO::FETCH_ASSOC); if (!$installation) { $_SESSION['message'] = 'Instalação não encontrada.'; $_SESSION['message_type'] = 'danger'; header("Location: index.php"); exit; } ?>
Você tem certeza de que deseja excluir permanentemente a instalação para o cliente no endereço ?
Atenção: Esta ação não pode ser desfeita.