</div> </div> </div> </div> </div> </div> <?php } else { $errors = 0; if (isset($_POST["guardar"])) { include_once './accionesEventos.php'; $_SESSION['error']['evento'] = null; $_SESSION['error']['evento'] = array(); $errors = 0; $errors += validar_fecha($_POST['fecha']); $errors += validar_nombre($_POST['name']); $errors += validar_descripcion_evento($_POST['description']); if ($errors == 0) { $date = cambiar_formato_fecha_guardar($_POST['fecha']); editar_evento($_POST['name'], $_POST['description'], $date, $_SESSION['idevento']); } } else { if ($errors != 0) { header("location: editarevento.php"); } // header("location: miseventos.php"); } } } else { header("location: login.php");
include "\\View\\form_insert.php"; } else { $patronTLF = '/^[9|6|7][0-9]{8}$/'; $patronCP = '/[0-9]{5}/'; //Comprobamos que los campos cumplan su formato y no esten vacios. $descripcion = $_POST['Descr']; if ($descripcion == "") { $HayError = true; $errores['Descr'] = "Error en el campo descripcion."; } $nombre = $_POST['nombre']; if ($nombre == "") { $HayError = true; $errores['nombre'] = "Error en el campo Nombre."; } if (!isset($_POST['fecha_f']) || validar_fecha($_POST['fecha_f'])) { $HayError = true; $errores['fecha_f'] = "Error en el campo Fecha Fin. Formato fecha dd/mm/yyyy"; } $pro = $_POST['provincia']; if ($pro == "") { $HayError = true; $errores['provincia'] = "Error en el campo Provincia."; } if (!isset($_POST['ESTADO'])) { $HayError = true; $errores['ESTADO'] = "Error en el campo Estado."; } $correo = $_POST['correo']; if ($correo == "") { $HayError = true;