commit e1233c76ccd05ce71c73dd8802c36063d4e7b16f Author: Brisa Date: Tue Jun 30 14:56:33 2026 -0300 config base del proyecto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c9c564 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Configuración local y credenciales +config.php \ No newline at end of file diff --git a/config_example.php b/config_example.php new file mode 100644 index 0000000..f7b31dc --- /dev/null +++ b/config_example.php @@ -0,0 +1,14 @@ += $apertura_dom && $hora_actual <= $cierre_dom) { + return "abierto"; + } + return "hora_cerrado"; + } + + // 4. REGLA AUTOMÁTICA: LUNES A SÁBADOS (Horario Partido) + // Turno Mañana: 08:30 a 13:30 + $manana_apertura = "08:30"; + $manana_cierre = "13:30"; + + // Turno Tarde/Noche: 17:30 a 21:00 + $tarde_apertura = "17:30"; + $tarde_cierre = "21:00"; + + // Validamos si la hora actual cae en el rango de la mañana O en el rango de la tarde + $esta_en_manana = ($hora_actual >= $manana_apertura && $hora_actual <= $manana_cierre); + $esta_en_tarde = ($hora_actual >= $tarde_apertura && $hora_actual <= $tarde_cierre); + + if ($esta_en_manana || $esta_en_tarde) { + return "abierto"; // ¡El local está operativo! + } + + return "hora_cerrado"; // Estamos en el bache de la siesta o ya cerró a la noche +} +?> \ No newline at end of file