$DT = parsecfg ("jembot.entidades");
$DE = parsecfg ("jembot.@{$E}");
$DI = parsecfg ("jembot.{$I}");
-$P = ($DE["proyecto"] ? $DE["proyecto"] : "{$I}wiki");
+$P = ($DE["proyecto"] ?? "{$I}wiki");
$DP = parsecfg ("jembot.{$P}");
-$Email = ($DE["contacto"] ? $DE["contacto"] : "info");
+$Email = ($DE["contacto"] ?? "info");
# "Fallback" de idiomas para cuando no tenemos definido alguno de los mensajes
-if ($DI["idiomasec"]) {
+if (!empty($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") {
+$Dur = ($DE["duración"] ?? 30);
+if ((!empty($DE["cerrado"]) || strtotime ("now") - strtotime ($DE["inicio"]) > $Dur * 24 * 3600) && isset($_GET["p"]) && $_GET["p"] != "-iespecial") {
header ("location:/inscripcion/sincont.php?evento={$E}");
}
$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");
+$Org = ($DE["organizador"] ?? "wmes");
$Colab = array_merge ((array) $Org, (array) $DE["colaboradores"]);
}
}
- $M = $_POST["Email"];
+ $M = $_POST["Email"] ?? "";
if (! filter_var ($M, FILTER_VALIDATE_EMAIL) && ($M || ! $EmailOpc)) {
$Error[] = $DI["errw"]["noemail"];
}
print ("</td>");
$Img = ($_GET["i"] ?? $E);
-$Web = ($DE["web"] ? $DE["web"] : wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL));
+$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"]) {
+if (!empty($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 {
?>
?></SELECT>
<TR><TR><TR>
<?php
-if ($DE["público"] != "no") {
+if (isset($DE["público"]) && $DE["público"] != "no") {
$ValEnt = ($_POST["Enterado"] ?? "N/D");
$CheckEnt[$ValEnt] = "SELECTED";
print ("<TR><TD><label for=\"Enterado\">{$DI["medioenterado"]}</label>\n<td><SELECT id=\"Enterado\" NAME=\"Enterado\">");
}
foreach ($DE["preguntas"] as $Pregunta) {
- $Opciones = explode (";", ($DE["pregunta-{$Pregunta}"][$I] ? $DE["pregunta-{$Pregunta}"][$I] : $DI["pregunta"][$Pregunta]));
+ $Opciones = explode (";", ($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++) {