cookies
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="estilos.css" />
|
||||
<?php
|
||||
echo $_COOKIE['tema'] === 'claro' ? '<link rel="stylesheet" type="text/css" href="estilos_claro.css" />'
|
||||
: '<link rel="stylesheet" type="text/css" href="estilos.css" />' ?>
|
||||
<title>Busqueda y eliminacion de registros</title>
|
||||
</head>
|
||||
|
||||
@@ -83,7 +85,7 @@
|
||||
{
|
||||
return "<form method=\"POST\" style=\"border: none; padding:0.2rem; min-width: auto; margin:0\">
|
||||
<input type=\"hidden\" name=\"idReserva\" value=\"$idReserva\" style=\"border: none; padding:0; min-width: auto; margin:0\">
|
||||
<input type=\"submit\" name=\"borrar\" value=\"Eliminar\" style=\"border: none; background-color:#5e1622; cursor: pointer; padding:0.2rem 0.4rem; min-width: auto; margin:0\">
|
||||
<input type=\"submit\" name=\"borrar\" value=\"Eliminar\" style=\"cursor: pointer; padding:0.2rem 0.4rem; min-width: auto; margin:0\">
|
||||
</form>";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
p{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
table {
|
||||
width:80%;
|
||||
min-width:350px;
|
||||
margin:auto;
|
||||
background-color: #ffffff;;
|
||||
border:2px solid #9d2236;
|
||||
color:#9d2236;
|
||||
}
|
||||
|
||||
td,th {
|
||||
text-align: center;
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #9d2236;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
form,div {
|
||||
width:80%;
|
||||
min-width:350px;
|
||||
background-color: #ffffff;
|
||||
border:2px solid #9d2236;
|
||||
padding:10px;
|
||||
box-sizing:border-box;
|
||||
color:#9d2236;
|
||||
font-size:18px;
|
||||
margin:auto;
|
||||
margin-top: 20px;
|
||||
|
||||
}
|
||||
|
||||
fieldset {
|
||||
background-color: #ffffff;
|
||||
border:2px solid #9d2236;
|
||||
padding:10px;
|
||||
box-sizing:border-box;
|
||||
|
||||
}
|
||||
|
||||
#flex {
|
||||
display:flex;
|
||||
justify-content:space-between;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-right:10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
input {
|
||||
color:#9d2236;
|
||||
background-color: #ffffff;
|
||||
border:2px solid #9d2236;
|
||||
padding: 2px;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
legend {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
margin:10px;
|
||||
}
|
||||
select,option {
|
||||
color:#9d2236;
|
||||
background-color: #ffffff;
|
||||
border:2px solid #9d2236;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background-color: #ffffff;
|
||||
width:100%;
|
||||
height:200px;
|
||||
color:#9d2236;
|
||||
border:2px solid #9d2236;
|
||||
padding:10px;
|
||||
box-sizing:border-box;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
input[type=submit], input[type=button],input[type=reset] {
|
||||
background-color: #ffffff;
|
||||
color:#9d2236;
|
||||
font-size: 16px;
|
||||
font-weight: lighter;
|
||||
margin-top: 10px;
|
||||
padding: 5px;
|
||||
border:2px solid #9d2236;
|
||||
border-radius:5px;
|
||||
box-shadow: 1px 2px 3px #000;
|
||||
|
||||
}
|
||||
|
||||
/* Media query para pantallas de menos de 450 píxeles de ancho */
|
||||
@media (max-width: 450px) {
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#flex {
|
||||
flex-wrap:wrap;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
textarea {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
table {
|
||||
display: block;
|
||||
width: 80%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -5,7 +5,9 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Reservas hotel</title>
|
||||
<link rel="stylesheet" type="text/css" href="estilos.css" />
|
||||
<?php
|
||||
echo $_COOKIE['tema'] === 'claro' ? '<link rel="stylesheet" type="text/css" href="estilos_claro.css" />'
|
||||
: '<link rel="stylesheet" type="text/css" href="estilos.css" />' ?>
|
||||
<script>
|
||||
// Función obtener() que realizará la captación de datos,los cálculos y la escritura del mensaje de info
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
1709555328_6286/_/Marcos Lopez Gomez/_/marklogo@gmail.com/_/649348375/_/2024-03-08/_/2024-03-21/_/04-03-2024 12:28:48/_/13
|
||||
1709555366_8127/_/Marcos Lopez Gomez/_/marklogo1@gmail.com/_/649348375/_/2024-03-05/_/2024-03-10/_/04-03-2024 12:29:26/_/5
|
||||
1709632003_8349/_/Marcos Lopez Gomez/_/marklogo1@gmail.com/_/649348375/_/2024-03-14/_/2024-03-21/_/05-03-2024 09:46:43/_/7
|
||||
|
||||
@@ -1,14 +1,37 @@
|
||||
<?php
|
||||
// Leer cookies
|
||||
$tema = isset($_COOKIE['tema']) ? $_COOKIE['tema'] : 'oscuro';
|
||||
if ($_SERVER["REQUEST_METHOD"] == "GET" && !empty($_GET)) {
|
||||
$tema = $_GET['tema'];
|
||||
setcookie("tema", $tema, time() + (86400 * 30), "/");
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="estilos.css" />
|
||||
<?php
|
||||
echo $tema === 'claro' ? '<link rel="stylesheet" type="text/css" href="estilos_claro.css" />'
|
||||
: '<link rel="stylesheet" type="text/css" href="estilos.css" />' ?>
|
||||
<title>Login</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<h3>Seleccione su tema preferido</h3>
|
||||
<form method="get">
|
||||
<label for="claro">Tema Claro</label>
|
||||
<input style="min-width: auto;" type="radio" id="claro" name="tema" value="claro" <?php echo $tema === 'claro' ? 'checked' : '' ?>>
|
||||
<label for="oscuro">Tema Oscuro</label>
|
||||
<input style="min-width: auto;" type="radio" id="oscuro" name="tema" value="oscuro" <?php echo $tema === 'oscuro' ? 'checked' : '' ?>> <br>
|
||||
<input type="submit" value="Guardar">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Login de usuario</h2>
|
||||
<form method="post">
|
||||
|
||||
@@ -4,17 +4,25 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="estilos.css" />
|
||||
<?php
|
||||
echo $_COOKIE['tema'] === 'claro' ? '<link rel="stylesheet" type="text/css" href="estilos_claro.css" />'
|
||||
: '<link rel="stylesheet" type="text/css" href="estilos.css" />' ?>
|
||||
<title>Perfil de cliente</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
// Leer cookies
|
||||
$contador = isset($_COOKIE['contador']) ? $_COOKIE['contador'] : 1;
|
||||
setcookie("contador", $contador + 1, 0, "/");
|
||||
|
||||
session_start();
|
||||
$nombre_usuario = $_SESSION['nombre'];
|
||||
$tipo_usuario = $_SESSION['tipo'];
|
||||
$email_usuario = $_SESSION['email'];
|
||||
echo "<div>
|
||||
<h2>Bienvenido $nombre_usuario </h2>
|
||||
<span>Has visitado la pagina $contador veces.</span> <br>
|
||||
<a href=\"logout.php\">Cerrar session</a>
|
||||
</div> <br>";
|
||||
busqueda($email_usuario);
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="estilos.css" />
|
||||
<?php
|
||||
echo $_COOKIE['tema'] === 'claro' ? '<link rel="stylesheet" type="text/css" href="estilos_claro.css" />'
|
||||
: '<link rel="stylesheet" type="text/css" href="estilos.css" />' ?>
|
||||
<title>Reservas Hotel!!!</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="estilos.css" />
|
||||
<?php
|
||||
echo $_COOKIE['tema'] === 'claro' ? '<link rel="stylesheet" type="text/css" href="estilos_claro.css" />'
|
||||
: '<link rel="stylesheet" type="text/css" href="estilos.css" />' ?>
|
||||
<title>Registro de personal de hotel</title>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Id reserva: 1709632003_8349
|
||||
Fecha de reserva: 05-03-2024 09:46:43
|
||||
Fecha de entrada: 2024-03-14
|
||||
Fecha de salida: 2024-03-21
|
||||
Tipo de habitación: simple
|
||||
Regimen de alojamiento: desayuno
|
||||
Días Spa: 0
|
||||
Días Guia: 0
|
||||
Duración estancia: 7
|
||||
Coste Total: 719.95
|
||||
Nombre: Marcos Lopez Gomez
|
||||
Correo electrónico: marklogo1@gmail.com
|
||||
Teléfono: 649348375
|
||||
DNI: 33340763D
|
||||
Reference in New Issue
Block a user