<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Openalfa - Formulario de validación de usuario</title>
</head>
<body>
<table border='0px' width="100%" height="250px">
<tr>
<td colspan='2' style="background:url('fondo.jpg');">
</td>
</tr>
</table>
</body>
</html>
principal:
<!doctype html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Openalfa - Formulario de validación de usuario</title>
</head>
<body>
<form action="registro.php" method="POST">
<fieldset>
<table>
<tr>
<td>
Usuario
</td>
<td>
<input id="username" type="text" name="username" size="18"/>
</td>
</tr>
<tr>
<td>
Contrasena
</td>
<td>
<input id="passwd" type="password" name="password" size="18"/>
</td>
</tr>
<tr>
<td colspan="2">
<br>
<input type="submit" name="Submit" class="button" value="Identificarse"/>
</td>
</tr>
</table>
</fieldset>
</form>
<br>
<a href="index.php?id=2">TEMA</a>
</body>
</html>
body:
<!doctype html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Openalfa - Formulario de validación de usuario</title>
</head>
<body bgcolor text="black">
<table width="100%">
<tr>
<td width="100%" height="400px" style="vertical-align: top;">
<center>
<h1>NOMBRE</h1>
<h2>Mercy López</h2>
<h1>DIRECCIÓN</h1>
<h2>Av.Coronel Francisco Carrasco y Azuay </h2>
<h1>TELÉFONO</h1>
<h2>0979344805</h2>
</center>
</td>
</tr>
</table>
</body>
</html>
otro:
<!doctype html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Openalfa - Formulario de validación de usuario</title>
</head>
<body bgcolor text="black">
<table width="100%">
<tr>
<td width="100%" height="400px" style="vertical-align: top;">
<center>
<?php
if (isset($_SESSION["user"])){
echo "USUARIO:".$_SESSION["user"];
}
?>
<h1>DEBER</h1>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<h2><a href="index.php?id=1">CERRAR</a></h2>
</center>
</td>
</tr>
</table>
</body>
</html>
pie:
<html>
<head>
<title> Contenido </title>
<style type='text/css'>
</style>
</head>
<body>
<center>
<hr>
<font color="blue">
Nombre: Mercy Lopez<br>
Todos los derechos reservados!!!
</font>
</center>
</body>
</html>
registro:
<?php
session_start();
$name=$_POST['username'];
$pass=$_POST['password'];
if ($name=="mercylopez27@hotmail.com" && $pass="1234"){
$_SESSION["user"]=$name;
header ("Location: index.php?id=3");
}
?>
log:
<!doctype html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Openalfa - Formulario de validación de usuario</title>
</head>
<body bgcolor text="black">
<table width="100%">
<tr>
<td width="100%" height="400px" style="vertical-align: top;">
<?php
echo "BIENVENIDO:".$_SESSION["user"];
?><BR>
<a href="close.php">CERRAR SESION</a>
</td>
</tr>
</table>
</body>
</html>
close:
<?php
session_start();
unset($_SESSION["user"]);
header ("Location: index.php?id=1");
?>
index:
<?php
session_start();
?>
<!doctype html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Openalfa - Formulario de validación de usuario</title>
</head>
<body>
<table border="0px" width="100%">
<tr>
<td colspan='2'>
<?php
include ("head.php");
?>
</td>
</tr>
<tr>
<td width="250px" style="vertical-align: top;">
<?php
include ("principal.php");
?>
</td>
<td style="vertical-align: top;">
<?php
$x=1;
if (isset($_GET['id'])){
$x=$_GET['id'];
}
switch ($x) {
case 1:
include ("body.php");
break;
case 2:
include ("otro.php");
break;
case 3:
include ("log.php");
break;
default:
include ("body.php");
break;
}
?>
</td>
</tr>
<tr>
<td colspan='2'>
<?php
include ("pie.php");
?>
</td>
</tr>
</table>
</body>
</html>



No hay comentarios:
Publicar un comentario