diff --git a/Interfaz/consultar_asientos.php b/Interfaz/control/consultar_asientos.php similarity index 96% rename from Interfaz/consultar_asientos.php rename to Interfaz/control/consultar_asientos.php index bc4309e..2513a9f 100644 --- a/Interfaz/consultar_asientos.php +++ b/Interfaz/control/consultar_asientos.php @@ -1,20 +1,20 @@ -<?php -require 'conexionbd.php'; - -$artista = $_GET['artista'] ?? ''; -$dia = $_GET['dia'] ?? ''; - -if (empty($artista) || empty($dia)) { - die(json_encode(['error' => 'Faltan parĂ¡metros (artista y dia).'])); -} - -try { - $stmt = $conn->prepare("SELECT id, asiento, estado, precio FROM asientos WHERE artista = :artista AND dia = :dia"); - $stmt->execute([':artista' => $artista, ':dia' => $dia]); - $asientos = $stmt->fetchAll(PDO::FETCH_ASSOC); - - echo json_encode(['success' => true, 'asientos' => $asientos]); -} catch (PDOException $e) { - die(json_encode(['error' => 'Error al consultar los asientos: ' . $e->getMessage()])); -} +<?php +require 'conexionbd.php'; + +$artista = $_GET['artista'] ?? ''; +$dia = $_GET['dia'] ?? ''; + +if (empty($artista) || empty($dia)) { + die(json_encode(['error' => 'Faltan parĂ¡metros (artista y dia).'])); +} + +try { + $stmt = $conn->prepare("SELECT id, asiento, estado, precio FROM asientos WHERE artista = :artista AND dia = :dia"); + $stmt->execute([':artista' => $artista, ':dia' => $dia]); + $asientos = $stmt->fetchAll(PDO::FETCH_ASSOC); + + echo json_encode(['success' => true, 'asientos' => $asientos]); +} catch (PDOException $e) { + die(json_encode(['error' => 'Error al consultar los asientos: ' . $e->getMessage()])); +} ?> \ No newline at end of file