<? } }else {} //rellenar(); } else{ rellenar();} }else { rellenar(); } function ningunovacio(){ if($_POST["element_2"] and $_POST["element_3"] and $_POST["element_4"] and $_POST["element_5"] and $_POST["element_7"] and $_POST["element_8"] and $_POST["element_9"] and $_POST["element_10"] and $_POST["element_11"] and $_POST["element_13"] and $_POST["element_15"] and $_POST["element_16"] and $_POST["element_18"] and $_POST["element_19"] and $_POST["element_22"] and $_POST["element_23"] and $_POST["element_25"]) return true; else return false; } ?>
<?php require_once 'minilibreria.php'; // Se procesan los parámetros que llegan por post. $nombre = $_POST["nombre_usuario"]; $contrasena = $_POST["contrasena"]; $contrasena2 = $_POST["contrasena2"]; $email = $_POST["correo_electronico"]; $sexo = $_POST["sexo"] == "hombre" ? "hombre" : "mujer"; $fecha = ""; if (is_numeric($_POST["dia"]) && is_numeric($_POST["mes"]) && is_numeric($_POST["ano"])) { $fecha = checkdate($_POST["mes"], $_POST["dia"], $_POST["ano"]) ? $_POST["ano"] . "-" . rellenar($_POST["mes"], "0", 2) . "-" . rellenar($_POST["dia"], "0", 2) : ""; } $pais = $_POST["pais"]; $ciudad = $_POST["ciudad"]; // Se comprueban los parámetros. if (ENUsuario::existePorNombre($nombre)) { header("location: registrarse.php?error=Ya existe un usuario con el nombre {$nombre}."); exit; } else { if ($contrasena != $contrasena2) { header("location: registrarse.php?error=Las contraseñas no coinciden."); exit; } else { if ($fecha == "") { header("location: registrarse.php?error=La fecha no es válida."); exit; } else { if (ENPais::obtenerPorId($pais) == null) { header("location: registrarse.php?error=El país introducido no es válido."); exit;
<?php include_once "base.php"; baseSuperior("Resultados de la búsqueda"); ?> <div id="resultados"> <h3><span>Resultados de la búsqueda</span></h3> <div> <?php $titulo = $_GET["titulo"]; $dia = $_GET["dia"]; $mes = $_GET["mes"]; $ano = $_GET["ano"]; $fecha = checkdate($mes, $dia, $ano) ? "{$ano}-" . rellenar($mes, "0", 2) . "-" . rellenar($dia, "0", 2) . "" : ""; $segmento = $_GET["segmento"]; $antes = $segmento == "antes" ? true : false; $pais = $_GET["pais"]; $fotos = ENFoto::obtenerBusqueda($titulo, $fecha, $antes, $pais); ?> <p> Se han encontrado <?php echo count($fotos); ?> resultados que contienen la secuencia <em>"<?php echo $titulo; ?> "</em>. <?php // Calculamos la cadena según si se especificó el país. if ($pais != null) { if (is_numeric($pais)) {