From 8da91d64298632bf667db4debc326d00b7fb21c7 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 22 May 2018 00:51:13 +0200 Subject: [PATCH] =?utf8?q?Localizaci=C3=B3n=20de=20las=20plazas?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- html/gec.php | 4 ++-- html/inscripcion.php | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/html/gec.php b/html/gec.php index c8c899c..1488cf3 100644 --- a/html/gec.php +++ b/html/gec.php @@ -10,9 +10,9 @@ function txtenlaces ($T, $DP) { return $T; } -function infogrupo ($G, $DE, $DI, $DP, $DT) { +function infogrupo ($G, $DE, $DI, $DP, $DT, $MostrarLoc) { # Quitar condición con DI-grupo-G una vez migrado todo a los DE: - if ($DE["lugar"][$G]) { + if (isset($DE["lugar"][$G])) { $Info = ($DT[$DE["lugar"][$G]][3] ? "{$DT[$DE["lugar"][$G]][0]}" : $DT[$DE["lugar"][$G]][0]); $Info .= ($MostrarLoc && $DT[$DE["lugar"][$G]][1] ? txtenlaces ($DT[$DE["lugar"][$G]][1], $DP) : ""); $F = fecha ($DE["tiempo0"][$G], $DI, array ("Hora", "Año")); diff --git a/html/inscripcion.php b/html/inscripcion.php index f53e395..ed382ea 100755 --- a/html/inscripcion.php +++ b/html/inscripcion.php @@ -396,11 +396,15 @@ if (count ($Grupos) > 1) { if ($E == "glmade") $DI["marcacasillas"] = "Marca la casilla del grupo que te interese, y solo esa (aunque puedes añadir la edición remota en cualquier caso)"; print ("{$DI["horarios y plazas"]}
{$DI["marcacasillas"]}:"); + $LocAnt = ""; + $MostrarLoc = false; foreach ($Grupos as $G) { - if ($LocAnt && $DT[$DE["lugar"][$G]][1] != $LocAnt) { - $MostrarLoc = TRUE; - } - $LocAnt = $DT[$DE["lugar"][$G]][1]; + if (isset($DE["lugar"][$G])) { + if ($LocAnt && $DT[$DE["lugar"][$G]][1] != $LocAnt) { + $MostrarLoc = TRUE; + } + $LocAnt = $DT[$DE["lugar"][$G]][1]; + } } foreach ($Grupos as $G) { @@ -413,7 +417,7 @@ if (count ($Grupos) > 1) { $Plazas = plazas ($G, $Org, $DE, $DI); $Disabled = (intval ($Plazas) == 0 ? "disabled" : ""); - $Info = infogrupo ($G, $DE, $DI, $DP, $DT) . ($DE["ocultarplazas"] != "sí" ? " ({$Plazas})" : ""); + $Info = infogrupo ($G, $DE, $DI, $DP, $DT, $MostrarLoc) . ($DE["ocultarplazas"] != "sí" ? " ({$Plazas})" : ""); $D[$Col][++$Fila] = ""; } $MaxF = max ($MaxF, count ($D[$Col++])); -- 2.30.2