Código anterior de la aplicación
authorJem <joseemiliomori@wikimedia.es>
Mon, 21 May 2018 19:49:38 +0000 (21:49 +0200)
committerPlatonides <platonides@gmail.com>
Mon, 21 May 2018 20:11:21 +0000 (22:11 +0200)
html/gec.php [new file with mode: 0644]
html/img/info.gif [new file with mode: 0644]
html/img/wmes.png [new file with mode: 0644]
html/inscripcion.php [new file with mode: 0755]

diff --git a/html/gec.php b/html/gec.php
new file mode 100644 (file)
index 0000000..c13eebd
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+require_once ("wiki.php");
+
+function txtenlaces ($T, $DP) {
+    foreach ($DP["enlazar"] as $P => $E) {
+        if (strpos ($T, $P) !== FALSE) {
+            $T = str_replace ($P, "<a href=\"https://{$DP["web"]}/wiki/{$E}\" target=\"_blank\" title=\"{$E}\">{$P}</a>", $T);
+        }
+    }
+    return $T;
+}
+
+function infogrupo ($G, $DE, $DI, $DP, $DT) {
+    # Quitar condición con DI-grupo-G una vez migrado todo a los DE:
+    if ($DE["lugar"][$G]) {
+        $Info = ($DT[$DE["lugar"][$G]][3] ? "<a href=\"{$DT[$DE["lugar"][$G]][3]}\" target=\"_blank\">{$DT[$DE["lugar"][$G]][0]}</a>" : $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"));
+        if ($F != "N/D") $Info .= ", {$F} - {$DE["tiempo1"][$G]}";
+        if ($DE["extra"][$G]) $Info .= " - {$DE["extra"][$G]}";
+    } else {
+        $Info = $DI["grupo"][$G];
+    }
+    return $Info;
+}
+?>
\ No newline at end of file
diff --git a/html/img/info.gif b/html/img/info.gif
new file mode 100644 (file)
index 0000000..2acdca5
Binary files /dev/null and b/html/img/info.gif differ
diff --git a/html/img/wmes.png b/html/img/wmes.png
new file mode 100644 (file)
index 0000000..e357c33
Binary files /dev/null and b/html/img/wmes.png differ
diff --git a/html/inscripcion.php b/html/inscripcion.php
new file mode 100755 (executable)
index 0000000..8d4e8ed
--- /dev/null
@@ -0,0 +1,478 @@
+<?php
+# Pendiente:
+# Impresión de hoja de control de firmas para certificados
+# Impresión de lista de inscritos para uso de los monitores
+# Autobaja si no se valida en 24 h
+# Lista de espera si se agotan plazas
+# Admitir bajas
+
+# Ver futuras modificaciones; atención a email de contacto para creación de cuenta
+# Posibilidad de reinscripción en futuros eventos a los ya registrados de antes
+
+# Provisional hasta control de correos
+
+# print ("Mantenimiento, disculpad las molestias."); exit;
+
+require ("gec.php");
+/*
+error_reporting (E_ALL);
+ini_set ("display_errors", 1);
+//*/
+
+function plazas ($G, $Org, $DE, $DI) {         # Incluir información de lista de espera en su momento
+    $Plazas = $DE["plazas"][$G];
+    # Por separado porque el explode de un nulo devuelve un elemento
+    if ($DE["inscritos"][$G]) $Plazas -= count (explode (";", $DE["inscritos"][$G]));
+    if ($Plazas == 0) {
+        return "<span style=\"color:red\"><b>Sin plazas</b></span> - <span style=\"font-size:80%\">Te esperamos en futuras actividades de {$DI[$Org]}; marca la casilla inferior para recibir información</span>";
+    } else {
+        return $Plazas;
+    }    
+}
+
+function idioma ($I) {
+    $T = htmlspecialchars ($_SERVER["REQUEST_URI"]);
+    if (strpos ($T, "uselang=") !== FALSE) {
+        return preg_replace ("/uselang=\w+/", "uselang={$I}", $T);
+    } elseif (strpos ($T, "?") !== FALSE) {
+        return "{$T}&uselang={$I}";
+    } else {
+        return "{$T}?uselang={$I}";
+    }
+}
+
+if (!isset($_GET['e']) || !$_GET['e']) {
+    print ("Error. No se ha indicado ningún evento.");
+    exit;
+}
+$E = trim ($_GET['e'], "/");
+
+# Hasta arreglo definitivo...
+$EmailText = "<b>Email</b>";
+if (substr ($E, -10) == "-iespecial") {
+    $E = substr ($E, 0, -10);
+    $EmailOpc = TRUE; $EmailText = "Email";
+    unset ($DE["exigidos"]);
+}
+
+# $Email = ($E == "mensa" ? "info" : $E);
+
+$I = ($_GET["uselang"] ? $_GET["uselang"] : "es");
+$D0 = parsecfg ("jembot.0");
+$DD = parsecfg ("jembot.data");
+$DU = parsecfg ("jembot.usuarios");
+$DT = parsecfg ("jembot.entidades");
+$DE = parsecfg ("jembot.@{$E}");
+$DI = parsecfg ("jembot.{$I}");
+$P = ($DE["proyecto"] ? $DE["proyecto"] : "{$I}wiki");
+$DP = parsecfg ("jembot.{$P}");
+
+
+$Email = ($DE["contacto"] ? $DE["contacto"] : "info");
+
+# "Fallback" de idiomas para cuando no tenemos definido alguno de los mensajes
+if ($DI["idiomasec"]) {
+    $DS = parsecfg ("jembot.{$DI["idiomasec"]}");
+    $DI = array_merge ($DS, $DI);
+}
+
+$Dur = ($DE["duración"] ? $DE["duración"] : 30);
+if (($DE["cerrado"] || strtotime ("now") - strtotime ($DE["inicio"]) > $Dur * 24 * 3600) && $_GET["p"] != "-iespecial") {
+    header ("location:/inscripcion/sincont.php?evento={$E}");
+}
+
+# file_put_contents ("debug.log", print_r ($_GET, TRUE) . "RUI {$_SERVER["REQUEST_URI"]}\nRQS {$_SERVER["REDIRECT_QUERY_STRING"]}\nRS {$_SERVER["QUERY_STRING"]}\nRDU {$_SERVER["REDIRECT_URL"]}\nSN {$_SERVER["SCRIPT_NAME"]}");
+
+if ($_GET["g"]) {
+    foreach ($_GET["g"] as $G) {
+        $Grupos = array_merge ((array) $Grupos, preg_filter ("/^({$G})/", "$1", array_keys ($DE["plazas"])));
+    }
+} else {
+    $Grupos = array_keys ($DE["plazas"]);
+}
+
+$Edicion = ($DE["tipo"] == "editatón" || $DE["tipo"] == "taller de edición");
+$Exigidos = $DE["exigidos"];
+if ($Edicion) $Exigidos[] = "Cuenta";
+
+# Hasta arreglo definitivo traslado arriba
+# $EmailText = "<b>Email</b>";
+# Pendiente gestionar email también con $DE["exigidos"]
+switch ($_GET["p"]) {
+case "-iespecial":
+    $EmailOpc = TRUE; $EmailText = "Email";
+    unset ($Exigidos);
+    break;
+}
+
+$DNI = (in_array ("DNI", $Exigidos) ? "<b>{$DI["dni"]}</b>" : $DI["dni"]);
+$Nombre = (in_array ("Nombre", $Exigidos) ? "<b>{$DI["nombre"]}</b>" : $DI["nombre"]);
+$Apellido1 = (in_array ("Apellido1", $Exigidos) ? "<b>{$DI["apellido"]} 1</b>" : "{$DI["apellido"]} 1");
+$Apellido2 = (in_array ("Apellido2", $Exigidos) ? "<b>{$DI["apellido"]} 2</b>" : "{$DI["apellido"]} 2");
+$Sexo = (in_array ("Sexo", $Exigidos) ? "<b>{$DI["sexo"]}</b>" : $DI["sexo"]);
+$Edad = (in_array ("Edad", $Exigidos) ? "<b>{$DI["edad"]}</b>" : $DI["edad"]);
+$Cuenta = (in_array ("Cuenta", $Exigidos) ? "<b>{$DI["nombreusr"]}</b>" : $DI["nombreusr"]);
+
+$Org = ($DE["organizador"] ? $DE["organizador"] : "wmes");
+$Colab = array_merge ((array) $Org, (array) $DE["colaboradores"]);
+
+
+if (in_array ("Cuenta", $Exigidos)) {
+   $Cambios = array ("@fam@" => $DI[$DP["familia"]]);
+   $InfoAltErr = "<b>{$DI["importante"]}:</b> " . strtr ($DI["indicarcuenta"], $Cambios);
+   $CrearCuenta = strtr ($DI["crearcuenta"], $Cambios);
+   $CrearCuenta = preg_replace ("/@(.*?)@/", "<a href=\"https://{$DP["web"]}/wiki/Special:CreateAccount\" target=\"_blank\">$1</a>", $CrearCuenta);
+   $LinkForm = ($EMail == "info" ? "https://www.wikimedia.es/wiki/contacto" : "#");
+   $InfoCrear = "{$CrearCuenta} <a href=\"{$LinkForm}\" onClick=\"ec('{$Email}')\">{$DI["escribirnos"]}</a>.";
+   $Mensaje = $InfoAltErr . " " . $InfoCrear;
+}
+
+
+if ($_POST["Confirmado"] == "N") {     # Datos enviados
+    $GruposI = preg_filter ("/^_(.*)/", "$1", array_keys ($_POST));
+    if (! $GruposI) {
+        $Error[] = $DI["errw"]["nohorario"];
+    } elseif (count ($GruposI) > 20) {         # Reponer tras Glaming Madrid a 4
+        $Error[] = $DI["errw"]["maxhorarios"];
+    }
+
+    foreach (array ("Nombre", "Apellido1", "Apellido2", "DNI", "Sexo", "Edad", "Cuenta") as $C) {
+        if (! $_POST[$C] && in_array ($C, $Exigidos)) {
+             $Error[] = $DI["errw"]["no" . minus ($C)];
+             if ($C == "Cuenta") $Extra = $InfoCrear;
+        }
+    }
+    
+    $M = $_POST["Email"];
+    if (! filter_var ($M, FILTER_VALIDATE_EMAIL) && ($M || ! $EmailOpc)) {
+        $Error[] = $DI["errw"]["noemail"];
+    }  
+
+    $U = strtr ($_POST["Cuenta"], "_", " ");
+    if ($U) {
+            #Comprobar discrepancia en gender:
+            $D = api ("usuario", $U, $P);
+            
+            if (array_key_exists ("missing", $D)) {
+                $Error[] = $DI["errw"]["cuentanula"];
+                $Extra = $InfoCrear;
+            } elseif ($D["blockedby"]) {
+                $Error[] = $DI["errw"]["cuentabloqueada"];
+                $Extra = $InfoCrear;
+                file_put_contents ("inscripcion.log", gmdate ("Y-m-d H:i:s") . " * Intento de uso de la cuenta bloqueada {$U}\n", FILE_APPEND);
+            }
+    }
+    
+    if ($M || $U) {
+        foreach ($DE["inscritos"] as $Grupo => $Lista) {
+            if (in_array ($Grupo, $GruposI)) {
+                foreach (explode (";", $Lista) as $Cod) {
+                    if ($M && $DU[$Cod]["Email"] == $M) {
+                        $EmailRep++;
+                    } elseif ($U && $DU[$Cod]["Cuenta"] == $U) {
+                        $CuentaRep++;
+                    }
+                }
+            }
+        }
+        if ($EmailRep) $Error[] = "El correo electrónico {$M} ya ha sido indicado por " . (count ($Grupos) > 1 ? "alguien inscrito en " . singpl ("grupo", $EmailRep) . " de los seleccionados." : "otro inscrito.");
+        if ($CuentaRep) $Error[] = "La cuenta {$U} ya ha sido indicada por " . (count ($Grupos) > 1 ? "alguien inscrito en " . singpl ("grupo", $CuentaRep) . " de los seleccionados." : "otro inscrito.");
+    }
+
+    if (! $Error) {
+        if (! $DU["@"]) $DU["@"] = "A00X";
+        $Cod = sprintf ("%02d", substr ($DU["@"], 1, 2) + 1);
+        if ($Cod == "100") {
+            $Cod = chr (ord ($DU["@"][0]) + 1) . "00";
+        } else {
+            $Cod = $DU["@"][0] . $Cod;
+        }
+
+        $Letra = strtoupper (sinacentos (mb_substr ($U, 0, 1)));
+        if ($Letra < "A" || $Letra > "Z") $Letra = "X";
+        $Cod .= $Letra;
+        $DU["@"] = $Cod;
+
+        if ($EmailOpc & ! $M) {
+            $_POST["Confirmado"] = "OK";
+        } else {        
+            $Base = 111111111111111;
+            $Conf = gmdate ("YmdHis") . "-" . rand ($Base, $Base * 9);
+            $_POST["Confirmado"] = $Conf;
+        }
+        $_POST["Fecha"] = date ("Y-m-d");
+        $_POST["Comentarios"] = strtr ($_POST["Comentarios"], array ("\r\n" => " █ "));
+        $_POST["Cuenta"] = mayusprim (strtr ($_POST["Cuenta"], "_", " "));
+                            
+        foreach ($_POST as $Campo => $V) {
+            if ($Campo[0] == "_") {            # $V vale "on", pero no es necesario comprobarlo, solo se pasan los "on"
+                $GI = substr ($Campo, 1);
+                $DE["inscritos"][substr ($Campo, 1)] .= ($DE["inscritos"][substr ($Campo, 1)] ? ";" : "") . $Cod;
+            } else {
+                $DU[$Cod][$Campo] = $V;
+            }
+        }
+        
+        writecfg ("jembot.usuarios", $DU);
+        writecfg ("jembot.@{$E}", $DE);
+
+        $Marca = "-"; $Extra = "";
+        if ($EmailOpc && ! $M) {
+            print "<script>alert ('Inscripción finalizada correctamente; te esperamos en el evento.');</script>";
+        } else {
+
+#Desde la dirección de Internet {$_SERVER['REMOTE_ADDR']} se ha realizado
+            $Texto = <<<EOT
+Hola. Este es un mensaje automático del sistema de inscripciones de Wikimedia España.
+
+Se ha realizado una inscripción asociada a tu dirección de correo {$M} y a la cuenta de Wikipedia {$U} para nuestro evento {$DE["nombre"][$I]}.
+
+Si efectivamente la inscripción es tuya y es correcta, necesitamos que nos lo confirmes, para lo cual solo tienes que entrar en el siguiente enlace en las próximas 24 horas:
+
+https://www.wikimedia.es/inscripcion/confirmacion?c={$Cod}&k={$Conf}
+
+EOT;
+
+            if ($DE["página"][$P]) $Texto .= "\nLa información sobre este evento puedes encontrarla en: " . wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL) . "\n";
+
+            $Texto .= <<<EOT
+
+Si no te has inscrito, significa que otra persona ha usado tu dirección, y te pedimos disculpas por este mensaje; no necesitas hacer nada, eliminaremos los datos una vez pasadas 24 horas.
+
+Un saludo,
+
+Wikimedia España.
+EOT;
+            $R = mail ($M, "Wikimedia España - Confirmación de la inscripción para el evento: {$DE["nombre"][$I]}", $Texto, "From: {$Email}@wikimedia.es\r\nContent-Type: text/plain; charset=utf-8", "-f inscripciones@wikimedia.es");
+            if ($R) {
+                print "<script>alert ('Inscripción finalizada correctamente. Se te ha enviado un correo con un enlace para que confirmes la validez de tu dirección, lo cual deberás hacer en las próximas 24 horas. Te esperamos en el evento.');</script>";
+            } else {
+                print "<script>alert ('La inscripción ha sido correcta, pero se ha producido un error al enviar el correo de confirmación de tu dirección.\\nPor favor, escribe tú mismo un mensaje a {$Email}@wikimedia.es desde tu cuenta {$M} confirmando que has solicitado tu inscripción con ella. Te esperamos en el evento.');</script>";
+                $Marca = "*"; $Extra = " - Error al enviar correo para confirmación";
+            }
+        }
+        file_put_contents ("inscripcion.log", gmdate ("Y-m-d H:i:s") . " {$Marca} Alta de {$Cod} - {$U} - {$E} - " . implode (",", $GruposI) . $Extra . "\n", FILE_APPEND);
+        unset ($_POST);
+    } else {
+        $Mensaje = "<span style=\"color:red\"><b>" . singpl ("Error", count ($Error), FALSE) . ":</b> " . htmlspecialchars (implode (" ", $Error)) . "</span> {$Extra}";
+    }
+}
+
+# Vale tanto si el sexo o la edad son obligatorios como si no
+$ValSexo = ($_POST["Sexo"] ? $_POST["Sexo"] : 0);
+$CheckSexo[$ValSexo] = "CHECKED";
+$ValEdad = ($_POST["Edad"] ? $_POST["Edad"] : 0);
+$CheckEdad[$ValEdad] = "CHECKED";
+?>
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title><?= "{$DI["form"]} {$DI["wmes"]} - {$DE["nombre"][$I]}" ?></title>
+<LINK REL=stylesheet TYPE="text/css" HREF="/inscripcion/eventos.css">
+<script type="text/javascript">
+function ec (buzon) {                  // **** Falta generalizar a otros posibles dominios
+    window.location = 'ma' + 'i' + 'l' + 'to' + ':' + buzon + '@' + 'wikim' + 'edi' + 'a.e' + 's';
+    return false;
+}
+</script></head>
+<body>
+<table border=0><tr valign=top>
+<?php
+$Logo = (file_exists ("img/{$E}-logos-c.jpg") ? "{$E}-logos-c.jpg" : "{$Org}.png");
+print ("<td><a href=\"{$D0["l"][$Org]}\" target=\"_blank\"><img src=\"/inscripcion/img/{$Logo}\" width=\"150\" /></a></td>\n<td>");
+# <!-- style="margin: 0 3em 0 1em;" /></a>-->
+# Mejorar usando $DE["páginas"]
+
+print ("<p style=\"font-variant:small-caps;\"><span style=\"text-align:left\">{$DI["form"]} - <a href=\"{$D0["l"][$Org]}\" target=\"_blank\">{$DI[$Org]}</a>");
+if ($DE["idiomas"]) {
+  foreach ($DE["idiomas"] as $CodI) $LI[] = "<a href=\"" . idioma ($CodI) . "\">{$DD["idioma"][$CodI]}</a>";
+  print ("<span style=\"font-size:0.8em; background-color:gold; float:right\">" . implode ("&nbsp;&nbsp;", $LI) . "</span>");
+}
+print ("</p>\n<p>{$DI["evento"]}: <b>{$DE["nombre"][$I]}</b>. " . txtenlaces ($DE["descripción"][$I], $DP));
+if ($Edicion) {
+  if ($DE["avisodisp"] && $DE["avisodisp"] != "no") {
+    print ("</p>\n<p><b>{$DE["avisodisp"]}</b>.");
+  } elseif ($DE["avisodisp"] != "no") {
+    print ("</p>\n<p><b>{$DI["dispropio"]}</b>.");
+  }
+}
+print ("</p>\n<p>" . ($DE["página"][$P] ? " <a href=\"" . wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL) . "\" target=\"_blank\">{$DI["infocompleta"]}</a>" : "") . ($DE["hashtag"] ? " - Hashtag: <a href=\"https://twitter.com/hashtag/{$DE["hashtag"]}?f=tweets\" target=\"_blank\"><b>#{$DE["hashtag"]}</b></a>" : "") . "</p>");
+
+# Usamos current para no alterar $Grupos, que aún debe usarse luego
+if (count ($Grupos) == 1) {
+    print ("<p>" . infogrupo (current ($Grupos), $DE, $DI, $DP, $DT));
+    if ($DE["ocultarplazas"] != "sí") {
+       print ("&emsp;-&emsp;{$DI["plazas disponibles"]}: " . plazas (current ($Grupos), $Org, $DE, $DI));
+    }
+    print ("</p>\n");
+}
+if ($Org == "wmes") print ("<p>{$DI["asociadona"]}</p>");
+print ("</td>");
+
+$Img = ($_GET["i"] ? $_GET["i"] : $E);
+$Web = ($DE["web"] ? $DE["web"] : wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL));
+foreach (array ("jpg", "png") as $Ext) {
+    if (file_exists ("img/{$Img}.{$Ext}")) print ("<td><a href=\"{$Web}\" target=\"_blank\"><img src=\"/inscripcion/img/{$Img}.{$Ext}\" width=\"150\" /></a></td>");
+}
+?>
+</tr></table><br />
+<?php
+if ($DE["abierto"]) {
+    print ("<b>La inscripción a este evento " . ($DE["abierto"] == "no" ? "no se encuentra abierta todavía</b>. Puedes recibir más información <a href=\"https://www.wikimedia.es/wiki/contacto\" onClick=\"ec('info')\">{$DI["enviarmail"]}</a>." : "se abrirá el {$DE["abierto"]}</b>."));
+} else { 
+?>
+<FORM NAME=F ACTION="<?= htmlspecialchars ($_SERVER["REQUEST_URI"]) ?>" METHOD=POST>
+<INPUT TYPE=HIDDEN NAME=Confirmado VALUE="N" />
+<p><?= $DI["negoblig"] ?></p>
+<p><?= $Mensaje ?></p>
+<?php if ($DE["certificado"] != "no") { ?>
+    <p><i><?= $DI["infocertificado"] ?></i></p>
+<?php } ?>
+<TABLE BORDER=0 width=100% >
+<TR><TD width=27%><label for='Nombre'><?= $Nombre ?></label><TD><INPUT type="text" class="t" SIZE=60 MAXLENGTH="60" id='Nombre' NAME='Nombre' VALUE="<?php print htmlspecialchars($_POST["Nombre"]) ?>" />
+<TR><TD><label for='Apellido1'><?= $Apellido1 ?></label><TD><INPUT type="text" class="t" SIZE=48 MAXLENGTH="40" id='Apellido1' NAME='Apellido1' VALUE="<?php print htmlspecialchars($_POST["Apellido1"]) ?>" />
+<TR><TD><label for='Apellido2'><?= $Apellido2 ?></label><TD><INPUT type="text" class="t" SIZE=48 MAXLENGTH="40" NAME='Apellido2' VALUE="<?php print htmlspecialchars($_POST["Apellido2"]) ?>" />
+<?php if (in_array ("DNI", $Exigidos) || $DE["certificado"] != "no") { ?>
+    <TR><TD><label for='DNI'><?= $DNI ?></label><TD><INPUT type="text" class="t" SIZE=20 MAXLENGTH="20" NAME='DNI' VALUE="<?php print htmlspecialchars ($_POST["DNI"]) ?>" />
+<?php }
+if (! in_array ("Sexo", $DE["invisibles"])) { ?>
+<TR><TD><?= $Sexo ?> <img src="img/info.gif" title="<?= $DI["infosexo"] ?>"/><TD>
+   <INPUT TYPE=RADIO NAME=Sexo id='SexoF' VALUE=F <?= $CheckSexo["F"] ?>><label for='SexoF'><?= $DI["mujer"] ?> ♀</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Sexo id='SexoM' VALUE=M <?= $CheckSexo["M"] ?>><label for='SexoM'><?= $DI["hombre"] ?> ♂</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Sexo id='SexoO' VALUE=O <?= $CheckSexo["O"] ?>><label for='SexoO'><?= $DI["otrasid"] ?></label>&nbsp;&nbsp;&nbsp;&nbsp; 
+   <!--<INPUT TYPE=RADIO NAME=Sexo id='Sexo0' VALUE=0 <?= $CheckSexo["0"] ?>><label for='Sexo0'><?= $DI["noespecificado"] ?></label>-->
+<?php
+}
+if (! in_array ("Edad", $DE["invisibles"])) { ?>
+<TR><TD><?= $Edad ?><TD>
+<?php if ($E == "vmvg") { ?>
+   <INPUT TYPE=RADIO NAME=Edad id='EdadA' VALUE=16-24 <?= $CheckEdad["16-24"] ?>><label for='EdadA'>16-24</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadB' VALUE=25-30 <?= $CheckEdad["25-30"] ?>><label for='EdadB'>25-30</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadC' VALUE=31-54 <?= $CheckEdad["31-54"] ?>><label for='EdadC'>31-54</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadD' VALUE=55+ <?= $CheckEdad["55+"] ?>><label for='EdadD'>55+</label>&nbsp;&nbsp;&nbsp;&nbsp;
+<?php } else { ?>
+   <INPUT TYPE=RADIO NAME=Edad id='EdadA' VALUE=-20 <?= $CheckEdad["-20"] ?>><label for='EdadA'>0-20</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadB' VALUE=21-30 <?= $CheckEdad["21-30"] ?>><label for='EdadB'>21-30</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadC' VALUE=31-40 <?= $CheckEdad["31-40"] ?>><label for='EdadC'>31-40</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadD' VALUE=41-50 <?= $CheckEdad["41-50"] ?>><label for='EdadD'>41-50</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadE' VALUE=51-60 <?= $CheckEdad["51-60"] ?>><label for='EdadE'>51-60</label>&nbsp;&nbsp;&nbsp;&nbsp;
+   <INPUT TYPE=RADIO NAME=Edad id='EdadF' VALUE=61+ <?= $CheckEdad["61+"] ?>><label for='EdadF'>61+</label>&nbsp;&nbsp;&nbsp;&nbsp;
+<?php } ?>
+
+<?php
+}
+?>
+<TR><TD><label for='Email'><?= $EmailText ?></label><TD><INPUT type="text" class="t" SIZE=60 MAXLENGTH="60" id='Email' NAME='Email' VALUE="<?php print htmlspecialchars($_POST["Email"]) ?>" />
+<?php
+if (count ($Grupos) > 1) {
+    $MaxF = 1;
+    # Parche a eliminar:
+    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 ("<TR><TD COLSPAN=\"2\">{$DI["horarios y plazas"]}<br /><b><i>{$DI["marcacasillas"]}:</i></b><TABLE>");
+
+    foreach ($Grupos as $G) {
+        if ($LocAnt && $DT[$DE["lugar"][$G]][1] != $LocAnt) {
+            $MostrarLoc = TRUE;
+        }        
+        $LocAnt = $DT[$DE["lugar"][$G]][1];
+    }
+
+    foreach ($Grupos as $G) {
+        if ($_POST["_{$G}"]) $CheckGrupo[$G] = "CHECKED";
+        if (substr ($G, 0, 2) != $BloqueAnt) {
+            $Fila = 0;
+            $MaxF = max ($MaxF, count ($D[$Col++]));
+            $BloqueAnt = substr ($G, 0, 2);
+        }
+
+        $Plazas = plazas ($G, $Org, $DE, $DI);
+        $Disabled = (intval ($Plazas) == 0 ? "disabled" : "");
+        $Info = infogrupo ($G, $DE, $DI, $DP, $DT) . ($DE["ocultarplazas"] != "sí" ? " ({$Plazas})" : "");
+        $D[$Col][++$Fila] = "<INPUT TYPE=Checkbox NAME=\"_{$G}\" id=\"_{$G}\" {$CheckGrupo[$G]} {$Disabled}><label for=\"_{$G}\">{$Info}</label>";
+    }
+    $MaxF = max ($MaxF, count ($D[$Col++]));
+    
+    for ($F = 1; $F <= $MaxF; $F++) {
+        print ("\n<tr valign=top>");
+        for ($C = 1; $C <= $Col; $C++) {
+            print ("<td>" . $D[$C][$F]);
+        }
+    }
+    print ("</TABLE>");
+    
+} else {
+    print "<INPUT TYPE=HIDDEN NAME=\"_" . array_shift ($Grupos) . "\" VALUE=\"1\" />";
+}
+?>
+<TR style="background-color:#e8e8f8"><TD COLSPAN=2><i><?= ucfirst ($DI["en"]) . " {$DI[$DP["familia"]]} {$DI["hermanos"]}" ?>:</i>
+<TR style="background-color:#e8e8f8"><TD><label for='Cuenta'><?= $Cuenta ?></label>&emsp;<small>(
+<?php
+    print ("<a href=\"https://{$DP["web"]}/wiki/Special:CreateAccount\" target=\"_blank\">{$DI["crearla"]}</a>");
+?>)</small><TD><INPUT type="text" class="t" SIZE=60 MAXLENGTH="60" id='Cuenta' NAME='Cuenta' VALUE="<?= htmlspecialchars ($_POST["Cuenta"]) ?>" />
+<TR style="background-color:#e8e8f8"><TD><label for='Experiencia'><?= $DI["exprevia"] ?></label>
+    <td><SELECT id='Experiencia' NAME="Experiencia">
+<?php
+    $ValExp = ($_POST["Experiencia"] ? $_POST["Experiencia"] : "N/D");
+    $CheckExp[$ValExp] = "SELECTED";
+    print ("<OPTION VALUE='N/D' {$CheckExp['N/D']}>{$DI["noespecificada"]}");
+    for ($i = 0; $i <= 4; $i++) {
+        print ("<OPTION VALUE='{$i}' {$CheckExp[$i]}>{$DI["experiencia {$i}"]}");
+    }
+?></SELECT>
+<TR><TR><TR>
+<?php
+if ($DE["público"] != "no") {
+    $ValEnt = ($_POST["Enterado"] ? $_POST["Enterado"] : "N/D");
+    $CheckEnt[$ValEnt] = "SELECTED";
+    print ("<TR><TD><label for=\"Enterado\">{$DI["medioenterado"]}</label>\n<td><SELECT id=\"Enterado\" NAME=\"Enterado\">");
+    print ("<OPTION VALUE='N/D' {$CheckEnt['N/D']}>{$DI["noespecificado"]}");
+    for ($i = 1; $i <= 8; $i++) {
+        print ("<OPTION VALUE='{$i}' {$CheckEnt[$i]}>{$DI["medio {$i}"]}");
+    }
+    print ("</SELECT>");
+}
+
+foreach ($DE["preguntas"] as $Pregunta) {
+   $Opciones = explode (";", ($DE["pregunta-{$Pregunta}"][$I] ? $DE["pregunta-{$Pregunta}"][$I] : $DI["pregunta"][$Pregunta]));
+
+   print ("<TR><TD><label for=\"Preg-{$Pregunta}\">{$Opciones[0]}</label>:\n<td><select id=\"Preg-{$Pregunta}\" name=\"Preg-{$Pregunta}\">");
+   for ($i = 1; $i < count ($Opciones); $i++) {
+       $CheckOpc = ($_POST["Preg-{$Pregunta}"] == $i ? "SELECTED" : "");
+       print ("<OPTION value=\"{$i}\" {$CheckOpc}>" . mayusprim ($Opciones[$i]) . "</OPTION>");
+   }
+}
+print ("</SELECT>");
+
+foreach ($Colab as $C) {               # Ya no se admite diferenciar dentro de un mismo evento
+   print ("\n<TR><TD COLSPAN=2><INPUT TYPE=Checkbox id=\"RecibirInfo-{$C}\" NAME=\"RecibirInfo-{$C}\" /><label for=\"RecibirInfo-{$C}\">{$DI["infofutura"]} {$DI[$C]}</label>\n");
+}
+
+print ("\n<TR><TD><label for='Comentarios'>{$DI["comentarios"]}");
+if ($Edicion && $DE["tablas"][$P]) print ("<br /><span style=\"font-size:80%\"><i>" . preg_replace ("/#(.*?)#/", "<a href=\"" . wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL) ."\">$1</a>", $DI["nuevoart"]) . "</i></span>");
+print ("</label><TD COLSPAN=2><TEXTAREA ROWS=5 COLS=50 id='Comentarios' NAME=\"Comentarios\">" . htmlspecialchars ($_POST['Comentarios']));
+?>
+</TEXTAREA>
+</TABLE><br />
+
+<table width=100%>
+<tr><td><a href="https://www.wikimedia.es"><img src="img/wmes.png" width=100></a></td>
+<td>
+<!--
+<p class="lopd"><?= $DI["lopd 1"] ?></p>
+<p class="lopd"><?= preg_replace ("/@(.*?)@/", "<a href=\"https://www.wikimedia.es/wiki/contacto\" onClick=\"ec('info')\">$1</a>", $DI["lopd 2"]); ?></p>
+-->
+<p class="lopd">Antes de continuar, debes leer la siguiente información sobre protección de datos.
+El envío de los datos implica tu <b>consentimiento</b> para que los incluyamos en nuestro fichero “Contactos”.
+<ul>
+<li><i>Responsable:</i> Wikimedia España. <a href="pd.html">(más información)</a>
+<li><i>Finalidad:</i> Gestión de las actividades organizadas por o con la colaboración de la asociación. <a href="pd.html">(más información)</a>
+<li><i>Legitimación:</i> Consentimiento de la persona interesada. <a href="pd.html">(más información)</a>
+<li><i>Destinatarios:</i> No se cederán datos a terceros, salvo obligación legal. <a href="pd.html">(más información)</a>
+<li><i>Derechos:</i> Acceder, rectificar y suprimir los datos, así como otros derechos, como se explica en la <a href="pd.html">información adicional</a>.
+<li><i>Información adicional:</i> Puedes consultar nuestra <a href="pd.html">información adicional y detallada sobre Protección de Datos</a>.
+</ul></p>
+</td></tr></table>
+<?php } # Fin de la comprobación de apertura
+?>
+<center><input type="submit" value="<?= $DI["enviardatos"] ?>" /></center>
+</FORM>
+</body></html>
\ No newline at end of file