diff --git a/BD/ticketcompany_db_asientos.sql b/BD/ticketcompany_db_asientos.sql new file mode 100644 index 0000000..b259483 --- /dev/null +++ b/BD/ticketcompany_db_asientos.sql @@ -0,0 +1,56 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `asientos` +-- + +DROP TABLE IF EXISTS `asientos`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `asientos` ( + `id` int NOT NULL AUTO_INCREMENT, + `lugar_id` int NOT NULL, + `numero_asiento` varchar(10) NOT NULL, + `estado` enum('disponible','vendido') DEFAULT 'disponible', + `precio` decimal(10,2) NOT NULL DEFAULT '500.00', + PRIMARY KEY (`id`), + KEY `lugar_id` (`lugar_id`), + CONSTRAINT `asientos_ibfk_1` FOREIGN KEY (`lugar_id`) REFERENCES `lugares` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=2171 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `asientos` +-- + +LOCK TABLES `asientos` WRITE; +/*!40000 ALTER TABLE `asientos` DISABLE KEYS */; +INSERT INTO `asientos` VALUES (1101,2,'A1','disponible',500.00),(1102,2,'A2','disponible',500.00),(1103,2,'A3','disponible',500.00),(1104,2,'A4','disponible',500.00),(1105,2,'A5','disponible',500.00),(1106,2,'A6','disponible',500.00),(1107,2,'A7','disponible',500.00),(1108,2,'A8','vendido',500.00),(1109,2,'A9','vendido',500.00),(1110,2,'A10','disponible',500.00),(1111,2,'B1','disponible',500.00),(1112,2,'B2','disponible',500.00),(1113,2,'B3','disponible',500.00),(1114,2,'B4','disponible',500.00),(1115,2,'B5','disponible',500.00),(1116,2,'B6','disponible',500.00),(1117,2,'B7','disponible',500.00),(1118,2,'B8','disponible',500.00),(1119,2,'B9','disponible',500.00),(1120,2,'B10','disponible',500.00),(1121,2,'C1','disponible',500.00),(1122,2,'C2','disponible',500.00),(1123,2,'C3','vendido',500.00),(1124,2,'C4','vendido',500.00),(1125,2,'C5','disponible',500.00),(1126,2,'C6','disponible',500.00),(1127,2,'C7','disponible',500.00),(1128,2,'C8','disponible',500.00),(1129,2,'C9','disponible',500.00),(1130,2,'C10','disponible',500.00),(1131,2,'D1','disponible',500.00),(1132,2,'D2','disponible',500.00),(1133,2,'D3','disponible',500.00),(1134,2,'D4','disponible',500.00),(1135,2,'D5','disponible',500.00),(1136,2,'D6','disponible',500.00),(1137,2,'D7','disponible',500.00),(1138,2,'D8','disponible',500.00),(1139,2,'D9','disponible',500.00),(1140,2,'D10','disponible',500.00),(1141,2,'E1','disponible',500.00),(1142,2,'E2','disponible',500.00),(1143,2,'E3','disponible',500.00),(1144,2,'E4','disponible',500.00),(1145,2,'E5','disponible',500.00),(1146,2,'E6','disponible',500.00),(1147,2,'E7','disponible',500.00),(1148,2,'E8','disponible',500.00),(1149,2,'E9','disponible',500.00),(1150,2,'E10','disponible',500.00),(1151,2,'F1','disponible',500.00),(1152,2,'F2','disponible',500.00),(1153,2,'F3','disponible',500.00),(1154,2,'F4','disponible',500.00),(1155,2,'F5','vendido',500.00),(1156,2,'F6','disponible',500.00),(1157,2,'F7','disponible',500.00),(1158,2,'F8','vendido',500.00),(1159,2,'F9','vendido',500.00),(1160,2,'F10','disponible',500.00),(1161,2,'G1','vendido',500.00),(1162,2,'G2','disponible',500.00),(1163,2,'G3','disponible',500.00),(1164,2,'G4','disponible',500.00),(1165,2,'G5','vendido',500.00),(1166,2,'G6','vendido',500.00),(1167,2,'G7','vendido',500.00),(1168,2,'G8','vendido',500.00),(1169,2,'G9','vendido',500.00),(1170,2,'G10','vendido',500.00),(1171,2,'H1','disponible',500.00),(1172,2,'H2','disponible',500.00),(1173,2,'H3','disponible',500.00),(1174,2,'H4','vendido',500.00),(1175,2,'H5','vendido',500.00),(1176,2,'H6','vendido',500.00),(1177,2,'H7','disponible',500.00),(1178,2,'H8','disponible',500.00),(1179,2,'H9','disponible',500.00),(1180,2,'H10','disponible',500.00),(1181,2,'I1','disponible',500.00),(1182,2,'I2','disponible',500.00),(1183,2,'I3','disponible',500.00),(1184,2,'I4','disponible',500.00),(1185,2,'I5','disponible',500.00),(1186,2,'I6','disponible',500.00),(1187,2,'I7','disponible',500.00),(1188,2,'I8','disponible',500.00),(1189,2,'I9','disponible',500.00),(1190,2,'I10','disponible',500.00),(1191,2,'J1','disponible',500.00),(1192,2,'J2','disponible',500.00),(1193,2,'J3','disponible',500.00),(1194,2,'J4','disponible',500.00),(1195,2,'J5','disponible',500.00),(1196,2,'J6','disponible',500.00),(1197,2,'J7','vendido',500.00),(1198,2,'J8','disponible',500.00),(1199,2,'J9','disponible',500.00),(1200,2,'J10','disponible',500.00),(1201,2,'K1','vendido',500.00),(1202,2,'K2','disponible',500.00),(1203,2,'K3','disponible',500.00),(1204,2,'K4','disponible',500.00),(1205,2,'K5','disponible',500.00),(1206,2,'K6','disponible',500.00),(1207,2,'K7','disponible',500.00),(1208,2,'K8','disponible',500.00),(1209,2,'K9','vendido',500.00),(1210,2,'K10','vendido',500.00),(1211,2,'L1','vendido',500.00),(1212,2,'L2','vendido',500.00),(1213,2,'L3','disponible',500.00),(1214,2,'L4','disponible',500.00),(1215,2,'L5','disponible',500.00),(1216,2,'L6','disponible',500.00),(1217,2,'L7','disponible',500.00),(1218,2,'L8','disponible',500.00),(1219,2,'L9','disponible',500.00),(1220,2,'L10','disponible',500.00),(1221,2,'M1','disponible',500.00),(1222,2,'M2','disponible',500.00),(1223,2,'M3','disponible',500.00),(1224,2,'M4','vendido',500.00),(1225,2,'M5','disponible',500.00),(1226,1,'A1','disponible',500.00),(1227,1,'A2','disponible',500.00),(1228,1,'A3','disponible',500.00),(1229,1,'A4','disponible',500.00),(1230,1,'A5','disponible',500.00),(1231,1,'A6','disponible',500.00),(1232,1,'A7','disponible',500.00),(1233,1,'A8','vendido',500.00),(1234,1,'A9','disponible',500.00),(1235,1,'A10','disponible',500.00),(1236,1,'B1','disponible',500.00),(1237,1,'B2','disponible',500.00),(1238,1,'B3','disponible',500.00),(1239,1,'B4','disponible',500.00),(1240,1,'B5','disponible',500.00),(1241,1,'B6','disponible',500.00),(1242,1,'B7','disponible',500.00),(1243,1,'B8','disponible',500.00),(1244,1,'B9','disponible',500.00),(1245,1,'B10','disponible',500.00),(1246,1,'C1','disponible',500.00),(1247,1,'C2','disponible',500.00),(1248,1,'C3','disponible',500.00),(1249,1,'C4','disponible',500.00),(1250,1,'C5','disponible',500.00),(1251,1,'C6','disponible',500.00),(1252,1,'C7','disponible',500.00),(1253,1,'C8','disponible',500.00),(1254,1,'C9','disponible',500.00),(1255,1,'C10','disponible',500.00),(1256,1,'D1','disponible',500.00),(1257,1,'D2','disponible',500.00),(1258,1,'D3','vendido',500.00),(1259,1,'D4','disponible',500.00),(1260,1,'D5','disponible',500.00),(1261,1,'D6','disponible',500.00),(1262,1,'D7','disponible',500.00),(1263,1,'D8','disponible',500.00),(1264,1,'D9','disponible',500.00),(1265,1,'D10','disponible',500.00),(1266,1,'E1','disponible',500.00),(1267,1,'E2','disponible',500.00),(1268,1,'E3','disponible',500.00),(1269,1,'E4','disponible',500.00),(1270,1,'E5','disponible',500.00),(1271,1,'E6','disponible',500.00),(1272,1,'E7','disponible',500.00),(1273,1,'E8','disponible',500.00),(1274,1,'E9','disponible',500.00),(1275,1,'E10','disponible',500.00),(1276,1,'F1','disponible',500.00),(1277,1,'F2','disponible',500.00),(1278,1,'F3','disponible',500.00),(1279,1,'F4','disponible',500.00),(1280,1,'F5','disponible',500.00),(1281,1,'F6','disponible',500.00),(1282,1,'F7','disponible',500.00),(1283,1,'F8','disponible',500.00),(1284,1,'F9','disponible',500.00),(1285,1,'F10','disponible',500.00),(1286,1,'G1','disponible',500.00),(1287,1,'G2','disponible',500.00),(1288,1,'G3','disponible',500.00),(1289,1,'G4','disponible',500.00),(1290,1,'G5','disponible',500.00),(1291,1,'G6','disponible',500.00),(1292,1,'G7','disponible',500.00),(1293,1,'G8','disponible',500.00),(1294,1,'G9','disponible',500.00),(1295,1,'G10','disponible',500.00),(1296,1,'H1','disponible',500.00),(1297,1,'H2','disponible',500.00),(1298,1,'H3','disponible',500.00),(1299,1,'H4','disponible',500.00),(1300,1,'H5','disponible',500.00),(1301,1,'H6','disponible',500.00),(1302,1,'H7','disponible',500.00),(1303,1,'H8','disponible',500.00),(1304,1,'H9','disponible',500.00),(1305,1,'H10','disponible',500.00),(1306,1,'I1','disponible',500.00),(1307,1,'I2','disponible',500.00),(1308,1,'I3','disponible',500.00),(1309,1,'I4','disponible',500.00),(1310,1,'I5','disponible',500.00),(1311,1,'I6','disponible',500.00),(1312,1,'I7','disponible',500.00),(1313,1,'I8','disponible',500.00),(1314,1,'I9','disponible',500.00),(1315,1,'I10','disponible',500.00),(1316,1,'J1','disponible',500.00),(1317,1,'J2','disponible',500.00),(1318,1,'J3','disponible',500.00),(1319,1,'J4','disponible',500.00),(1320,1,'J5','disponible',500.00),(1321,1,'J6','disponible',500.00),(1322,1,'J7','disponible',500.00),(1323,1,'J8','disponible',500.00),(1324,1,'J9','disponible',500.00),(1325,1,'J10','disponible',500.00),(1326,1,'K1','disponible',500.00),(1327,1,'K2','disponible',500.00),(1328,1,'K3','disponible',500.00),(1329,1,'K4','disponible',500.00),(1330,1,'K5','disponible',500.00),(1331,1,'K6','disponible',500.00),(1332,1,'K7','disponible',500.00),(1333,1,'K8','disponible',500.00),(1334,1,'K9','disponible',500.00),(1335,1,'K10','disponible',500.00),(1336,1,'L1','disponible',500.00),(1337,1,'L2','disponible',500.00),(1338,1,'L3','disponible',500.00),(1339,1,'L4','disponible',500.00),(1340,1,'L5','disponible',500.00),(1341,1,'L6','disponible',500.00),(1342,1,'L7','disponible',500.00),(1343,1,'L8','disponible',500.00),(1344,1,'L9','disponible',500.00),(1345,1,'L10','disponible',500.00),(1346,1,'M1','disponible',500.00),(1347,1,'M2','disponible',500.00),(1348,1,'M3','disponible',500.00),(1349,1,'M4','disponible',500.00),(1350,1,'M5','disponible',500.00),(1351,1,'M6','disponible',500.00),(1352,1,'M7','disponible',500.00),(1353,1,'M8','disponible',500.00),(1354,1,'M9','disponible',500.00),(1355,1,'M10','disponible',500.00),(1356,1,'N1','vendido',500.00),(1357,1,'N2','disponible',500.00),(1358,1,'N3','disponible',500.00),(1359,1,'N4','disponible',500.00),(1360,1,'N5','disponible',500.00),(1361,1,'N6','disponible',500.00),(1362,1,'N7','disponible',500.00),(1363,1,'N8','disponible',500.00),(1364,1,'N9','disponible',500.00),(1365,1,'N10','disponible',500.00),(1366,1,'O1','disponible',500.00),(1367,1,'O2','disponible',500.00),(1368,1,'O3','disponible',500.00),(1369,1,'O4','disponible',500.00),(1370,1,'O5','disponible',500.00),(1371,1,'O6','disponible',500.00),(1372,1,'O7','disponible',500.00),(1373,1,'O8','disponible',500.00),(1374,1,'O9','disponible',500.00),(1375,1,'O10','disponible',500.00),(1376,1,'P1','disponible',500.00),(1377,1,'P2','disponible',500.00),(1378,1,'P3','disponible',500.00),(1379,1,'P4','disponible',500.00),(1380,1,'P5','disponible',500.00),(1381,1,'P6','disponible',500.00),(1382,1,'P7','disponible',500.00),(1383,1,'P8','disponible',500.00),(1384,1,'P9','disponible',500.00),(1385,1,'P10','disponible',500.00),(1386,1,'Q1','disponible',500.00),(1387,1,'Q2','disponible',500.00),(1388,1,'Q3','disponible',500.00),(1389,1,'Q4','disponible',500.00),(1390,1,'Q5','disponible',500.00),(1391,1,'Q6','disponible',500.00),(1392,1,'Q7','disponible',500.00),(1393,1,'Q8','disponible',500.00),(1394,1,'Q9','disponible',500.00),(1395,1,'Q10','disponible',500.00),(1396,1,'R1','disponible',500.00),(1397,1,'R2','disponible',500.00),(1398,1,'R3','disponible',500.00),(1399,1,'R4','disponible',500.00),(1400,1,'R5','disponible',500.00),(1401,1,'R6','disponible',500.00),(1402,1,'R7','disponible',500.00),(1403,1,'R8','disponible',500.00),(1404,1,'R9','disponible',500.00),(1405,1,'R10','disponible',500.00),(1406,1,'S1','disponible',500.00),(1407,1,'S2','disponible',500.00),(1408,1,'S3','disponible',500.00),(1409,1,'S4','disponible',500.00),(1410,1,'S5','disponible',500.00),(1411,1,'S6','disponible',500.00),(1412,1,'S7','disponible',500.00),(1413,1,'S8','disponible',500.00),(1414,1,'S9','disponible',500.00),(1415,1,'S10','disponible',500.00),(1416,1,'T1','disponible',500.00),(1417,1,'T2','disponible',500.00),(1418,1,'T3','disponible',500.00),(1419,1,'T4','disponible',500.00),(1420,1,'T5','disponible',500.00),(1421,1,'T6','disponible',500.00),(1422,1,'T7','disponible',500.00),(1423,1,'T8','disponible',500.00),(1424,1,'T9','disponible',500.00),(1425,1,'T10','disponible',500.00),(1426,6,'A1','disponible',500.00),(1427,6,'A2','disponible',500.00),(1428,6,'A3','disponible',500.00),(1429,6,'A4','disponible',500.00),(1430,6,'A5','disponible',500.00),(1431,6,'A6','disponible',500.00),(1432,6,'A7','disponible',500.00),(1433,6,'A8','disponible',500.00),(1434,6,'A9','disponible',500.00),(1435,6,'A10','disponible',500.00),(1436,6,'B1','disponible',500.00),(1437,6,'B2','disponible',500.00),(1438,6,'B3','disponible',500.00),(1439,6,'B4','disponible',500.00),(1440,6,'B5','disponible',500.00),(1441,6,'B6','disponible',500.00),(1442,6,'B7','disponible',500.00),(1443,6,'B8','disponible',500.00),(1444,6,'B9','disponible',500.00),(1445,6,'B10','disponible',500.00),(1446,6,'C1','disponible',500.00),(1447,6,'C2','disponible',500.00),(1448,6,'C3','disponible',500.00),(1449,6,'C4','disponible',500.00),(1450,6,'C5','disponible',500.00),(1451,6,'C6','disponible',500.00),(1452,6,'C7','disponible',500.00),(1453,6,'C8','disponible',500.00),(1454,6,'C9','disponible',500.00),(1455,6,'C10','disponible',500.00),(1456,6,'D1','disponible',500.00),(1457,6,'D2','disponible',500.00),(1458,6,'D3','disponible',500.00),(1459,6,'D4','disponible',500.00),(1460,6,'D5','disponible',500.00),(1461,6,'D6','disponible',500.00),(1462,6,'D7','disponible',500.00),(1463,6,'D8','disponible',500.00),(1464,6,'D9','disponible',500.00),(1465,6,'D10','disponible',500.00),(1466,6,'E1','disponible',500.00),(1467,6,'E2','disponible',500.00),(1468,6,'E3','disponible',500.00),(1469,6,'E4','disponible',500.00),(1470,6,'E5','disponible',500.00),(1471,6,'E6','disponible',500.00),(1472,6,'E7','disponible',500.00),(1473,6,'E8','disponible',500.00),(1474,6,'E9','disponible',500.00),(1475,6,'E10','disponible',500.00),(1476,6,'F1','disponible',500.00),(1477,6,'F2','disponible',500.00),(1478,6,'F3','disponible',500.00),(1479,6,'F4','disponible',500.00),(1480,6,'F5','disponible',500.00),(1481,6,'F6','disponible',500.00),(1482,6,'F7','disponible',500.00),(1483,6,'F8','vendido',500.00),(1484,6,'F9','vendido',500.00),(1485,6,'F10','disponible',500.00),(1486,6,'G1','disponible',500.00),(1487,6,'G2','disponible',500.00),(1488,6,'G3','disponible',500.00),(1489,6,'G4','disponible',500.00),(1490,6,'G5','disponible',500.00),(1491,6,'G6','disponible',500.00),(1492,6,'G7','disponible',500.00),(1493,6,'G8','disponible',500.00),(1494,6,'G9','disponible',500.00),(1495,6,'G10','disponible',500.00),(1496,6,'H1','disponible',500.00),(1497,6,'H2','disponible',500.00),(1498,6,'H3','disponible',500.00),(1499,6,'H4','disponible',500.00),(1500,6,'H5','disponible',500.00),(1501,6,'H6','disponible',500.00),(1502,6,'H7','disponible',500.00),(1503,6,'H8','disponible',500.00),(1504,6,'H9','disponible',500.00),(1505,6,'H10','disponible',500.00),(1506,6,'I1','disponible',500.00),(1507,6,'I2','disponible',500.00),(1508,6,'I3','disponible',500.00),(1509,6,'I4','disponible',500.00),(1510,6,'I5','disponible',500.00),(1511,6,'I6','disponible',500.00),(1512,6,'I7','disponible',500.00),(1513,6,'I8','disponible',500.00),(1514,6,'I9','disponible',500.00),(1515,6,'I10','disponible',500.00),(1516,6,'J1','disponible',500.00),(1517,6,'J2','disponible',500.00),(1518,6,'J3','disponible',500.00),(1519,6,'J4','disponible',500.00),(1520,6,'J5','disponible',500.00),(1521,6,'J6','disponible',500.00),(1522,6,'J7','disponible',500.00),(1523,6,'J8','disponible',500.00),(1524,6,'J9','disponible',500.00),(1525,6,'J10','disponible',500.00),(1526,6,'K1','disponible',500.00),(1527,6,'K2','disponible',500.00),(1528,6,'K3','disponible',500.00),(1529,6,'K4','vendido',500.00),(1530,6,'K5','vendido',500.00),(1531,6,'K6','disponible',500.00),(1532,6,'K7','disponible',500.00),(1533,6,'K8','disponible',500.00),(1534,6,'K9','disponible',500.00),(1535,6,'K10','disponible',500.00),(1536,6,'L1','disponible',500.00),(1537,6,'L2','disponible',500.00),(1538,6,'L3','disponible',500.00),(1539,6,'L4','disponible',500.00),(1540,6,'L5','disponible',500.00),(1541,6,'L6','disponible',500.00),(1542,6,'L7','disponible',500.00),(1543,6,'L8','disponible',500.00),(1544,6,'L9','disponible',500.00),(1545,6,'L10','disponible',500.00),(1546,6,'M1','disponible',500.00),(1547,6,'M2','disponible',500.00),(1548,6,'M3','disponible',500.00),(1549,6,'M4','disponible',500.00),(1550,6,'M5','disponible',500.00),(1551,6,'M6','vendido',500.00),(1552,6,'M7','vendido',500.00),(1553,6,'M8','disponible',500.00),(1554,6,'M9','disponible',500.00),(1555,6,'M10','disponible',500.00),(1556,6,'N1','disponible',500.00),(1557,6,'N2','disponible',500.00),(1558,6,'N3','disponible',500.00),(1559,6,'N4','disponible',500.00),(1560,6,'N5','disponible',500.00),(1561,6,'N6','disponible',500.00),(1562,6,'N7','disponible',500.00),(1563,6,'N8','disponible',500.00),(1564,6,'N9','disponible',500.00),(1565,6,'N10','disponible',500.00),(1566,4,'A1','disponible',500.00),(1567,4,'A2','disponible',500.00),(1568,4,'A3','disponible',500.00),(1569,4,'A4','disponible',500.00),(1570,4,'A5','disponible',500.00),(1571,4,'A6','disponible',500.00),(1572,4,'A7','disponible',500.00),(1573,4,'A8','disponible',500.00),(1574,4,'A9','disponible',500.00),(1575,4,'A10','disponible',500.00),(1576,4,'B1','disponible',500.00),(1577,4,'B2','disponible',500.00),(1578,4,'B3','disponible',500.00),(1579,4,'B4','disponible',500.00),(1580,4,'B5','disponible',500.00),(1581,4,'B6','disponible',500.00),(1582,4,'B7','disponible',500.00),(1583,4,'B8','disponible',500.00),(1584,4,'B9','disponible',500.00),(1585,4,'B10','disponible',500.00),(1586,4,'C1','disponible',500.00),(1587,4,'C2','disponible',500.00),(1588,4,'C3','disponible',500.00),(1589,4,'C4','disponible',500.00),(1590,4,'C5','disponible',500.00),(1591,4,'C6','disponible',500.00),(1592,4,'C7','disponible',500.00),(1593,4,'C8','disponible',500.00),(1594,4,'C9','disponible',500.00),(1595,4,'C10','disponible',500.00),(1596,4,'D1','disponible',500.00),(1597,4,'D2','vendido',500.00),(1598,4,'D3','disponible',500.00),(1599,4,'D4','disponible',500.00),(1600,4,'D5','disponible',500.00),(1601,4,'D6','disponible',500.00),(1602,4,'D7','disponible',500.00),(1603,4,'D8','disponible',500.00),(1604,4,'D9','disponible',500.00),(1605,4,'D10','vendido',500.00),(1606,4,'E1','vendido',500.00),(1607,4,'E2','disponible',500.00),(1608,4,'E3','disponible',500.00),(1609,4,'E4','disponible',500.00),(1610,4,'E5','disponible',500.00),(1611,4,'E6','disponible',500.00),(1612,4,'E7','disponible',500.00),(1613,4,'E8','disponible',500.00),(1614,4,'E9','disponible',500.00),(1615,4,'E10','disponible',500.00),(1616,4,'F1','disponible',500.00),(1617,4,'F2','disponible',500.00),(1618,4,'F3','disponible',500.00),(1619,4,'F4','disponible',500.00),(1620,4,'F5','disponible',500.00),(1621,4,'F6','disponible',500.00),(1622,4,'F7','disponible',500.00),(1623,4,'F8','disponible',500.00),(1624,4,'F9','disponible',500.00),(1625,4,'F10','disponible',500.00),(1626,4,'G1','disponible',500.00),(1627,4,'G2','disponible',500.00),(1628,4,'G3','disponible',500.00),(1629,4,'G4','disponible',500.00),(1630,4,'G5','disponible',500.00),(1631,4,'G6','disponible',500.00),(1632,4,'G7','disponible',500.00),(1633,4,'G8','disponible',500.00),(1634,4,'G9','disponible',500.00),(1635,4,'G10','disponible',500.00),(1636,4,'H1','disponible',500.00),(1637,4,'H2','disponible',500.00),(1638,4,'H3','disponible',500.00),(1639,4,'H4','disponible',500.00),(1640,4,'H5','disponible',500.00),(1641,4,'H6','disponible',500.00),(1642,4,'H7','disponible',500.00),(1643,4,'H8','disponible',500.00),(1644,4,'H9','disponible',500.00),(1645,4,'H10','vendido',500.00),(1646,4,'I1','disponible',500.00),(1647,4,'I2','disponible',500.00),(1648,4,'I3','disponible',500.00),(1649,4,'I4','disponible',500.00),(1650,4,'I5','disponible',500.00),(1651,4,'I6','disponible',500.00),(1652,4,'I7','disponible',500.00),(1653,4,'I8','disponible',500.00),(1654,4,'I9','disponible',500.00),(1655,4,'I10','disponible',500.00),(1656,4,'J1','disponible',500.00),(1657,4,'J2','disponible',500.00),(1658,4,'J3','disponible',500.00),(1659,4,'J4','disponible',500.00),(1660,4,'J5','disponible',500.00),(1661,4,'J6','disponible',500.00),(1662,4,'J7','disponible',500.00),(1663,4,'J8','disponible',500.00),(1664,4,'J9','disponible',500.00),(1665,4,'J10','disponible',500.00),(1666,3,'A1','disponible',500.00),(1667,3,'A2','disponible',500.00),(1668,3,'A3','disponible',500.00),(1669,3,'A4','disponible',500.00),(1670,3,'A5','disponible',500.00),(1671,3,'A6','disponible',500.00),(1672,3,'A7','disponible',500.00),(1673,3,'A8','disponible',500.00),(1674,3,'A9','disponible',500.00),(1675,3,'A10','disponible',500.00),(1676,3,'B1','disponible',500.00),(1677,3,'B2','disponible',500.00),(1678,3,'B3','disponible',500.00),(1679,3,'B4','disponible',500.00),(1680,3,'B5','disponible',500.00),(1681,3,'B6','disponible',500.00),(1682,3,'B7','disponible',500.00),(1683,3,'B8','disponible',500.00),(1684,3,'B9','disponible',500.00),(1685,3,'B10','disponible',500.00),(1686,3,'C1','disponible',500.00),(1687,3,'C2','disponible',500.00),(1688,3,'C3','disponible',500.00),(1689,3,'C4','disponible',500.00),(1690,3,'C5','disponible',500.00),(1691,3,'C6','disponible',500.00),(1692,3,'C7','disponible',500.00),(1693,3,'C8','disponible',500.00),(1694,3,'C9','disponible',500.00),(1695,3,'C10','disponible',500.00),(1696,3,'D1','disponible',500.00),(1697,3,'D2','disponible',500.00),(1698,3,'D3','disponible',500.00),(1699,3,'D4','disponible',500.00),(1700,3,'D5','disponible',500.00),(1701,3,'D6','disponible',500.00),(1702,3,'D7','disponible',500.00),(1703,3,'D8','disponible',500.00),(1704,3,'D9','disponible',500.00),(1705,3,'D10','disponible',500.00),(1706,3,'E1','disponible',500.00),(1707,3,'E2','disponible',500.00),(1708,3,'E3','disponible',500.00),(1709,3,'E4','disponible',500.00),(1710,3,'E5','disponible',500.00),(1711,3,'E6','disponible',500.00),(1712,3,'E7','disponible',500.00),(1713,3,'E8','disponible',500.00),(1714,3,'E9','disponible',500.00),(1715,3,'E10','disponible',500.00),(1716,3,'F1','disponible',500.00),(1717,3,'F2','disponible',500.00),(1718,3,'F3','disponible',500.00),(1719,3,'F4','disponible',500.00),(1720,3,'F5','disponible',500.00),(1721,3,'F6','disponible',500.00),(1722,3,'F7','disponible',500.00),(1723,3,'F8','disponible',500.00),(1724,3,'F9','disponible',500.00),(1725,3,'F10','disponible',500.00),(1726,3,'G1','disponible',500.00),(1727,3,'G2','disponible',500.00),(1728,3,'G3','disponible',500.00),(1729,3,'G4','disponible',500.00),(1730,3,'G5','disponible',500.00),(1731,3,'G6','disponible',500.00),(1732,3,'G7','disponible',500.00),(1733,3,'G8','disponible',500.00),(1734,3,'G9','disponible',500.00),(1735,3,'G10','disponible',500.00),(1736,3,'H1','disponible',500.00),(1737,3,'H2','disponible',500.00),(1738,3,'H3','disponible',500.00),(1739,3,'H4','disponible',500.00),(1740,3,'H5','disponible',500.00),(1741,3,'H6','disponible',500.00),(1742,3,'H7','disponible',500.00),(1743,3,'H8','disponible',500.00),(1744,3,'H9','disponible',500.00),(1745,3,'H10','disponible',500.00),(1746,3,'I1','disponible',500.00),(1747,3,'I2','disponible',500.00),(1748,3,'I3','disponible',500.00),(1749,3,'I4','disponible',500.00),(1750,3,'I5','disponible',500.00),(1751,3,'I6','disponible',500.00),(1752,3,'I7','disponible',500.00),(1753,3,'I8','disponible',500.00),(1754,3,'I9','disponible',500.00),(1755,3,'I10','disponible',500.00),(1756,3,'J1','disponible',500.00),(1757,3,'J2','disponible',500.00),(1758,3,'J3','disponible',500.00),(1759,3,'J4','disponible',500.00),(1760,3,'J5','disponible',500.00),(1761,3,'J6','disponible',500.00),(1762,3,'J7','disponible',500.00),(1763,3,'J8','disponible',500.00),(1764,3,'J9','disponible',500.00),(1765,3,'J10','disponible',500.00),(1766,3,'K1','disponible',500.00),(1767,3,'K2','disponible',500.00),(1768,3,'K3','disponible',500.00),(1769,3,'K4','disponible',500.00),(1770,3,'K5','disponible',500.00),(1771,3,'K6','disponible',500.00),(1772,3,'K7','disponible',500.00),(1773,3,'K8','disponible',500.00),(1774,3,'K9','disponible',500.00),(1775,3,'K10','disponible',500.00),(1776,3,'L1','disponible',500.00),(1777,3,'L2','disponible',500.00),(1778,3,'L3','disponible',500.00),(1779,3,'L4','disponible',500.00),(1780,3,'L5','disponible',500.00),(1781,3,'L6','disponible',500.00),(1782,3,'L7','disponible',500.00),(1783,3,'L8','disponible',500.00),(1784,3,'L9','disponible',500.00),(1785,3,'L10','disponible',500.00),(1786,3,'M1','disponible',500.00),(1787,3,'M2','disponible',500.00),(1788,3,'M3','disponible',500.00),(1789,3,'M4','disponible',500.00),(1790,3,'M5','disponible',500.00),(1791,3,'M6','disponible',500.00),(1792,3,'M7','disponible',500.00),(1793,3,'M8','disponible',500.00),(1794,3,'M9','disponible',500.00),(1795,3,'M10','disponible',500.00),(1796,3,'N1','disponible',500.00),(1797,3,'N2','disponible',500.00),(1798,3,'N3','disponible',500.00),(1799,3,'N4','disponible',500.00),(1800,3,'N5','disponible',500.00),(1801,3,'N6','disponible',500.00),(1802,3,'N7','disponible',500.00),(1803,3,'N8','disponible',500.00),(1804,3,'N9','disponible',500.00),(1805,3,'N10','disponible',500.00),(1806,3,'O1','disponible',500.00),(1807,3,'O2','disponible',500.00),(1808,3,'O3','disponible',500.00),(1809,3,'O4','disponible',500.00),(1810,3,'O5','disponible',500.00),(1811,3,'O6','disponible',500.00),(1812,3,'O7','disponible',500.00),(1813,3,'O8','disponible',500.00),(1814,3,'O9','disponible',500.00),(1815,3,'O10','disponible',500.00),(1816,3,'P1','disponible',500.00),(1817,3,'P2','disponible',500.00),(1818,3,'P3','disponible',500.00),(1819,3,'P4','disponible',500.00),(1820,3,'P5','disponible',500.00),(1821,3,'P6','disponible',500.00),(1822,3,'P7','disponible',500.00),(1823,3,'P8','disponible',500.00),(1824,3,'P9','disponible',500.00),(1825,3,'P10','disponible',500.00),(1826,3,'Q1','disponible',500.00),(1827,3,'Q2','disponible',500.00),(1828,3,'Q3','disponible',500.00),(1829,3,'Q4','disponible',500.00),(1830,3,'Q5','disponible',500.00),(1831,3,'Q6','disponible',500.00),(1832,3,'Q7','disponible',500.00),(1833,3,'Q8','disponible',500.00),(1834,3,'Q9','disponible',500.00),(1835,3,'Q10','disponible',500.00),(1836,3,'R1','disponible',500.00),(1837,3,'R2','disponible',500.00),(1838,3,'R3','disponible',500.00),(1839,3,'R4','disponible',500.00),(1840,3,'R5','disponible',500.00),(1841,3,'R6','disponible',500.00),(1842,3,'R7','disponible',500.00),(1843,3,'R8','disponible',500.00),(1844,3,'R9','disponible',500.00),(1845,3,'R10','disponible',500.00),(1846,1,'A1','disponible',500.00),(1847,1,'A2','disponible',500.00),(1848,1,'A3','disponible',500.00),(1849,1,'A4','disponible',500.00),(1850,1,'A5','disponible',500.00),(1851,1,'A6','disponible',500.00),(1852,1,'A7','disponible',500.00),(1853,1,'A8','vendido',500.00),(1854,1,'A9','disponible',500.00),(1855,1,'A10','disponible',500.00),(1856,1,'B1','disponible',500.00),(1857,1,'B2','disponible',500.00),(1858,1,'B3','disponible',500.00),(1859,1,'B4','disponible',500.00),(1860,1,'B5','disponible',500.00),(1861,1,'B6','disponible',500.00),(1862,1,'B7','disponible',500.00),(1863,1,'B8','disponible',500.00),(1864,1,'B9','disponible',500.00),(1865,1,'B10','disponible',500.00),(1866,1,'C1','disponible',500.00),(1867,1,'C2','disponible',500.00),(1868,1,'C3','disponible',500.00),(1869,1,'C4','disponible',500.00),(1870,1,'C5','disponible',500.00),(1871,1,'C6','disponible',500.00),(1872,1,'C7','disponible',500.00),(1873,1,'C8','disponible',500.00),(1874,1,'C9','disponible',500.00),(1875,1,'C10','disponible',500.00),(1876,1,'D1','disponible',500.00),(1877,1,'D2','disponible',500.00),(1878,1,'D3','vendido',500.00),(1879,1,'D4','disponible',500.00),(1880,1,'D5','disponible',500.00),(1881,1,'D6','disponible',500.00),(1882,1,'D7','disponible',500.00),(1883,1,'D8','disponible',500.00),(1884,1,'D9','disponible',500.00),(1885,1,'D10','disponible',500.00),(1886,1,'E1','disponible',500.00),(1887,1,'E2','disponible',500.00),(1888,1,'E3','disponible',500.00),(1889,1,'E4','disponible',500.00),(1890,1,'E5','disponible',500.00),(1891,1,'E6','disponible',500.00),(1892,1,'E7','disponible',500.00),(1893,1,'E8','disponible',500.00),(1894,1,'E9','disponible',500.00),(1895,1,'E10','disponible',500.00),(1896,1,'F1','disponible',500.00),(1897,1,'F2','disponible',500.00),(1898,1,'F3','disponible',500.00),(1899,1,'F4','disponible',500.00),(1900,1,'F5','disponible',500.00),(1901,1,'F6','disponible',500.00),(1902,1,'F7','disponible',500.00),(1903,1,'F8','disponible',500.00),(1904,1,'F9','disponible',500.00),(1905,1,'F10','disponible',500.00),(1906,1,'G1','disponible',500.00),(1907,1,'G2','disponible',500.00),(1908,1,'G3','disponible',500.00),(1909,1,'G4','disponible',500.00),(1910,1,'G5','disponible',500.00),(1911,1,'G6','disponible',500.00),(1912,1,'G7','disponible',500.00),(1913,1,'G8','disponible',500.00),(1914,1,'G9','disponible',500.00),(1915,1,'G10','disponible',500.00),(1916,1,'H1','disponible',500.00),(1917,1,'H2','disponible',500.00),(1918,1,'H3','disponible',500.00),(1919,1,'H4','disponible',500.00),(1920,1,'H5','disponible',500.00),(1921,1,'H6','disponible',500.00),(1922,1,'H7','disponible',500.00),(1923,1,'H8','disponible',500.00),(1924,1,'H9','disponible',500.00),(1925,1,'H10','disponible',500.00),(1926,1,'I1','disponible',500.00),(1927,1,'I2','disponible',500.00),(1928,1,'I3','disponible',500.00),(1929,1,'I4','disponible',500.00),(1930,1,'I5','disponible',500.00),(1931,1,'I6','disponible',500.00),(1932,1,'I7','disponible',500.00),(1933,1,'I8','disponible',500.00),(1934,1,'I9','disponible',500.00),(1935,1,'I10','disponible',500.00),(1936,1,'J1','disponible',500.00),(1937,1,'J2','disponible',500.00),(1938,1,'J3','disponible',500.00),(1939,1,'J4','disponible',500.00),(1940,1,'J5','disponible',500.00),(1941,1,'J6','disponible',500.00),(1942,1,'J7','disponible',500.00),(1943,1,'J8','disponible',500.00),(1944,1,'J9','disponible',500.00),(1945,1,'J10','disponible',500.00),(1946,1,'K1','disponible',500.00),(1947,1,'K2','disponible',500.00),(1948,1,'K3','disponible',500.00),(1949,1,'K4','disponible',500.00),(1950,1,'K5','disponible',500.00),(1951,1,'K6','disponible',500.00),(1952,1,'K7','disponible',500.00),(1953,1,'K8','disponible',500.00),(1954,1,'K9','disponible',500.00),(1955,1,'K10','disponible',500.00),(1956,1,'L1','disponible',500.00),(1957,1,'L2','disponible',500.00),(1958,1,'L3','disponible',500.00),(1959,1,'L4','disponible',500.00),(1960,1,'L5','disponible',500.00),(1961,1,'L6','disponible',500.00),(1962,1,'L7','disponible',500.00),(1963,1,'L8','disponible',500.00),(1964,1,'L9','disponible',500.00),(1965,1,'L10','disponible',500.00),(1966,1,'M1','disponible',500.00),(1967,1,'M2','disponible',500.00),(1968,1,'M3','disponible',500.00),(1969,1,'M4','disponible',500.00),(1970,1,'M5','disponible',500.00),(1971,1,'M6','disponible',500.00),(1972,1,'M7','disponible',500.00),(1973,1,'M8','disponible',500.00),(1974,1,'M9','disponible',500.00),(1975,1,'M10','disponible',500.00),(1976,1,'N1','vendido',500.00),(1977,1,'N2','disponible',500.00),(1978,1,'N3','disponible',500.00),(1979,1,'N4','disponible',500.00),(1980,1,'N5','disponible',500.00),(1981,1,'N6','disponible',500.00),(1982,1,'N7','disponible',500.00),(1983,1,'N8','disponible',500.00),(1984,1,'N9','disponible',500.00),(1985,1,'N10','disponible',500.00),(1986,1,'O1','disponible',500.00),(1987,1,'O2','disponible',500.00),(1988,1,'O3','disponible',500.00),(1989,1,'O4','disponible',500.00),(1990,1,'O5','disponible',500.00),(1991,1,'O6','disponible',500.00),(1992,1,'O7','disponible',500.00),(1993,1,'O8','disponible',500.00),(1994,1,'O9','disponible',500.00),(1995,1,'O10','disponible',500.00),(1996,1,'P1','disponible',500.00),(1997,1,'P2','disponible',500.00),(1998,1,'P3','disponible',500.00),(1999,1,'P4','disponible',500.00),(2000,1,'P5','disponible',500.00),(2001,1,'P6','disponible',500.00),(2002,1,'P7','disponible',500.00),(2003,1,'P8','disponible',500.00),(2004,1,'P9','disponible',500.00),(2005,1,'P10','disponible',500.00),(2006,1,'Q1','disponible',500.00),(2007,1,'Q2','disponible',500.00),(2008,1,'Q3','disponible',500.00),(2009,1,'Q4','disponible',500.00),(2010,1,'Q5','disponible',500.00),(2011,1,'Q6','disponible',500.00),(2012,1,'Q7','disponible',500.00),(2013,1,'Q8','disponible',500.00),(2014,1,'Q9','disponible',500.00),(2015,1,'Q10','disponible',500.00),(2016,1,'R1','disponible',500.00),(2017,1,'R2','disponible',500.00),(2018,1,'R3','disponible',500.00),(2019,1,'R4','disponible',500.00),(2020,1,'R5','disponible',500.00),(2021,1,'R6','disponible',500.00),(2022,1,'R7','disponible',500.00),(2023,1,'R8','disponible',500.00),(2024,1,'R9','disponible',500.00),(2025,1,'R10','disponible',500.00),(2026,1,'S1','disponible',500.00),(2027,1,'S2','disponible',500.00),(2028,1,'S3','disponible',500.00),(2029,1,'S4','disponible',500.00),(2030,1,'S5','disponible',500.00),(2031,1,'S6','disponible',500.00),(2032,1,'S7','disponible',500.00),(2033,1,'S8','disponible',500.00),(2034,1,'S9','disponible',500.00),(2035,1,'S10','disponible',500.00),(2036,1,'T1','disponible',500.00),(2037,1,'T2','disponible',500.00),(2038,1,'T3','disponible',500.00),(2039,1,'T4','disponible',500.00),(2040,1,'T5','disponible',500.00),(2041,1,'T6','disponible',500.00),(2042,1,'T7','disponible',500.00),(2043,1,'T8','disponible',500.00),(2044,1,'T9','disponible',500.00),(2045,1,'T10','disponible',500.00),(2046,2,'A1','disponible',500.00),(2047,2,'A2','disponible',500.00),(2048,2,'A3','disponible',500.00),(2049,2,'A4','disponible',500.00),(2050,2,'A5','disponible',500.00),(2051,2,'A6','disponible',500.00),(2052,2,'A7','disponible',500.00),(2053,2,'A8','disponible',500.00),(2054,2,'A9','disponible',500.00),(2055,2,'A10','disponible',500.00),(2056,2,'B1','disponible',500.00),(2057,2,'B2','disponible',500.00),(2058,2,'B3','disponible',500.00),(2059,2,'B4','disponible',500.00),(2060,2,'B5','disponible',500.00),(2061,2,'B6','disponible',500.00),(2062,2,'B7','disponible',500.00),(2063,2,'B8','disponible',500.00),(2064,2,'B9','disponible',500.00),(2065,2,'B10','disponible',500.00),(2066,2,'C1','disponible',500.00),(2067,2,'C2','disponible',500.00),(2068,2,'C3','disponible',500.00),(2069,2,'C4','disponible',500.00),(2070,2,'C5','disponible',500.00),(2071,2,'C6','disponible',500.00),(2072,2,'C7','disponible',500.00),(2073,2,'C8','disponible',500.00),(2074,2,'C9','disponible',500.00),(2075,2,'C10','disponible',500.00),(2076,2,'D1','disponible',500.00),(2077,2,'D2','disponible',500.00),(2078,2,'D3','disponible',500.00),(2079,2,'D4','disponible',500.00),(2080,2,'D5','disponible',500.00),(2081,2,'D6','disponible',500.00),(2082,2,'D7','disponible',500.00),(2083,2,'D8','disponible',500.00),(2084,2,'D9','disponible',500.00),(2085,2,'D10','disponible',500.00),(2086,2,'E1','disponible',500.00),(2087,2,'E2','disponible',500.00),(2088,2,'E3','disponible',500.00),(2089,2,'E4','disponible',500.00),(2090,2,'E5','disponible',500.00),(2091,2,'E6','disponible',500.00),(2092,2,'E7','disponible',500.00),(2093,2,'E8','disponible',500.00),(2094,2,'E9','disponible',500.00),(2095,2,'E10','disponible',500.00),(2096,2,'F1','disponible',500.00),(2097,2,'F2','disponible',500.00),(2098,2,'F3','disponible',500.00),(2099,2,'F4','disponible',500.00),(2100,2,'F5','disponible',500.00),(2101,2,'F6','disponible',500.00),(2102,2,'F7','disponible',500.00),(2103,2,'F8','disponible',500.00),(2104,2,'F9','disponible',500.00),(2105,2,'F10','disponible',500.00),(2106,2,'G1','disponible',500.00),(2107,2,'G2','disponible',500.00),(2108,2,'G3','disponible',500.00),(2109,2,'G4','disponible',500.00),(2110,2,'G5','disponible',500.00),(2111,2,'G6','disponible',500.00),(2112,2,'G7','disponible',500.00),(2113,2,'G8','disponible',500.00),(2114,2,'G9','disponible',500.00),(2115,2,'G10','disponible',500.00),(2116,2,'H1','disponible',500.00),(2117,2,'H2','disponible',500.00),(2118,2,'H3','disponible',500.00),(2119,2,'H4','disponible',500.00),(2120,2,'H5','disponible',500.00),(2121,2,'H6','disponible',500.00),(2122,2,'H7','disponible',500.00),(2123,2,'H8','disponible',500.00),(2124,2,'H9','disponible',500.00),(2125,2,'H10','disponible',500.00),(2126,2,'I1','disponible',500.00),(2127,2,'I2','disponible',500.00),(2128,2,'I3','disponible',500.00),(2129,2,'I4','disponible',500.00),(2130,2,'I5','disponible',500.00),(2131,2,'I6','disponible',500.00),(2132,2,'I7','disponible',500.00),(2133,2,'I8','disponible',500.00),(2134,2,'I9','disponible',500.00),(2135,2,'I10','disponible',500.00),(2136,2,'J1','disponible',500.00),(2137,2,'J2','disponible',500.00),(2138,2,'J3','disponible',500.00),(2139,2,'J4','disponible',500.00),(2140,2,'J5','disponible',500.00),(2141,2,'J6','disponible',500.00),(2142,2,'J7','disponible',500.00),(2143,2,'J8','disponible',500.00),(2144,2,'J9','disponible',500.00),(2145,2,'J10','disponible',500.00),(2146,2,'K1','disponible',500.00),(2147,2,'K2','disponible',500.00),(2148,2,'K3','disponible',500.00),(2149,2,'K4','disponible',500.00),(2150,2,'K5','disponible',500.00),(2151,2,'K6','disponible',500.00),(2152,2,'K7','disponible',500.00),(2153,2,'K8','disponible',500.00),(2154,2,'K9','disponible',500.00),(2155,2,'K10','disponible',500.00),(2156,2,'L1','disponible',500.00),(2157,2,'L2','disponible',500.00),(2158,2,'L3','disponible',500.00),(2159,2,'L4','disponible',500.00),(2160,2,'L5','disponible',500.00),(2161,2,'L6','disponible',500.00),(2162,2,'L7','disponible',500.00),(2163,2,'L8','disponible',500.00),(2164,2,'L9','disponible',500.00),(2165,2,'L10','disponible',500.00),(2166,2,'M1','disponible',500.00),(2167,2,'M2','disponible',500.00),(2168,2,'M3','disponible',500.00),(2169,2,'M4','disponible',500.00),(2170,2,'M5','disponible',500.00); +/*!40000 ALTER TABLE `asientos` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:51:00 diff --git a/BD/ticketcompany_db_conciertos.sql b/BD/ticketcompany_db_conciertos.sql new file mode 100644 index 0000000..f607468 --- /dev/null +++ b/BD/ticketcompany_db_conciertos.sql @@ -0,0 +1,59 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `conciertos` +-- + +DROP TABLE IF EXISTS `conciertos`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `conciertos` ( + `id` int NOT NULL AUTO_INCREMENT, + `artista` varchar(100) NOT NULL, + `fecha` datetime NOT NULL, + `descripcion` text, + `imagen` varchar(255) DEFAULT NULL, + `cupos_ocupados` int NOT NULL DEFAULT '0', + `lugar_id` int DEFAULT NULL, + `precio` decimal(10,2) NOT NULL DEFAULT '500.00', + PRIMARY KEY (`id`), + KEY `lugar_id` (`lugar_id`), + CONSTRAINT `conciertos_ibfk_1` FOREIGN KEY (`lugar_id`) REFERENCES `lugares` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `conciertos` +-- + +LOCK TABLES `conciertos` WRITE; +/*!40000 ALTER TABLE `conciertos` DISABLE KEYS */; +INSERT INTO `conciertos` VALUES (8,'Junior H','2025-03-14 23:30:00','$adBoyz Tour Fei',NULL,0,2,950.00),(9,'Tributo a Soda Stereo','2025-03-15 22:41:00','Tributo a Soda Stereo','img/eventos/evento_67ce6db6571257.43010380.jpeg',0,1,400.00),(10,'Bad Bunny','2025-03-31 07:12:00','hola','img/eventos/evento_67cee54aeaa1a0.27290983.png',0,6,1499.98),(11,'Coldplay','2025-03-29 07:35:00','Coldplay en Xalapa','',0,4,299.99),(12,'Mora','2025-03-26 22:00:00','mora en xalapa','',0,3,1500.00),(13,'PRUEBA CAPACIDAD','2025-03-29 22:04:00','hola','img/eventos/evento_67d107d18f9a33.58561139.jpg',0,1,699.00),(14,'ASDASDASD','2025-03-21 22:08:00','evento de ´prueba','',0,2,2000.00); +/*!40000 ALTER TABLE `conciertos` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:51:00 diff --git a/BD/ticketcompany_db_historial_eventos.sql b/BD/ticketcompany_db_historial_eventos.sql new file mode 100644 index 0000000..1dd9e2d --- /dev/null +++ b/BD/ticketcompany_db_historial_eventos.sql @@ -0,0 +1,56 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `historial_eventos` +-- + +DROP TABLE IF EXISTS `historial_eventos`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `historial_eventos` ( + `id` int NOT NULL, + `artista` varchar(255) DEFAULT NULL, + `fecha` datetime DEFAULT NULL, + `lugar_id` int DEFAULT NULL, + `precio` decimal(10,2) DEFAULT NULL, + `descripcion` text, + `imagen` varchar(255) DEFAULT NULL, + `fecha_movido` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `historial_eventos` +-- + +LOCK TABLES `historial_eventos` WRITE; +/*!40000 ALTER TABLE `historial_eventos` DISABLE KEYS */; +/*!40000 ALTER TABLE `historial_eventos` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:50:59 diff --git a/BD/ticketcompany_db_lugares.sql b/BD/ticketcompany_db_lugares.sql new file mode 100644 index 0000000..63b9815 --- /dev/null +++ b/BD/ticketcompany_db_lugares.sql @@ -0,0 +1,52 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `lugares` +-- + +DROP TABLE IF EXISTS `lugares`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `lugares` ( + `id` int NOT NULL AUTO_INCREMENT, + `nombre` varchar(100) NOT NULL, + `capacidad` int NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lugares` +-- + +LOCK TABLES `lugares` WRITE; +/*!40000 ALTER TABLE `lugares` DISABLE KEYS */; +INSERT INTO `lugares` VALUES (1,'Teatro del Estado',200),(2,'Auditorio Fei',125),(3,'Velódromo Internacional Xalapa',180),(4,'Tlaqná',100),(5,'Nido del Halcón ',95),(6,'Auditorio de la Normal Veracruzana',140); +/*!40000 ALTER TABLE `lugares` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:50:59 diff --git a/BD/ticketcompany_db_vendedores.sql b/BD/ticketcompany_db_vendedores.sql new file mode 100644 index 0000000..baaf5d5 --- /dev/null +++ b/BD/ticketcompany_db_vendedores.sql @@ -0,0 +1,54 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `vendedores` +-- + +DROP TABLE IF EXISTS `vendedores`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `vendedores` ( + `id` int NOT NULL AUTO_INCREMENT, + `nombre` varchar(100) NOT NULL, + `email` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email` (`email`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `vendedores` +-- + +LOCK TABLES `vendedores` WRITE; +/*!40000 ALTER TABLE `vendedores` DISABLE KEYS */; +INSERT INTO `vendedores` VALUES (1,'Alexander Diaz','alex@gmail.com','123'),(2,'Angel','angel@gmail.com','123456'); +/*!40000 ALTER TABLE `vendedores` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:50:59 diff --git a/BD/ticketcompany_db_venta_detalle.sql b/BD/ticketcompany_db_venta_detalle.sql new file mode 100644 index 0000000..4cd4bd2 --- /dev/null +++ b/BD/ticketcompany_db_venta_detalle.sql @@ -0,0 +1,56 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `venta_detalle` +-- + +DROP TABLE IF EXISTS `venta_detalle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `venta_detalle` ( + `id` int NOT NULL AUTO_INCREMENT, + `venta_id` int NOT NULL, + `asiento_id` int NOT NULL, + `precio` decimal(8,2) NOT NULL, + PRIMARY KEY (`id`), + KEY `venta_id` (`venta_id`), + KEY `asiento_id` (`asiento_id`), + CONSTRAINT `venta_detalle_ibfk_1` FOREIGN KEY (`venta_id`) REFERENCES `ventas` (`id`), + CONSTRAINT `venta_detalle_ibfk_2` FOREIGN KEY (`asiento_id`) REFERENCES `asientos` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `venta_detalle` +-- + +LOCK TABLES `venta_detalle` WRITE; +/*!40000 ALTER TABLE `venta_detalle` DISABLE KEYS */; +/*!40000 ALTER TABLE `venta_detalle` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:50:59 diff --git a/BD/ticketcompany_db_ventas.sql b/BD/ticketcompany_db_ventas.sql new file mode 100644 index 0000000..865f754 --- /dev/null +++ b/BD/ticketcompany_db_ventas.sql @@ -0,0 +1,60 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `ventas` +-- + +DROP TABLE IF EXISTS `ventas`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `ventas` ( + `id` int NOT NULL AUTO_INCREMENT, + `evento_id` int NOT NULL, + `cantidad` int NOT NULL, + `vendedor_id` int DEFAULT NULL, + `fecha` datetime DEFAULT CURRENT_TIMESTAMP, + `total` decimal(10,2) DEFAULT NULL, + `fecha_venta` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `vendedor_id` (`vendedor_id`), + KEY `fk_evento` (`evento_id`), + CONSTRAINT `fk_evento` FOREIGN KEY (`evento_id`) REFERENCES `conciertos` (`id`) ON DELETE CASCADE, + CONSTRAINT `ventas_ibfk_1` FOREIGN KEY (`vendedor_id`) REFERENCES `vendedores` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ventas` +-- + +LOCK TABLES `ventas` WRITE; +/*!40000 ALTER TABLE `ventas` DISABLE KEYS */; +INSERT INTO `ventas` VALUES (70,8,1,NULL,'2025-03-09 16:42:34',950.00,'2025-03-09 16:42:34'),(71,8,1,NULL,'2025-03-09 21:11:49',950.00,'2025-03-09 21:11:49'),(72,8,2,NULL,'2025-03-09 21:36:46',1900.00,'2025-03-09 21:36:46'),(73,8,4,NULL,'2025-03-09 22:00:24',3800.00,'2025-03-09 22:00:24'),(74,8,6,NULL,'2025-03-09 22:16:01',5700.00,'2025-03-09 22:16:01'),(75,8,1,NULL,'2025-03-09 22:18:25',950.00,'2025-03-09 22:18:25'),(76,8,1,NULL,'2025-03-09 22:21:27',950.00,'2025-03-09 22:21:27'),(77,8,3,NULL,'2025-03-09 22:23:08',2850.00,'2025-03-09 22:23:08'),(78,8,1,NULL,'2025-03-09 22:29:52',950.00,'2025-03-09 22:29:52'),(79,8,2,NULL,'2025-03-09 23:04:06',1900.00,'2025-03-09 23:04:06'),(80,10,6,NULL,'2025-03-10 07:14:03',8999.88,'2025-03-10 07:14:03'),(81,11,4,NULL,'2025-03-10 07:38:47',1199.96,'2025-03-10 07:38:47'),(82,8,2,NULL,'2025-03-10 08:38:02',1900.00,'2025-03-10 08:38:02'),(83,13,3,NULL,'2025-03-11 22:05:59',2097.00,'2025-03-11 22:05:59'); +/*!40000 ALTER TABLE `ventas` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:51:00 diff --git a/BD/ticketcompany_db_ventas_asientos.sql b/BD/ticketcompany_db_ventas_asientos.sql new file mode 100644 index 0000000..8641b53 --- /dev/null +++ b/BD/ticketcompany_db_ventas_asientos.sql @@ -0,0 +1,57 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: ticketcompany_db +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `ventas_asientos` +-- + +DROP TABLE IF EXISTS `ventas_asientos`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `ventas_asientos` ( + `id` int NOT NULL AUTO_INCREMENT, + `venta_id` int NOT NULL, + `asiento_id` int NOT NULL, + `precio` decimal(10,2) NOT NULL DEFAULT '0.00', + PRIMARY KEY (`id`), + KEY `venta_id` (`venta_id`), + KEY `asiento_id` (`asiento_id`), + CONSTRAINT `ventas_asientos_ibfk_1` FOREIGN KEY (`venta_id`) REFERENCES `ventas` (`id`) ON DELETE CASCADE, + CONSTRAINT `ventas_asientos_ibfk_2` FOREIGN KEY (`asiento_id`) REFERENCES `asientos` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ventas_asientos` +-- + +LOCK TABLES `ventas_asientos` WRITE; +/*!40000 ALTER TABLE `ventas_asientos` DISABLE KEYS */; +INSERT INTO `ventas_asientos` VALUES (8,74,1165,0.00),(9,74,1166,0.00),(10,74,1167,0.00),(11,74,1168,0.00),(12,74,1169,0.00),(13,74,1170,0.00),(14,75,1155,0.00),(15,76,1197,0.00),(16,77,1174,0.00),(17,77,1175,0.00),(18,77,1176,0.00),(19,78,1224,950.00),(20,79,1123,950.00),(21,79,1124,950.00),(22,80,1483,1499.98),(23,80,1484,1499.98),(24,80,1529,1499.98),(25,80,1530,1499.98),(26,80,1551,1499.98),(27,80,1552,1499.98),(28,81,1597,299.99),(29,81,1605,299.99),(30,81,1606,299.99),(31,81,1645,299.99),(32,82,1158,950.00),(33,82,1159,950.00),(34,83,1233,699.00),(35,83,1258,699.00),(36,83,1356,699.00); +/*!40000 ALTER TABLE `ventas_asientos` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-03-12 20:50:59 diff --git a/comprar-boletos.html b/comprar-boletos.html new file mode 100644 index 0000000..2cbf308 --- /dev/null +++ b/comprar-boletos.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="es"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Comprar Boletos</title> + <link rel="stylesheet" href="css/comprar-boletos.css"> + <style> + /* Estilo para alinear los botones */ + .botones-container { + display: flex; + gap: 10px; /* Espacio entre los botones */ + margin-top: 20px; + } + </style> +</head> +<body> + <h1 id="titulo">Comprar Boletos</h1> + <div id="eventoInfo"> + <p id="fecha"></p> + <p id="lugar"></p> + <p><strong>Precio por boleto:</strong> <span id="precioBoleto">Cargando...</span></p> + </div> + + <h2>Selecciona tus boletos</h2> + <form id="formCompra" action="controladores/procesar-compra.php" method="POST"> + <input type="hidden" id="evento_id" name="evento_id"> + + <h3>Cantidad de boletos:</h3> + <label for="cantidad">Selecciona la cantidad:</label> + <input type="number" id="cantidad" name="cantidad" min="1" required> + + <h2>Selecciona tus asientos</h2> + <div id="mapa-asientos"></div> + + <div class="botones-container"> + <!-- Botón para confirmar compra --> + <button type="button" id="comprarBoletos">Confirmar Compra</button> + <!-- Botón para regresar --> + <a href="inicio.html"> + <button type="button" class="regresar-btn">Regresar</button> + </a> + </div> + </form> + + <script src="js/comprar-boleto.js"></script> +</body> +</html> diff --git a/comprobante.html b/comprobante.html new file mode 100644 index 0000000..d268819 --- /dev/null +++ b/comprobante.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html lang="es"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Comprobante de Compra</title> + <link rel="stylesheet" href="css/comprobante.css"> +</head> +<body> + <h1>Comprobante de Compra</h1> + <div id="comprobanteInfo"> + <h2 id="evento"></h2> + <p id="fecha"></p> + <p id="lugar"></p> + <p id="cantidad"></p> + <p id="precio"></p> + <p id="total"></p> + <h3>Asientos seleccionados:</h3> + <ul id="asientos"></ul> + </div> + <h3>¡Gracias por tu compra!</h3> + <p>Esperamos que disfrutes del evento.</p> + + <button onclick="window.print();">Imprimir Comprobante</button> + <a href="inicio.html"> + <button type="button">Salir</button> + </a> + <script src="js/comprobante.js"></script> +</body> +</html> diff --git a/controladores/cargar-evento.php b/controladores/cargar-evento.php new file mode 100644 index 0000000..6b77bba --- /dev/null +++ b/controladores/cargar-evento.php @@ -0,0 +1,65 @@ +<?php +header("Content-Type: text/html"); +require_once "conexion-bd.php"; + +if ($_SERVER['REQUEST_METHOD'] !== 'GET') { + http_response_code(405); + echo "Método no permitido"; + exit(); +} + +// 🔸 Mover eventos pasados a historial_eventos +$sql_mover = "INSERT INTO historial_eventos (id, artista, fecha, lugar_id, precio, descripcion, imagen) + SELECT id, artista, fecha, lugar_id, precio, descripcion, imagen + FROM conciertos + WHERE fecha < NOW()"; + +if (!$conn->query($sql_mover)) { + error_log("Error al mover eventos pasados: " . $conn->error); +} + +// 🔸 Eliminar eventos ya movidos de la tabla conciertos +$sql_eliminar = "DELETE FROM conciertos WHERE fecha < NOW()"; +if (!$conn->query($sql_eliminar)) { + error_log("Error al eliminar eventos pasados: " . $conn->error); +} + +// 🔹 Continuar con la lógica de consulta y presentación de eventos actuales +$sql = "SELECT c.id, c.artista, c.fecha, c.imagen, c.descripcion, c.precio, + l.nombre AS lugar, l.capacidad AS cupos_totales, + (l.capacidad - COUNT(va.id)) AS cupos_disponibles + FROM conciertos c + JOIN lugares l ON c.lugar_id = l.id + LEFT JOIN ventas v ON v.evento_id = c.id + LEFT JOIN ventas_asientos va ON va.venta_id = v.id + GROUP BY c.id + ORDER BY c.fecha ASC"; + +$result = $conn->query($sql); + +if ($result->num_rows > 0) { + while ($concierto = $result->fetch_assoc()) { + $imagen = !empty($concierto['imagen']) ? htmlspecialchars($concierto['imagen']) : "img/images.jpg"; + + echo '<div class="evento"> + <img src="' . $imagen . '" alt="Concierto de ' . htmlspecialchars($concierto['artista']) . '"> + <h3>Concierto de ' . htmlspecialchars($concierto['artista']) . '</h3> + <p>' . htmlspecialchars($concierto['descripcion']) . '</p> + <p>' . date("d M Y - H:i", strtotime($concierto['fecha'])) . ' - ' . htmlspecialchars($concierto['lugar']) . '</p> + <p>Precio por boleto: $' . number_format($concierto['precio'], 2) . '</p> + <p>Cupos disponibles: ' . $concierto['cupos_disponibles'] . '</p>'; + + if ($concierto['cupos_disponibles'] > 0) { + echo '<button onclick="window.location.href=\'comprar-boletos.html?id=' . $concierto['id'] . '\'">Comprar boletos</button>'; + } else { + echo '<button disabled style="background-color: gray; cursor: not-allowed;">Agotado</button>'; + } + + echo '</div>'; + } +} else { + echo "<p>No hay conciertos disponibles.</p>"; +} + +$conn->close(); +?> diff --git a/controladores/comprar-boletos.php b/controladores/comprar-boletos.php new file mode 100644 index 0000000..b2849fc --- /dev/null +++ b/controladores/comprar-boletos.php @@ -0,0 +1,21 @@ +<?php +require_once "conexion-bd.php"; + +if (!isset($_GET['id'])) { + die("Error: No se especificó un evento."); +} + +$id_evento = intval($_GET['id']); + +$sql_evento = "SELECT * FROM conciertos WHERE id = ?"; +$stmt = $conn->prepare($sql_evento); +$stmt->bind_param("i", $id_evento); +$stmt->execute(); +$result = $stmt->get_result(); + +if ($result->num_rows === 0) { + die("Error: El evento no existe."); +} + +$evento = $result->fetch_assoc(); +?> \ No newline at end of file diff --git a/controladores/comprobante.php b/controladores/comprobante.php new file mode 100644 index 0000000..a0fa229 --- /dev/null +++ b/controladores/comprobante.php @@ -0,0 +1,64 @@ +<?php +header("Content-Type: application/json"); +error_reporting(E_ALL); +ini_set('display_errors', 1); + +require_once "conexion-bd.php"; + +if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { + echo json_encode(["error" => "No se especificó una compra válida."]); + exit(); +} + +$id_compra = intval($_GET['id']); + +$sql = "SELECT ventas.id, conciertos.artista, conciertos.fecha, lugares.nombre AS lugar, + ventas.cantidad, ventas.total, conciertos.precio + FROM ventas + JOIN conciertos ON ventas.evento_id = conciertos.id + JOIN lugares ON conciertos.lugar_id = lugares.id + WHERE ventas.id = ?"; +$stmt = $conn->prepare($sql); +$stmt->bind_param("i", $id_compra); +$stmt->execute(); +$result = $stmt->get_result(); + +if ($result->num_rows === 0) { + echo json_encode(["error" => "La compra no existe."]); + exit(); +} + +$compra = $result->fetch_assoc(); + +$check_table = $conn->query("SHOW TABLES LIKE 'ventas_asientos'"); +if ($check_table->num_rows === 0) { + echo json_encode(["error" => "Error: La tabla de asientos vendidos no está creada."]); + exit(); +} + +$sql_asientos = "SELECT numero_asiento FROM asientos + WHERE id IN (SELECT asiento_id FROM ventas_asientos WHERE venta_id = ?)"; +$stmt_asientos = $conn->prepare($sql_asientos); +$stmt_asientos->bind_param("i", $id_compra); +$stmt_asientos->execute(); +$result_asientos = $stmt_asientos->get_result(); + +$asientos = []; +while ($row = $result_asientos->fetch_assoc()) { + $asientos[] = $row['numero_asiento']; +} + +echo json_encode([ + "artista" => $compra['artista'], + "fecha" => date("d M Y - H:i", strtotime($compra['fecha'])), + "lugar" => $compra['lugar'], + "cantidad" => $compra['cantidad'], + "precio" => number_format($compra['precio'], 2), + "total" => number_format($compra['total'], 2), + "asientos" => $asientos +], JSON_UNESCAPED_UNICODE); + +$stmt->close(); +$stmt_asientos->close(); +$conn->close(); +?> diff --git a/controladores/crear-evento.php b/controladores/crear-evento.php new file mode 100644 index 0000000..347bd13 --- /dev/null +++ b/controladores/crear-evento.php @@ -0,0 +1,95 @@ +<?php +header("Content-Type: application/json"); +require_once "conexion-bd.php"; + +if ($_SERVER['REQUEST_METHOD'] !== 'POST') { + echo json_encode(["mensaje" => "Método no permitido."]); + exit(); +} + +$artista = $conn->real_escape_string($_POST['artista']); +$fecha = $conn->real_escape_string($_POST['fecha']); +$lugar_id = intval($_POST['lugar_id']); +$precio = isset($_POST['precio']) ? floatval($_POST['precio']) : 0; +$descripcion = isset($_POST['descripcion']) ? $conn->real_escape_string($_POST['descripcion']) : ""; + +// Validar precio +if ($precio <= 0) { + echo json_encode(["mensaje" => "Error: El precio debe ser un número mayor a 0."]); + exit(); +} + +// Obtener capacidad del lugar +$sql_capacidad = "SELECT capacidad FROM lugares WHERE id = ?"; +$stmt = $conn->prepare($sql_capacidad); +$stmt->bind_param("i", $lugar_id); +$stmt->execute(); +$result = $stmt->get_result(); +$lugar = $result->fetch_assoc(); + +if (!$lugar) { + echo json_encode(["mensaje" => "Error: El lugar seleccionado no existe."]); + exit(); +} + +$capacidad = $lugar['capacidad']; + +// 🔹 Manejar subida del archivo (imagen) +$imagen_path = ""; +if (isset($_FILES['imagen']) && $_FILES['imagen']['error'] === UPLOAD_ERR_OK) { + $imagen_nombre = basename($_FILES['imagen']['name']); + $imagen_extension = strtolower(pathinfo($imagen_nombre, PATHINFO_EXTENSION)); + + // Validar extensión permitida + $extensiones_permitidas = ['jpg', 'jpeg', 'png', 'gif']; + if (!in_array($imagen_extension, $extensiones_permitidas)) { + echo json_encode(["mensaje" => "Error: Formato de imagen no permitido."]); + exit(); + } + + // Carpeta destino para las imágenes subidas + $carpeta_destino = "../img/eventos/"; + if (!is_dir($carpeta_destino)) { + mkdir($carpeta_destino, 0777, true); + } + + // Crear nombre único para evitar conflictos + $nuevo_nombre = uniqid('evento_', true) . '.' . $imagen_extension; + $imagen_path = $carpeta_destino . $nuevo_nombre; + + // Guardar archivo en servidor + if (!move_uploaded_file($_FILES['imagen']['tmp_name'], $imagen_path)) { + echo json_encode(["mensaje" => "Error al guardar la imagen."]); + exit(); + } + + // Guardar ruta relativa para acceder desde HTML + $imagen_path = "img/eventos/" . $nuevo_nombre; +} + +// Insertar el evento incluyendo la imagen +$sql = "INSERT INTO conciertos (artista, fecha, lugar_id, precio, descripcion, imagen) VALUES (?, ?, ?, ?, ?, ?)"; +$stmt = $conn->prepare($sql); +$stmt->bind_param("ssidss", $artista, $fecha, $lugar_id, $precio, $descripcion, $imagen_path); + +if ($stmt->execute()) { + $evento_id = $conn->insert_id; + + // Generar asientos según capacidad + $asientos_insert = $conn->prepare("INSERT INTO asientos (lugar_id, numero_asiento) VALUES (?, ?)"); + + for ($i = 1; $i <= $capacidad; $i++) { + $fila = chr(65 + floor(($i - 1) / 10)); + $numero_asiento = $fila . (($i % 10 == 0) ? 10 : $i % 10); + $asientos_insert->bind_param("is", $lugar_id, $numero_asiento); + $asientos_insert->execute(); + } + + echo json_encode(["mensaje" => "Evento creado exitosamente."]); +} else { + echo json_encode(["mensaje" => "Error al crear el evento: " . $conn->error]); +} + +$stmt->close(); +$conn->close(); +?> diff --git a/controladores/detalles-evento.php b/controladores/detalles-evento.php new file mode 100644 index 0000000..464a16b --- /dev/null +++ b/controladores/detalles-evento.php @@ -0,0 +1,39 @@ +<?php +header("Content-Type: application/json"); +require_once "conexion-bd.php"; + +if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { + echo json_encode(["error" => "No se especificó un evento válido."]); + exit(); +} + +$id_evento = intval($_GET['id']); + +$sql = "SELECT conciertos.id, conciertos.artista, conciertos.fecha, lugares.nombre AS lugar, + conciertos.precio, (lugares.capacidad - conciertos.cupos_ocupados) AS cupos_disponibles + FROM conciertos + JOIN lugares ON conciertos.lugar_id = lugares.id + WHERE conciertos.id = ?"; +$stmt = $conn->prepare($sql); +$stmt->bind_param("i", $id_evento); +$stmt->execute(); +$result = $stmt->get_result(); + +if ($result->num_rows === 0) { + echo json_encode(["error" => "El evento no existe."]); + exit(); +} + +$evento = $result->fetch_assoc(); + +echo json_encode([ + "artista" => $evento['artista'], + "fecha" => date("d M Y - H:i", strtotime($evento['fecha'])), + "lugar" => $evento['lugar'], + "precio" => number_format($evento['precio'], 2), + "cupos_disponibles" => $evento['cupos_disponibles'] +]); + +$stmt->close(); +$conn->close(); +?> diff --git a/controladores/generar-reporte.php b/controladores/generar-reporte.php new file mode 100644 index 0000000..300e9e3 --- /dev/null +++ b/controladores/generar-reporte.php @@ -0,0 +1,48 @@ +<?php +header("Content-Type: application/json"); +require_once "conexion-bd.php"; + +if ($_SERVER['REQUEST_METHOD'] !== 'GET') { + echo json_encode(["error" => "Método no permitido."]); + exit(); +} + +$fecha_inicio = isset($_GET['fecha_inicio']) ? $_GET['fecha_inicio'].' 00:00:00' : ''; +$fecha_fin = isset($_GET['fecha_fin']) ? $_GET['fecha_fin'].' 23:59:59' : ''; + +if (empty($fecha_inicio) || empty($fecha_fin)) { + echo json_encode(["error" => "Debes proporcionar un rango de fechas."]); + exit(); +} + +$sql = "SELECT ventas.id, ventas.fecha_venta, conciertos.artista, lugares.nombre AS lugar, + asientos.numero_asiento, ventas_asientos.precio + FROM ventas + JOIN conciertos ON ventas.evento_id = conciertos.id + JOIN lugares ON conciertos.lugar_id = lugares.id + JOIN ventas_asientos ON ventas.id = ventas_asientos.venta_id + JOIN asientos ON ventas_asientos.asiento_id = asientos.id + WHERE ventas.fecha_venta BETWEEN ? AND ? + ORDER BY ventas.fecha_venta DESC"; + +$stmt = $conn->prepare($sql); +$stmt->bind_param("ss", $fecha_inicio, $fecha_fin); +$stmt->execute(); +$result = $stmt->get_result(); + +$ventas = []; +while ($row = $result->fetch_assoc()) { + $ventas[] = [ + 'fecha_venta' => $row['fecha_venta'], + 'artista' => $row['artista'], + 'lugar' => $row['lugar'], + 'numero_asiento' => $row['numero_asiento'], + 'precio' => $row['precio'] + ]; +} + +echo json_encode(["ventas" => $ventas], JSON_UNESCAPED_UNICODE); + +$stmt->close(); +$conn->close(); +?> diff --git a/controladores/login.php b/controladores/login.php index 3d1cbcb..371893f 100644 --- a/controladores/login.php +++ b/controladores/login.php @@ -15,10 +15,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($password === $usuario['password']) { $_SESSION['vendedor_id'] = $usuario['id']; $_SESSION['vendedor_nombre'] = $usuario['nombre']; - header("Location: ../main.html"); + header("Location: ../inicio.html"); exit(); } else { - header("Location: login.html?error=" . urlencode("Credenciales incorrectas.")); + header("Location: main.html?error=" . urlencode("Credenciales incorrectas.")); exit(); } } else { @@ -26,4 +26,4 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { exit(); } } -?> +?> \ No newline at end of file diff --git a/controladores/obtener-asientos.php b/controladores/obtener-asientos.php new file mode 100644 index 0000000..be52c80 --- /dev/null +++ b/controladores/obtener-asientos.php @@ -0,0 +1,42 @@ +<?php +header("Content-Type: application/json"); +require_once "conexion-bd.php"; + +if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { + echo json_encode(["error" => "No se especificó un evento válido."]); + exit(); +} + +$id_evento = intval($_GET['id']); + +// Obtener el lugar del evento +$sql_lugar = "SELECT lugar_id FROM conciertos WHERE id = ?"; +$stmt = $conn->prepare($sql_lugar); +$stmt->bind_param("i", $id_evento); +$stmt->execute(); +$result = $stmt->get_result(); +$evento = $result->fetch_assoc(); + +if (!$evento) { + echo json_encode(["error" => "El evento no existe."]); + exit(); +} + +$lugar_id = $evento['lugar_id']; + +// Obtener los asientos del lugar +$sql_asientos = "SELECT id, numero_asiento, estado FROM asientos WHERE lugar_id = ?"; +$stmt = $conn->prepare($sql_asientos); +$stmt->bind_param("i", $lugar_id); +$stmt->execute(); +$result = $stmt->get_result(); + +$asientos = []; +while ($row = $result->fetch_assoc()) { + $asientos[] = $row; +} + +echo json_encode($asientos); +$stmt->close(); +$conn->close(); +?> diff --git a/controladores/obtener-lugares.php b/controladores/obtener-lugares.php new file mode 100644 index 0000000..1188f7a --- /dev/null +++ b/controladores/obtener-lugares.php @@ -0,0 +1,15 @@ +<?php +header("Content-Type: application/json"); +require_once "conexion-bd.php"; + +$sql = "SELECT * FROM lugares"; +$result = $conn->query($sql); + +$lugares = []; +while ($row = $result->fetch_assoc()) { + $lugares[] = $row; +} + +echo json_encode($lugares); +$conn->close(); +?> diff --git a/controladores/procesar-compra.php b/controladores/procesar-compra.php new file mode 100644 index 0000000..c3558f4 --- /dev/null +++ b/controladores/procesar-compra.php @@ -0,0 +1,105 @@ +<?php +header("Content-Type: application/json"); +error_reporting(E_ALL); +ini_set('display_errors', 1); + +require_once "conexion-bd.php"; + +if ($_SERVER['REQUEST_METHOD'] !== 'POST') { + echo json_encode(["mensaje" => "Método no permitido."]); + exit(); +} + +$evento_id = intval($_POST['evento_id']); +$asientos = json_decode($_POST['asientos'], true); +$cantidad = intval($_POST['cantidad']); + +if (empty($asientos)) { + echo json_encode(["mensaje" => "Debes seleccionar al menos un asiento."]); + exit(); +} + +$sql_evento = "SELECT c.precio, c.lugar_id, l.capacidad + FROM conciertos c + JOIN lugares l ON c.lugar_id = l.id + WHERE c.id = ?"; +$stmt_evento = $conn->prepare($sql_evento); +$stmt_evento->bind_param("i", $evento_id); +$stmt_evento->execute(); +$result_evento = $stmt_evento->get_result(); +$evento = $result_evento->fetch_assoc(); + +if (!$evento) { + echo json_encode(["mensaje" => "Error: No se encontró el evento."]); + exit(); +} + +$precio_unitario = $evento['precio']; +$lugar_id = $evento['lugar_id']; +$capacidad = $evento['capacidad']; + +if (count($asientos) > $capacidad) { + echo json_encode(["mensaje" => "Error: Estás intentando comprar más boletos de los permitidos."]); + exit(); +} + +$total = count($asientos) * $precio_unitario; + +// 🔹 Insertar la compra en la tabla `ventas` +$sql = "INSERT INTO ventas (evento_id, cantidad, total) VALUES (?, ?, ?)"; +$stmt = $conn->prepare($sql); +$stmt->bind_param("iid", $evento_id, $cantidad, $total); + +if ($stmt->execute()) { + $id_compra = $conn->insert_id; + + // 🔹 Actualizar el estado de los asientos y obtener su ID + $sql_asiento_update = "UPDATE asientos SET estado = 'vendido' WHERE numero_asiento = ? AND lugar_id = ?"; + $stmt_asiento_update = $conn->prepare($sql_asiento_update); + + $sql_obtener_asiento_id = "SELECT id FROM asientos WHERE numero_asiento = ? AND lugar_id = ?"; + $stmt_asiento_id = $conn->prepare($sql_obtener_asiento_id); + + // 🔹 Insertar registro en ventas_asientos con precio real + $sql_ventas_asientos = "INSERT INTO ventas_asientos (venta_id, asiento_id, precio) VALUES (?, ?, ?)"; + $stmt_ventas_asientos = $conn->prepare($sql_ventas_asientos); + + foreach ($asientos as $asiento) { + $asientoSeleccionado = trim($asiento); + + // Actualizar estado del asiento + $stmt_asiento_update->bind_param("si", $asientoSeleccionado, $lugar_id); + if (!$stmt_asiento_update->execute()) { + echo json_encode(["mensaje" => "Error actualizando asiento: " . $stmt_asiento_update->error]); + exit(); + } + + // Obtener ID del asiento + $stmt_asiento_id->bind_param("si", $asientoSeleccionado, $lugar_id); + $stmt_asiento_id->execute(); + $result_asiento = $stmt_asiento_id->get_result(); + $asiento_data = $result_asiento->fetch_assoc(); + + if (!$asiento_data) { + echo json_encode(["mensaje" => "Error: asiento no encontrado."]); + exit(); + } + + $asiento_id = $asiento_data['id']; + + // Insertar en ventas_asientos con precio real del evento + $stmt_ventas_asientos->bind_param("iid", $id_compra, $asiento_id, $precio_unitario); + if (!$stmt_ventas_asientos->execute()) { + echo json_encode(["mensaje" => "Error al insertar venta_asiento: " . $stmt_ventas_asientos->error]); + exit(); + } + } + + echo json_encode(["mensaje" => "Compra realizada exitosamente.", "id_compra" => $id_compra]); +} else { + echo json_encode(["mensaje" => "Error al procesar la compra: " . $conn->error]); +} + +$stmt->close(); +$conn->close(); +?> diff --git a/crear-evento.html b/crear-evento.html new file mode 100644 index 0000000..7a23296 --- /dev/null +++ b/crear-evento.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Crear Evento - TicketCompany</title> + <link rel="stylesheet" href="css/crear-evento.css"> +</head> +<body> + <header> + <h1>Crear Evento</h1> + </header> + <main> + <div id="mensaje"></div> + <form id="crearConciertoForm" enctype="multipart/form-data"> + <label for="artista">Artista:</label> + <input type="text" id="artista" name="artista" required> + + <label for="fecha">Fecha:</label> + <input type="datetime-local" id="fecha" name="fecha" required> + + <label for="lugar">Lugar:</label> + <select id="lugar" name="lugar_id" required> + <option value="">Seleccione un lugar</option> + </select> + + <p>Capacidad máxima: <span id="capacidad">-</span></p> + + <label for="precio">Precio por Boleto:</label> + <input type="number" id="precio" name="precio" min="1" step="0.01" required> + + <label for="descripcion">Descripción:</label> + <textarea id="descripcion" name="descripcion"></textarea> + + <label for="imagen">Banner:</label> + <label>(Recomendado 1400x400)</label> + <input type="file" id="imagen" name="imagen" accept="image/*"> + + <div class="boton-container"> + <button type="submit">Crear Evento</button> + <a href="inicio.html"> + <button type="button" class="regresar-btn">Regresar</button> + </a> + </div> + </form> + </main> + + <script src="js/obtener-lugares.js"></script> + <script src="js/crear-evento.js"></script> +</body> +</html> diff --git a/css/comprar-boletos.css b/css/comprar-boletos.css new file mode 100644 index 0000000..ff764d2 --- /dev/null +++ b/css/comprar-boletos.css @@ -0,0 +1,150 @@ +/* Estilo general */ +body { + background-color: #141414; /* Fondo negro */ + color: #FFFFFF; /* Texto blanco para contraste */ + font-family: Arial, sans-serif; + margin: 0; + padding: 0; +} + +/* Estilo del título */ +h1 { + color: #DAA520; /* Color dorado */ + text-align: center; + padding: 20px; + font-size: 2.5rem; +} + +/* Información del evento */ +#eventoInfo { + text-align: center; + margin: 20px 0; +} + +#eventoInfo p { + font-size: 1.2rem; + color: #FFFFFF; /* Texto blanco */ +} + +/* Estilo para el formulario */ +#formCompra { + margin: 0 auto; + max-width: 600px; + background-color: #1c1c1c; /* Fondo gris oscuro */ + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.6); +} + +/* Encabezados dentro del formulario */ +h2, h3 { + color: #DAA520; /* Color dorado */ + text-align: center; +} + +/* Estilo de los campos de entrada */ +input[type="number"] { + width: 100%; + padding: 10px; + margin-top: 10px; + border: 1px solid #DAA520; /* Borde dorado */ + background-color: #333333; /* Fondo gris oscuro */ + color: #FFFFFF; /* Texto blanco */ + font-size: 1rem; + border-radius: 5px; +} + +/* Estilo del mapa de asientos */ +#mapa-asientos { + margin: 20px 0; + background-color: #222222; /* Fondo más oscuro para el mapa */ + height: 300px; + border-radius: 10px; + border: 1px solid #DAA520; /* Borde dorado */ +} + +/* Estilo del botón */ +button[type="button"] { + background-color: #DAA520; /* Fondo dorado */ + color: #141414; /* Texto negro */ + border: none; + padding: 15px; + width: 100%; + font-size: 1.2rem; + border-radius: 5px; + cursor: pointer; + margin-top: 20px; + transition: background-color 0.3s; +} + +button[type="button"]:hover { + background-color: #FFD700; /* Color dorado más brillante al pasar el cursor */ +} + +.regresar-btn { + background-color: #555; /* Gris oscuro definido */ + color: #fff; /* Color blanco para contraste */ + font-size: 1rem; + padding: 15px 30px; + border: none; + border-radius: 5px; + cursor: pointer; + text-align: center; + display: inline-block; + transition: background-color 0.3s ease; + margin-left: 20px; +} + +.regresar-btn:hover { + background-color: #777; /* Gris ligeramente más claro al pasar el mouse */ +} + + +/* Estilos para el contenedor de asientos */ +#mapa-asientos { + margin: 20px auto; + background-color: #222222; + border-radius: 10px; + border: 1px solid #DAA520; + padding: 10px; + display: flex; + flex-wrap: wrap; /* Permite que los botones se ajusten al tamaño del contenedor */ + justify-content: center; /* Centra los botones dentro del contenedor */ + gap: 5px; /* Espacio entre botones */ + max-width: 900px; /* ajusta esto según tu preferencia */ + height: auto; /* altura automática según contenido */ +} + +/* Estilos para cada asiento individual */ +.seat { + width: 30px; /* Botón más pequeño */ + height: 30px; /* Botón más pequeño */ + font-size: 0.7rem; /* Fuente más pequeña */ + margin: 2px; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.2s; + display: flex; + justify-content: center; + align-items: center; +} + +/* Asiento disponible */ +.seat.disponible { + background-color: #3A8BFF; /* azul */ + color: white; +} + +/* Asiento vendido */ +.seat.vendido { + background-color: #FF4444; /* rojo */ + color: white; + cursor: not-allowed; +} + +/* Asiento seleccionado */ +.seat.seleccionado { + background-color: #44FF44; /* verde */ + color: white; +} + diff --git a/css/comprobante.css b/css/comprobante.css new file mode 100644 index 0000000..01fbac3 --- /dev/null +++ b/css/comprobante.css @@ -0,0 +1,95 @@ +/* Estilo general */ +body { + background-color: rgb(20, 20, 20); /* Fondo negro */ + color: rgb(255, 255, 255); /* Texto blanco para contraste */ + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + text-align: center; /* Centra todo el contenido */ +} + +/* Estilo del título */ +h1 { + color: rgb(218, 165, 32); /* Color dorado */ + font-size: 2.5rem; + margin-top: 20px; + text-transform: uppercase; /* Mayúsculas */ +} + +/* Estilo de los subtítulos */ +h2, h3 { + color: rgb(218, 165, 32); /* Color dorado */ + font-size: 1.8rem; + margin: 10px 0; +} + +/* Información del comprobante */ +#comprobanteInfo { + background-color: rgb(20, 20, 20); /* Fondo negro */ + color: rgb(255, 255, 255); /* Texto blanco */ + padding: 20px; + border-radius: 10px; + margin: 20px auto; + max-width: 600px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.6); +} + +/* Estilo para los párrafos */ +#comprobanteInfo p { + font-size: 1.2rem; + margin: 5px 0; +} + +/* Estilo para los botones */ +button { + background-color: rgb(218, 165, 32); /* Fondo dorado */ + color: rgb(20, 20, 20); /* Texto negro */ + border: none; + padding: 15px; + width: 200px; + font-size: 1.2rem; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s; + margin: 10px; +} + +button:hover { + background-color: #FFD700; /* Dorado más brillante al pasar el cursor */ +} + +/* Estilo de la lista de asientos seleccionados */ +#asientos { + list-style-type: none; + padding: 0; + margin: 0; +} + +#asientos li { + background-color: rgb(30, 30, 30); /* Fondo gris oscuro */ + padding: 10px; + margin: 5px 0; + border-radius: 5px; +} + +/* Enlaces */ +a { + text-decoration: none; +} + +/* Estilo para la sección de agradecimiento */ +h3 + p { + font-size: 1.2rem; + color: rgb(255, 255, 255); /* Blanco */ + margin-top: 20px; +} + +/* Ajustes para la página de impresión */ +@media print { + body { + font-size: 1rem; + } + button { + display: none; /* Ocultar botones al imprimir */ + } +} diff --git a/css/crear-evento.css b/css/crear-evento.css new file mode 100644 index 0000000..b8927d5 --- /dev/null +++ b/css/crear-evento.css @@ -0,0 +1,175 @@ +body { + font-family: Arial, sans-serif; + background-color: rgb(20, 20, 20); + color: rgb(255, 255, 255); + margin: 0; + padding: 0; +} + +header { + background-color: rgb(20, 20, 20); + text-align: center; + padding: 20px; + border-bottom: 2px solid rgb(218, 165, 32); +} + +header h1 { + color: rgb(218, 165, 32); + margin: 0; +} + +main { + padding: 40px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.input-group { + margin-bottom: 20px; + width: 100%; +} + +label { + font-size: 1.1rem; + font-weight: bold; + color: rgb(255, 255, 255); + display: block; + margin-bottom: 10px; +} + +input[type="text"], +input[type="datetime-local"], +input[type="number"], +textarea { + width: 100%; + padding: 10px; + font-size: 1rem; + border: 1px solid rgb(218, 165, 32); + border-radius: 5px; + background-color: rgb(30, 30, 30); + color: rgb(255, 255, 255); + margin-bottom: 15px; +} + +textarea { + resize: vertical; + height: 150px; +} + +button { + background-color: rgb(218, 165, 32); + color: rgb(20, 20, 20); + font-size: 1rem; + padding: 15px 30px; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: rgb(255, 215, 50); +} + +.boton-container { + display: flex; + justify-content: space-between; + width: 100%; + max-width: 500px; + margin-top: 20px; + gap: 60px; +} + +.regresar-btn { + background-color: rgb(218, 165, 32); + color: rgb(20, 20, 20); + font-size: 1rem; + padding: 15px 30px; + border: none; + border-radius: 5px; + cursor: pointer; + text-align: center; + display: inline-block; + transition: background-color 0.3s ease; + margin-left: 20px; +} + +.regresar-btn:hover { + background-color: rgb(255, 215, 50); +} + +#mensaje { + color: rgb(255, 0, 0); + margin-bottom: 20px; +} + +/* Estilos para inputs tipo file y select */ +input[type="file"], +select { + width: 100%; + padding: 10px; + font-size: 1rem; + border: 1px solid rgb(218, 165, 32); + border-radius: 5px; + background-color: rgb(30, 30, 30); + color: rgb(255, 255, 255); + margin-bottom: 15px; +} + +/* Personalizar el botón de subir archivo */ +input[type="file"]::file-selector-button { + background-color: rgb(218, 165, 32); + color: rgb(20, 20, 20); + border: none; + padding: 8px 12px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + font-weight: bold; +} + +input[type="file"]::file-selector-button:hover { + background-color: rgb(255, 215, 50); +} + +/* Estilos adicionales para desplegable (select) */ +select option { + background-color: rgb(30, 30, 30); + color: rgb(255, 255, 255); +} + +/* Evitar color blanco en navegadores específicos */ +input[type="file"]::-webkit-file-upload-button { + background-color: rgb(218, 165, 32); + color: rgb(20, 20, 20); + border: none; + padding: 8px 12px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + font-weight: bold; +} + +input[type="file"]::-webkit-file-upload-button:hover { + background-color: rgb(255, 215, 50); +} + +.regresar-btn { + background-color: #555; /* Gris oscuro definido */ + color: #fff; /* Color blanco para contraste */ + font-size: 1rem; + padding: 15px 30px; + border: none; + border-radius: 5px; + cursor: pointer; + text-align: center; + display: inline-block; + transition: background-color 0.3s ease; + margin-left: 20px; +} + +.regresar-btn:hover { + background-color: #777; /* Gris ligeramente más claro al pasar el mouse */ +} diff --git a/css/inicio.css b/css/inicio.css new file mode 100644 index 0000000..f1434a2 --- /dev/null +++ b/css/inicio.css @@ -0,0 +1,147 @@ +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background-color: #141414; + margin: 0; + padding: 0; + color: #FFFFFF; +} + +header { + background-color: #141414; + padding: 20px 0; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); +} + +nav { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 40px; +} + +.logo { + font-size: 24px; + font-weight: bold; + color: #DAA520; +} + +ul { + list-style: none; + margin: 0; + padding: 0; + display: flex; +} + +ul li { + margin-left: 20px; +} + +ul li a { + color: #DAA520; + text-decoration: none; + font-size: 16px; + transition: color 0.3s; +} + +ul li a:hover { + color: #b58c17; +} + +.banner { + background-color: #141414; + color: #FFFFFF; + text-align: center; + padding: 80px 20px; +} + +.banner h1 { + font-size: 40px; + font-weight: 600; + color: #DAA520; +} + +.banner p { + font-size: 18px; + color: #FFFFFF; +} + + +.eventos { + padding: 40px 20px; + text-align: center; +} + +.eventos h2 { + font-size: 30px; + color: #DAA520; + margin-bottom: 20px; +} + +.evento { + background-color: #333333; + margin-bottom: 30px; + border-radius: 8px; + overflow: hidden; + padding: 20px; + text-align: left; + transition: transform 0.3s; +} + +.evento:hover { + transform: scale(1.05); +} + +.evento img { + width: 100%; + height: auto; + border-radius: 6px; +} + +.evento h3 { + font-size: 24px; + color: #DAA520; + margin: 10px 0; +} + +.evento p { + font-size: 16px; + color: #FFFFFF; +} + +.evento button { + background-color: #DAA520; + color: #141414; + padding: 12px 20px; + border: none; + border-radius: 6px; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s; + margin-top: 10px; +} + +.evento button:hover { + background-color: #b58c17; +} + +#buscarEvento { + width: 50%; + padding: 12px 20px; + border-radius: 6px; + border: none; + margin-top: 20px; + background-color: #333333; + color: #FFFFFF; + font-size: 16px; + outline: none; + transition: box-shadow 0.3s, background-color 0.3s; +} + +#buscarEvento::placeholder { + color: #b3b3b3; +} + +#buscarEvento:focus { + background-color: #424242; + box-shadow: 0 0 8px #DAA520; +} diff --git a/css/login.css b/css/login.css deleted file mode 100644 index 8b49114..0000000 --- a/css/login.css +++ /dev/null @@ -1,58 +0,0 @@ -body { - background-color: #2980b9; - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - } - - .login-container { - width: 320px; - margin: 100px auto; - background: #fff; - padding: 25px; - border-radius: 5px; - box-shadow: 0 0 10px rgba(0,0,0,0.1); - } - - .login-container h2 { - text-align: center; - margin-bottom: 20px; - } - - .input-group { - margin-bottom: 15px; - } - - .input-group label { - display: block; - margin-bottom: 5px; - font-weight: bold; - } - - .input-group input { - width: 100%; - padding: 8px; - box-sizing: border-box; - } - - button { - width: 100%; - padding: 10px; - background-color: #3498db; - color: #fff; - border: none; - cursor: pointer; - border-radius: 3px; - font-size: 16px; - } - - button:hover { - background-color: #2980b9; - } - - #error { - margin-bottom: 15px; - color: red; - text-align: center; - } - \ No newline at end of file diff --git a/css/main.css b/css/main.css index 5e794b1..03a48c1 100644 --- a/css/main.css +++ b/css/main.css @@ -1,55 +1,79 @@ body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - background-color: #f4f4f4; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background-color: #141414; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; + color: #FFFFFF; } -header { - background-color: #333; - color: white; - padding: 10px 0; - text-align: center; + +.login-container { + background: #141414; + border-radius: 10px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); + padding: 40px; + width: 100%; + max-width: 360px; + box-sizing: border-box; } -nav ul { - list-style: none; - padding: 0; + +.login-container h2 { + font-size: 24px; + font-weight: 600; + text-align: center; + margin-bottom: 20px; + color: #DAA520; } -nav ul li { - display: inline; - margin: 0 15px; + +#error { + color: #e74c3c; + font-size: 14px; + margin-bottom: 20px; + text-align: center; } -nav ul li a { - color: white; - text-decoration: none; + +.input-group { + margin-bottom: 20px; } -.banner { - color: white; - text-align: center; - padding: 100px 20px; + +.input-group label { + display: block; + margin-bottom: 8px; + font-size: 14px; + color: #DAA520; } -.eventos { - text-align: center; - padding: 20px; + +.input-group input { + width: 100%; + padding: 12px; + font-size: 16px; + border: 1px solid #333333; + border-radius: 6px; + box-sizing: border-box; + background-color: #333333; + color: #FFFFFF; + transition: border-color 0.3s; } -.evento { - display: inline-block; - background: white; - padding: 15px; - margin: 10px; - border-radius: 5px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); -} -.evento img { - max-width: 100%; - border-radius: 5px; + +.input-group input:focus { + border-color: #DAA520; + outline: none; } + button { - background: #28a745; - color: white; - border: none; - padding: 10px; - cursor: pointer; + width: 100%; + padding: 14px; + background-color: #DAA520; + color: #141414; + border: none; + border-radius: 6px; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s; } + button:hover { - background: #218838; + background-color: #b58c17; } diff --git a/css/reporte-ventas.css b/css/reporte-ventas.css new file mode 100644 index 0000000..0645b38 --- /dev/null +++ b/css/reporte-ventas.css @@ -0,0 +1,128 @@ +/* Estilos generales del reporte */ +body { + font-family: Arial, sans-serif; + background-color: #141414; + color: #fff; + margin: 0; + padding: 0; +} + +h1, h2 { + color: #DAA520; + text-align: center; +} + +form { + background-color: #1E1E1E; + padding: 20px; + border-radius: 8px; + max-width: 600px; + margin: 20px auto; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 10px; +} + +label { + color: #fff; + font-weight: bold; + margin-right: 10px; +} + +input[type="date"] { + background-color: #141414; + border: 1px solid #DAA520; + color: #fff; + padding: 8px; + border-radius: 5px; + outline: none; + margin-bottom: 10px; +} + +button { + background-color: #DAA520; + color: #141414; + border: none; + padding: 10px 15px; + margin: 5px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + font-weight: bold; +} + +button:hover { + background-color: #FFD732; +} + +/* Botón regresar personalizado */ +.regresar-btn { + background-color: #555; + color: #fff; +} + +.regresar-btn:hover { + background-color: #777; +} + +h1, h2 { + color: #DAA520; + text-align: center; +} + +table { + width: 90%; + max-width: 900px; + margin: 20px auto; + border-collapse: collapse; + border-radius: 8px; + overflow: hidden; +} + +thead { + background-color: #DAA520; + color: #141414; +} + +thead th { + padding: 12px; + text-align: center; +} + +tbody td { + background-color: #2a2a2a; + padding: 10px; + border-bottom: 1px solid #333; + text-align: center; +} + +tbody tr:hover { + background-color: #333; +} + +tbody tr:last-child td { + border-bottom: none; +} + +tbody td[colspan="5"] { + text-align: center; + color: #bbb; +} + +/* Ajustes responsivos */ +@media (max-width: 600px) { + form { + flex-direction: column; + } + + button { + width: 100%; + margin-top: 10px; + } + + table { + width: 95%; + } +} diff --git a/img/eventos/evento_67ce6db6571257.43010380.jpeg b/img/eventos/evento_67ce6db6571257.43010380.jpeg new file mode 100644 index 0000000..96964f5 Binary files /dev/null and b/img/eventos/evento_67ce6db6571257.43010380.jpeg differ diff --git a/img/eventos/evento_67cee54aeaa1a0.27290983.png b/img/eventos/evento_67cee54aeaa1a0.27290983.png new file mode 100644 index 0000000..d3fbfb1 Binary files /dev/null and b/img/eventos/evento_67cee54aeaa1a0.27290983.png differ diff --git a/img/eventos/evento_67d107d18f9a33.58561139.jpg b/img/eventos/evento_67d107d18f9a33.58561139.jpg new file mode 100644 index 0000000..c40ed5c Binary files /dev/null and b/img/eventos/evento_67d107d18f9a33.58561139.jpg differ diff --git a/img/fondo.jpeg b/img/fondo.jpeg deleted file mode 100644 index 874553a..0000000 Binary files a/img/fondo.jpeg and /dev/null differ diff --git a/img/images.jpeg b/img/images.jpeg deleted file mode 100644 index 3b5dec7..0000000 Binary files a/img/images.jpeg and /dev/null differ diff --git a/img/images.jpg b/img/images.jpg new file mode 100644 index 0000000..c40ed5c Binary files /dev/null and b/img/images.jpg differ diff --git a/img/jh.jpg b/img/jh.jpg new file mode 100644 index 0000000..f44252b Binary files /dev/null and b/img/jh.jpg differ diff --git a/inicio.html b/inicio.html new file mode 100644 index 0000000..efe1d6c --- /dev/null +++ b/inicio.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>TicketCompany</title> + <link rel="stylesheet" href="css/inicio.css"> +</head> +<body> + <header> + <nav> + <div class="logo">TicketCompany</div> + <ul> + <li><a href="crear-evento.html">Crear evento</a></li> + <li><a href="reporte-ventas.html">Generar reporte</a></li> + <li><a href="main.html">Cerrar sesión</a></li> + </ul> + </nav> + </header> + + <section class="banner"> + <h1>Encuentra tus eventos favoritos</h1> + <p>Compra boletos para tu artista favorito.</p> + <input type="text" id="buscarEvento" placeholder="Buscar evento..."> + </section> + + <section class="eventos"> + </section> + <script src="js/cargar-evento.js"></script> +</body> +</html> diff --git a/js/cargar-evento.js b/js/cargar-evento.js new file mode 100644 index 0000000..3bd8183 --- /dev/null +++ b/js/cargar-evento.js @@ -0,0 +1,33 @@ +document.addEventListener("DOMContentLoaded", function() { + const eventosContainer = document.querySelector(".eventos"); + const buscador = document.getElementById("buscarEvento"); + + let eventosOriginales = ""; + + fetch("controladores/cargar-evento.php") + .then(response => { + if (!response.ok) { + throw new Error("Error al cargar los conciertos"); + } + return response.text(); + }) + .then(data => { + eventosOriginales = data; + eventosContainer.innerHTML = data; + }) + .catch(error => console.error("Error al cargar los conciertos:", error)); + + buscador.addEventListener("input", function() { + const terminoBusqueda = buscador.value.toLowerCase(); + + const tempElement = document.createElement('div'); + tempElement.innerHTML = eventosOriginales; + + const eventosFiltrados = Array.from(tempElement.querySelectorAll('.evento')) + .filter(evento => evento.textContent.toLowerCase().includes(terminoBusqueda)) + .map(evento => evento.outerHTML) + .join(""); + + eventosContainer.innerHTML = eventosFiltrados; + }); +}); diff --git a/js/comprar-boleto.js b/js/comprar-boleto.js new file mode 100644 index 0000000..ec520a1 --- /dev/null +++ b/js/comprar-boleto.js @@ -0,0 +1,129 @@ +document.addEventListener("DOMContentLoaded", function () { + const params = new URLSearchParams(window.location.search); + const idEvento = params.get("id"); + + if (!idEvento) { + document.getElementById("eventoInfo").innerHTML = "<p>Error: No se especificó un evento.</p>"; + return; + } + + fetch("controladores/detalles-evento.php?id=" + idEvento) + .then(response => response.json()) + .then(data => { + console.log("Respuesta del servidor:", data); + + if (!data || data.error) { + document.getElementById("eventoInfo").innerHTML = "<p>" + (data.error || "Error desconocido.") + "</p>"; + return; + } + + document.getElementById("titulo").textContent = "Comprar Boletos para " + data.artista; + document.getElementById("fecha").textContent = "Fecha: " + data.fecha; + document.getElementById("lugar").textContent = "Lugar: " + data.lugar; + document.getElementById("evento_id").value = idEvento; + document.getElementById("precioBoleto").textContent = "$" + data.precio; + + let inputCantidad = document.getElementById("cantidad"); + if (inputCantidad) { + inputCantidad.setAttribute("max", data.cupos_disponibles); + } else { + console.warn("Advertencia: El campo 'cantidad' no se encontró en el HTML."); + } + }) + .catch(error => { + console.error("Error al obtener datos del evento:", error); + document.getElementById("eventoInfo").innerHTML = "<p>Error al cargar los detalles del evento.</p>"; + }); +}); + +// Lógica de selección de asientos +document.addEventListener("DOMContentLoaded", function () { + const params = new URLSearchParams(window.location.search); + const eventoId = params.get("id"); + + fetch(`controladores/obtener-asientos.php?id=${eventoId}`) + .then(response => response.json()) + .then(asientos => { + const contenedor = document.getElementById("mapa-asientos"); + contenedor.innerHTML = ""; + + asientos.forEach(asiento => { + let btn = document.createElement("button"); + btn.textContent = asiento.numero_asiento; + btn.classList.add('seat', asiento.estado === "disponible" ? "disponible" : "vendido"); + + if (asiento.estado === "vendido") { + btn.disabled = true; + } else { + btn.addEventListener("click", function (event) { + event.preventDefault(); + + let cantidadBoletos = parseInt(document.getElementById("cantidad").value) || 0; + let seleccionados = document.querySelectorAll(".seleccionado").length; + + if (this.classList.contains("seleccionado")) { + this.classList.remove("seleccionado"); + } else if (seleccionados < cantidadBoletos) { + this.classList.add("seleccionado"); + } else { + alert("Has seleccionado el número máximo de boletos."); + } + }); + } + + contenedor.appendChild(btn); + }); + }) + .catch(error => console.error("Error al cargar los asientos:", error)); +}); + +// Confirmación de la compra +document.getElementById("comprarBoletos").addEventListener("click", function (event) { + event.preventDefault(); + + let asientosSeleccionados = []; + document.querySelectorAll(".seleccionado").forEach(btn => { + asientosSeleccionados.push(btn.textContent); + }); + + console.log("Asientos seleccionados antes de enviar:", asientosSeleccionados); + + if (asientosSeleccionados.length === 0) { + alert("Debes seleccionar al menos un asiento antes de confirmar la compra."); + return; + } + + let cantidadBoletos = parseInt(document.getElementById("cantidad").value) || 0; + if (asientosSeleccionados.length !== cantidadBoletos) { + alert("Debes seleccionar exactamente " + cantidadBoletos + " asientos."); + return; + } + + let confirmacion = confirm("¿Estás seguro de realizar la compra?"); + if (!confirmacion) { + return; + } + + let formData = new FormData(document.getElementById("formCompra")); + formData.append("asientos", JSON.stringify(asientosSeleccionados)); + + console.log("Datos enviados:", Object.fromEntries(formData)); + + fetch("controladores/procesar-compra.php", { + method: "POST", + body: formData, + credentials: 'include' + }) + .then(response => response.json()) + .then(data => { + console.log("Respuesta del servidor:", data); + + if (data.mensaje.includes("exitosamente")) { + alert("Compra realizada exitosamente."); + window.location.href = "comprobante.html?id=" + data.id_compra; + } else { + alert("Error en la compra: " + data.mensaje); + } + }) + .catch(error => console.error("Error al procesar la compra:", error)); +}); diff --git a/js/comprobante.js b/js/comprobante.js new file mode 100644 index 0000000..5bd0fb1 --- /dev/null +++ b/js/comprobante.js @@ -0,0 +1,40 @@ +document.addEventListener("DOMContentLoaded", function () { + const params = new URLSearchParams(window.location.search); + const idCompra = params.get("id"); + + console.log(idCompra); + + if (!idCompra) { + document.getElementById("comprobanteInfo").innerHTML = "<p>Error: No se especificó una compra.</p>"; + return; + } + + fetch("controladores/comprobante.php?id=" + idCompra) + .then(response => response.json()) + .then(data => { + console.log("Datos del comprobante recibidos:", data); + + if (data.error) { + document.getElementById("comprobanteInfo").innerHTML = "<p>" + data.error + "</p>"; + } else { + document.getElementById("evento").textContent = "Evento: " + data.artista; + document.getElementById("fecha").textContent = "Fecha: " + data.fecha; + document.getElementById("lugar").textContent = "Lugar: " + data.lugar; + document.getElementById("cantidad").textContent = "Boletos Comprados: " + data.cantidad; + document.getElementById("total").textContent = "Total Pagado: $" + data.total; + document.getElementById("precio").textContent = "Precio por boleto: $" + data.precio; + + let listaAsientos = document.getElementById("asientos"); + listaAsientos.innerHTML = ""; + data.asientos.forEach(asiento => { + let li = document.createElement("li"); + li.textContent = asiento; + listaAsientos.appendChild(li); + }); + } + }) + .catch(error => { + document.getElementById("comprobanteInfo").innerHTML = "<p>Error al cargar el comprobante.</p>"; + console.error("Error al obtener datos del comprobante:", error); + }); +}); diff --git a/js/crear-evento.js b/js/crear-evento.js new file mode 100644 index 0000000..8db72e7 --- /dev/null +++ b/js/crear-evento.js @@ -0,0 +1,57 @@ +function validateConcertForm() { + var artista = document.getElementById('artista').value.trim(); + var fecha = document.getElementById('fecha').value.trim(); + var lugar = document.getElementById('lugar').value.trim(); + var precio = document.getElementById('precio').value.trim(); + + if (!artista || !fecha || !lugar || !precio) { + alert("Por favor, completa todos los campos."); + return false; + } + + // 🔸 Validación adicional de la fecha + var fechaEvento = new Date(fecha); + var ahora = new Date(); + + if (fechaEvento <= ahora) { + alert("No puedes crear eventos con fechas anteriores o iguales a la fecha y hora actual."); + return false; + } + + return true; +} + +function enviarFormulario(event) { + event.preventDefault(); + + if (!validateConcertForm()) return; + + let confirmacion = confirm("¿Estás seguro de que quieres crear este evento?"); + + if (confirmacion) { + var formData = new FormData(document.getElementById("crearConciertoForm")); + + fetch("controladores/crear-evento.php", { + method: "POST", + body: formData, + credentials: 'include' + }) + .then(response => response.json()) + .then(data => { + document.getElementById("mensaje").textContent = data.mensaje || "Respuesta inesperada del servidor."; + + if (data.mensaje) { + document.getElementById("crearConciertoForm").reset(); + } + }) + .catch(error => { + console.error("Error en la solicitud:", error); + alert("Error al enviar el formulario."); + }); + } +} + +document.addEventListener("DOMContentLoaded", function() { + document.getElementById("crearConciertoForm").addEventListener("submit", enviarFormulario); +}); + diff --git a/js/obtener-lugares.js b/js/obtener-lugares.js new file mode 100644 index 0000000..8b101ec --- /dev/null +++ b/js/obtener-lugares.js @@ -0,0 +1,19 @@ +document.addEventListener("DOMContentLoaded", function () { + fetch("controladores/obtener-lugares.php") + .then(response => response.json()) + .then(data => { + const selectLugar = document.getElementById("lugar"); + data.forEach(lugar => { + let option = document.createElement("option"); + option.value = lugar.id; + option.textContent = lugar.nombre; + option.dataset.capacidad = lugar.capacidad; + selectLugar.appendChild(option); + }); + }); + + document.getElementById("lugar").addEventListener("change", function () { + let capacidad = this.selectedOptions[0].dataset.capacidad || "No seleccionado"; + document.getElementById("capacidad").textContent = capacidad; + }); +}); \ No newline at end of file diff --git a/js/reporte-ventas.js b/js/reporte-ventas.js new file mode 100644 index 0000000..c5e9982 --- /dev/null +++ b/js/reporte-ventas.js @@ -0,0 +1,37 @@ +document.getElementById('formReporte').addEventListener('submit', (event) => { + event.preventDefault(); + + const fechaInicio = document.getElementById('fecha_inicio').value; + const fechaFin = document.getElementById('fecha_fin').value; + + fetch(`controladores/generar-reporte.php?fecha_inicio=${fechaInicio}&fecha_fin=${fechaFin}`) + .then(response => response.json()) + .then(data => { + const tbody = document.getElementById('resultados'); + + if (!tbody) { + console.error('Elemento tbody no encontrado.'); + return; + } + + tbody.innerHTML = ''; + + if (data.ventas && data.ventas.length > 0) { + data.ventas.forEach(venta => { + tbody.innerHTML += ` + <tr> + <td>${venta.fecha_venta}</td> + <td>${venta.artista}</td> + <td>${venta.lugar}</td> + <td>${venta.numero_asiento}</td> + <td>${venta.precio}</td> + </tr>`; + }); + } else { + tbody.innerHTML = '<tr><td colspan="5">No hay ventas en este período.</td></tr>'; + } + }) + .catch(err => { + console.error("Error al generar reporte:", err); + }); +}); diff --git a/login.html b/login.html deleted file mode 100644 index e281930..0000000 --- a/login.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html lang="es"> -<head> - <meta charset="UTF-8"> - <title>Login - TicketCompany</title> - <link rel="css" href="css/login.css"> -</head> -<body> - <div class="login-container"> - <h2>Iniciar Sesión</h2> - <?php if(isset($_GET['error'])): ?> - <div id="error"><?php echo htmlspecialchars($_GET['error']); ?></div> - <?php endif; ?> - <form id="loginForm" action="controladores/login.php" method="post"> - <div class="input-group"> - <label for="email">Correo electrónico</label> - <input type="email" id="email" name="email" required> - </div> - <div class="input-group"> - <label for="password">Contraseña</label> - <input type="password" id="password" name="password" required> - </div> - <button type="submit">Ingresar</button> - </form> - </div> -</body> -</html> diff --git a/main.html b/main.html index 106248f..cc8251c 100644 --- a/main.html +++ b/main.html @@ -1,46 +1,28 @@ <!DOCTYPE html> -<html lang="es"> <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Venta de Boletos</title> - <link rel="stylesheet" href="css/main.css"> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Login - TicketCompany</title> + <link rel="stylesheet" href="css/main.css"> </head> <body> - <header> - <nav> - <div class="logo">TicketCompany</div> - <ul> - <li><a href="login.html">Iniciar sesión</a></li> - </ul> - </nav> - </header> - - <section class="banner"> - <h1>Encuentra tus eventos favoritos</h1> - <p>Compra boletos para tu artista favorito.</p> - </section> - - <section class="eventos"> - <h2>Próximos Conciertos</h2> - <div class="evento"> - <img src="img/images.jpeg" alt="Evento 1"> - <h3>Concierto de Artista X</h3> - <p>15 de marzo - Ciudad de México</p> - <button>Comprar boletos</button> - </div> - <div class="evento"> - <img src="evento2.jpg" alt="Evento 2"> - <h3>Partido de Fútbol</h3> - <p>20 de abril - Estadio Nacional</p> - <button>Comprar boletos</button> - </div> - <div class="evento"> - <img src="evento3.jpg" alt="Evento 3"> - <h3>Obra de Teatro</h3> - <p>10 de mayo - Teatro Principal</p> - <button>Comprar boletos</button> - </div> - </section> + <div class="login-container"> + <h2>TicketCompany</h2> + <h2>Iniciar Sesión</h2> + <?php if(isset($_GET['error'])): ?> + <div id="error"><?php echo htmlspecialchars($_GET['error']); ?></div> + <?php endif; ?> + <form id="loginForm" action="controladores/login.php" method="post"> + <div class="input-group"> + <label for="email">Correo electrónico</label> + <input type="email" id="email" name="email" required> + </div> + <div class="input-group"> + <label for="password">Contraseña</label> + <input type="password" id="password" name="password" required> + </div> + <button type="submit">Ingresar</button> + </form> + </div> </body> </html> diff --git a/reporte-ventas.html b/reporte-ventas.html new file mode 100644 index 0000000..b6f7fb9 --- /dev/null +++ b/reporte-ventas.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html lang="es"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Reporte de Ventas</title> + <link rel="stylesheet" href="css/reporte-ventas.css"> +</head> +<body> + <h1>Reporte de Ventas</h1> + + <form id="formReporte"> + <label for="fecha_inicio">Desde:</label> + <input type="date" id="fecha_inicio" name="fecha_inicio" required> + + <label for="fecha_fin">Hasta:</label> + <input type="date" id="fecha_fin" name="fecha_fin" required> + + <button type="submit">Generar Reporte</button> + <button onclick="window.print();">Imprimir Reporte</button> + <a href="inicio.html"> + <button type="button" class="regresar-btn">Regresar</button> + </a> + </form> + + <h2>Resultados:</h2> + <table id="tablaReporte"> + <thead> + <tr> + <th>Fecha de Venta</th> + <th>Evento</th> + <th>Lugar</th> + <th>Asiento</th> + <th>Precio</th> + </tr> + </thead> + <tbody id="resultados"> + <tr><td colspan="5">No hay datos disponibles.</td></tr> + </tbody> + </table> + + + <script src="js/reporte-ventas.js"></script> +</body> +</html>