<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>reservas online</title>
<link rel="stylesheet" href="css/reservas.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<h1>Haz tu Reserva</h1>
<div id="idiomas">
<nav id="gr" onClick="viajeIn()"></nav>
<style>
#gr{
background-image:url("css/imagenescss/gr.jpg");
height:50px;
width:50px;
border:solid;
webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;
}
</style>
<nav id="fr"onClick="viajeFr()"></nav>
<style>
#fr{
background-image:url("css/imagenescss/fr.jpg");
height:50px;
width:50px;
border:solid;
webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;
}
</style>
<nav id="al"onClick="viajeAl()"></nav>
<style>
#al{
background-image:url("css/imagenescss/al.jpg");
height:50px;
width:50px;
border:solid;
webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;
}
nav{
float:left;
margin-left:200px;
border:solid;
}
#al:hover,#gr:hover,#fr:hover{
height:55px;
width:55px;
color: lime;
opacity:0.6;
transition:0.9s;
}
</style>
</div>
<br><br><br>
<div id="wrapper" class="container">
<form name="causas" action="confirmar.php" method="post" enctype="multipart/form-data">
<fieldset legend="datos de reserva">
<p> <label for="nombre">Nombre</label>
<input type="text" name="nombre" placeholder="nombre"required>
<p> <label for="apellidos">Apellidos</label>
<input type="text" name="apellidos" placeholder="apellidos"required>
<p> <label for="email">Email</label>
<input type="email" name="email" placeholder="email"required>
<p> <label for="telefono">Teléfono</label>
<input type="tel" name="telefono" placeholder="teléfono"required>
<p> <label for="hora">Comida</label>
<input type="time" name="hora" max="16:00" min="13:00" "hora"required>
<p> <label for="hora">Cena</label>
<input id="tarde" type="time" name="horaDos" max="22:30" min="20:00" "hora"required>
<p> <label for="comensales">Comensales</label>
<input type="number" name="comensales" min="1" max="15"
placeholder="px" required><p> <label for="fecha">Fecha</label>
<input type="date" name="fecha" placeholder="fecha"required><p style="color:red": >Los Domingos estamos cerrados<br>Los Martes por la noche estamos cerrados</p> <br><br><br>
<p> <label for="nota">Haz un comentario</label>
<textarea class="nota"type="text" row="5" cols="50"name="nota" > </textarea>
<input type="submit" name="registrarse" value="ENVIAR">
<input type="reset" value="BORRAR">
<input type="checkbox" name="privacidad"required/>he leido y acepto la <a href="imagenes/CLAUSULA%20P%C3%81GINA%20WEB.pdf" target="_blank"> Politica de privacidad
</a> </fieldset>
</form>
</div>
<script>
document.querySelector("input[name=fecha]").addEventListener("change",function(){
x=new Date(this.value);
if (x.getDay()==0 ){
alert("Cambie la fecha, los domingos estamos cerrados");
this.value="";
}
});
</script>
<script>
const fecha=new Date(document.querySelector("input[name=fecha]").value);
if (fecha.getDay()==2 && fecha.getHours()>=16) {
alert("los martes por la noche estamos cerrados");
}
</script>
<script>
/*document.querySelector("input[name=fecha]").addEventListener("change",function(){
x=new Date(this.value);
if (x.getDate()<=23 && x.getDate()>=10){
alert("Cambie la fecha,esta semana estamos de vacaciones");
this.value="";
}
});*/
</script>
<script>
function viajeIn(){
location.href="basereservasingles.html";
document.getElementById("gr").click();
}
function viajeFr(){
location.href="basereservasfrances.html";
document.getElementById("fr").click();
}
function viajeAl(){
location.href="basereservasalemania.html";
document.getElementById("al").click();
}
</script>
</body>
</html>