Professional Documents
Culture Documents
FRANCISCO MORAZAN
(U.P.N.F.M)
Programa de Formación Permanente
(P.F.P.)
PROYECTO:
Espacio Pedagógico:
Alumnos:
JUAN FUNEZ
Cuenta:
Ingeniero:
FechaReservacion
Precio
Estadía
RESERVACIONES
Idhabitaciones
Idreservaciones
Idhuésped
Apellido 2
Apellido 1 Identidad
Edad
Nombre 2
Huésped
Nombre 1 Sexo
Idhuésped
Lugar de origen
Teléfono
Tipohabitacion
Idhabitaciones
3. DICCIONARIO DE DATOS HOTEL EMPERADOR
2.2- RESERVACION
Atributo Tipo de Dato Tamaño Observación
idreservacion int 11 ““
estadia int 11 ““
fechaReservacion date 11 ““
precio int 11 ““
Habitaciones_idhabitaciones int 11 ““
Huésped_idhuespede int 11 ““
2.3- huésped
Atributo Tipo de Dato Tamaño Observación
idhuesped int 11 ““
nombre1 varchar 45 ““
nombre2 varchar 45 ““
apellido1 varchar 45 ““
apellido varchar 45 ““
# identidad bigint 13 ““
# edad int 11 ““
lugarOrigen varchar 45 ““
teléfono int 8 ““
4. Español estructurado proyecto Hotel Emperador.
4.1 EN ARBOL
Huésped:
Masculino
SEXO: Masculino o Femenino M
SEXO
F
Femenino
HABITACIONES:
Sencillas
M
Tipo de
habitacion Dobles
Triples
V F
Hab 1
V F
Habitacion 2 Hab 2
V F
Habitacion2
Hab 3
V
Hab 3 F
V F
Hab4
V F
Hab5
V
Habitacion 3
Habitacion3
V
Hab 6 F
V F
Hab7
V F
Hab8
Habitacion 4
Habitacion4
V
Hab 9 F
V F
Hab10
V F
Hab11
V
Habitacion 5
Habitacion5
V
Hab 12 F
V F
Hab13
V F
Hab14
V
Habitacion 6
Habitacion6
V
Hab 12 F
V F
Hab13
V F
Hab14
V
Habitacion 7
Habitacion7
V
Hab 15 F
V F
Hab16
V F
Hab17
Habitacion 8
Habitacion8
V
Hab 18 F
V F
Hab19
V F
Hab20
V
5. PANTALLAS DE ENTRADA
Formulario de Modificar
6. PANTALLA DE SALIDA
Tipo de Consultas
7. MANUAL TÉCNICO
7.1 FORMULARIO MENU
CÓDIGO PARA INGRESAR AL FORMULARIO DE HOTEL EMPERADOR DESDE MENU:
<!DOCTYPE html>
<html lang="es" >
<!---->
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<!---->
<body >
<form>
<h1><b><font size="15"><center>Hotel Emperador</center></font></b></h1>
<div class="contentform">
</div>
</form>
</body>
<!---->
</html>
<?php
$elnombre1=$_POST["nombre1"];
$elnombre2=$_POST["nombre2"];
$elapellido1=$_POST["apellido1"];
$elapellido2=$_POST["apellido2"];
$elsexo=$_POST["sexo"];
$laidentidad=$_POST["identidad"];
$eltelefono=$_POST["telefono"];
$eledad=$_POST["edad"];
$elorigenCliente=$_POST["origenCliente"];
//----------------------------------------
$elnumhabitacion=$_POST["habitacion"];
//----------------------------------------
$elestadia=$_POST["estadia"];
//----------------------------------------
$elfechares=$_POST["fechaRes"];
$elvalor=$_POST["valor"];
//----------------------------------------
include "conexion.php";
//----------------------------------------------------------------------------------------
---------
$conexion=null;
if ($conexion==null)
{
header("Location:menu.html");
}
?>
CÓDIGO PARA MODIFICAR DESDE EL FORMULARIO:
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form action="modificar1.php" method="post">
<h1><center> <b>Formulario de Modificacion</b></center></h1>
<div class="contentform">
<input type="button" onclick="location.href='menu.html'; " value="REGRESAR" target="_blank"
class="bouton-e">
<div class="leftcontact">
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
<!—
<?php
include 'conexion.php';
//CONSULTA PARA SELECCIONAR SOLO LAS HABITACIONES DONDE SU ESTADO SEA
"DISPONIBLE"
$query = "SELECT * FROM proyectohotel.huesped ";
$result = $conexion->query($query);
?>
<!-- OPTGROUP DONDE SE INGRESAN LOS RESULTADOS DE LA CONSULTA--
>
<label for="huesped">Huesped</label>
<br>
<br>
<!-- ESTE ES EL ID QUE SE USA PARA EL METODO POST-->
<select id="huesped" name="huesped">
<?php
while ( $row = $result->fetch_array() )
{
?>
<div class="optgroup">
<!—
SOLAMENTE SE MODIFICARAN LOS DATOS QUE RESPONDEN A UN ESPACIO DE LA BASE DE
DATOS.
Por ejemplo: 'numHabitacion' es la columna de la tabla que estamos llamando desde la
base de datos.
-->
<option value=" <?php echo $row['idhuesped'] ?> " >
<?php echo "Nom: ".$row['nombre1']." ".$row['apellido2']; ?>
</option>
</div>
<?php
}
?>
</select>
<?php
?>
<br>
<br>
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
</div>
<div class="rightcontact">
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
<!—
CODIGO PARA MOSTRAR SOLO LAS HABITACIONES DISPONIBLES EN UN OPTGROUP (grupo de
opciones).
<?php
include 'conexion.php';
$result = $conexion->query($query);
?>
<!--
===============================================================================
=== -->
<!--
===============================================================================
=== -->
</div>
</form>
</html>
<?php
include "conexion.php";
//----------------------------------------------------------------------------------------
---------
//----------------------------------------------------------------------------------------
---------
$conexion=null;
if ($conexion==null)
{
header("Location:menu.html");
}
?>
<input type="button"
onclick="document.location.href='mostrarHuespedes.php';" value="Huéspedes por Habitación
Ocupada" target="_blank" class="bouton-e">
<input type="button"
onclick="document.location.href='mostrarHuespedes2.php';" value="Lista de Huespedes por
Habitación Ocupada" target="_blank" class="bouton-e">
<input type="button"
onclick="document.location.href='mostrarHuespedes3.php';" value="Lista de Huespedes"
target="_blank" class="bouton-e">
<input type="button"
onclick="document.location.href='mostrarHuespedes4.php';" value="Venta Total por
Habitaciones Ocupadas" target="_blank" class="bouton-e">
<input type="button"
onclick="location.href='mostrarHuespedes5.html';" value="Venta Total por Mes"
target="_blank" class="bouton-e">
<input type="button"
onclick="location.href='mostrarHuespedes6.html';" value="Número de habitaciones ocupadas
por fecha" target="_blank" class="bouton-e">
</div>
</form>
</body>
<!---->
</html>
CÓDIGO PARA MOSTRAR HUESPEDES.PHP DESDE MENU:
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Huespedes por Habitacion Ocupada</b></center></h1>
<div class="contentform">
<br>
<br>
<center>
?>
</div>
</center>
</div>
</form>
</html>
<!DOCTYPE html>
<html lang="es" >
<!---->
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<!---->
<body >
<form action="mostrarHuespedes1.php" method="POST">
<h1><b><font size="15"><center>Hotel Emperador</center></font></b></h1>
<div class="contentform">
</div>
</form>
</body>
<!---->
</html>
CÓDIGO PARA MOSTRAR HUESPEDES1, PHP DESDE MENU:
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Habitacion Ocupada</b></center></h1>
<div class="contentform">
<br>
<br>
<center>
<div style="height:300px;width:500px;border:1px solid #ccc;font:16px/26px Georgia, Garamond,
Serif;overflow:auto;">
<?php
include "conexion.php";
$elnumhab=$_POST["numhab"];
</form>
</html>
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Huespedes</b></center></h1>
<div class="contentform">
<br>
<br>
<center>
?>
</div>
</center>
</div>
</form>
</html>
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Huespedes</b></center></h1>
<div class="contentform">
<br>
<br>
<center>
<div style="height:300px;width:500px;border:1px solid #ccc;font:16px/26px Georgia, Garamond,
Serif;overflow:auto;">
<?php
include "conexion.php";
?>
</div>
</center>
</div>
</form>
</html>
CÓDIGO PARA MOSTRAR HUESPEDES4. PHP DESDE MENU:
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Venta Total por Habitaciones ocupadas</b></center></h1>
<div class="contentform">
<br>
<br>
<center>
?>
</div>
</center>
</div>
</form>
</html>
<!DOCTYPE html>
<html lang="es" >
<!---->
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<!---->
<body >
<form action="mostrarHuespedes5.php" method="POST">
<h1><b><font size="15"><center>Hotel Emperador</center></font></b></h1>
<div class="contentform">
<div class="optgroup">
<p>Mes</p>
<select id="mes" name="mes">
<optgroup label="mes">
<option value="1">Enero</option>
<option value="2">Febrero</option>
<option value="3">Marzo</option>
<option value="4">Abril</option>
<option value="5">Mayo</option>
<option value="6">Junio</option>
<option value="7">Julio</option>
<option value="8">Agosto</option>
<option value="9">Septiembre</option>
<option value="10">Octubre</option>
<option value="11">Noviembre</option>
<option value="11">Diciembre</option>
</optgroup>
</select>
</div>
</div>
</form>
</body>
<!---->
</html>
CÓDIGO PARA MOSTRAR HUESPEDES5. PHP DESDE MENU:
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Suma de Venta por Ocupadas</b></center></h1>
<div class="contentform">
<br>
<br>
<center>
<!DOCTYPE html>
<html lang="es" >
<!---->
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<!---->
<body >
<form action="mostrarHuespedes6.php" method="POST">
<h1><b><font size="15"><center>Hotel Emperador</center></font></b></h1>
<div class="contentform">
<!—
<div class="form-group">
<p>Fecha</p>
<input type="date" name="fecha" id="fecha" data-rule="required" />
</div>
</div>
</form>
</body>
<!---->
</html>
<!DOCTYPE html>
<html lang="es" >
<head>
<meta charset="UTF-8">
<title>Hotel Emperador</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<h1><b>Hotel Emperador</b></h1>
<form>
<h1><center> <b>Número de habitaciones ocupadas por fecha</b></center></h1>
<?php
include 'conexion.php';
?>
<select>
<?php
while ( $row = $result->fetch_array() )
{
?>
<?php
}
?>
</select>
<?php
?>
8.- Manual de usuario
Viñeta de menú, sirve para ir al menú de formulario de ingreso
en el cual se hacen las reservaciones en el sistema,
Segundo apellido
Fecha de reservación, la fecha en
que se hace la reservación