This commit is contained in:
2023-08-08 17:04:21 +00:00
parent 31ecda89b2
commit ec382e989a
147 changed files with 18206 additions and 18063 deletions

View File

@@ -1,28 +1,28 @@
<?php
header('Content-Type: application/json');
$ruta = "../";
require_once("../include/bd_pdo.php");
$grupo = isset($_GET['grupo']) ? $_GET['grupo'] : 1;
$grupo_horarios = $db->querySingle(
"WITH bloques AS (
SELECT id, hora_inicio, hora_fin
FROM public.bloque_horario
WHERE grupo = ?
ORDER BY hora_inicio ASC
)
SELECT json_agg(json_build_object(
'id', id,
'hora_inicio', hora_inicio,
'hora_fin', hora_fin,
'selected', current_time between hora_inicio and hora_fin
)) AS bloque_horario
FROM bloques
",
[$grupo]
)['bloque_horario'];
echo $grupo_horarios;
<?php
header('Content-Type: application/json');
$ruta = "../";
require_once("../include/bd_pdo.php");
$grupo = isset($_GET['grupo']) ? $_GET['grupo'] : 1;
$grupo_horarios = $db->querySingle(
"WITH bloques AS (
SELECT id, hora_inicio, hora_fin
FROM public.bloque_horario
WHERE grupo = ?
ORDER BY hora_inicio ASC
)
SELECT json_agg(json_build_object(
'id', id,
'hora_inicio', hora_inicio,
'hora_fin', hora_fin,
'selected', current_time between hora_inicio and hora_fin
)) AS bloque_horario
FROM bloques
",
[$grupo]
)['bloque_horario'];
echo $grupo_horarios;