Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/betis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/estadisticas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/inicio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/perfil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/victor.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions close-session.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

<?php
if(isset($_REQUEST["sign-out"]) && $_SESSION["user"] == $user){
session_start();
header("location: index.php");
session_destroy();

// if (ini_get("session.use_cookies")) {
// $params = session_get_cookie_params();
// setcookie(session_name(), '', time(),
// $params["path"], $params["domain"],
// $params["secure"], $params["httponly"]
// );
// }


}

?>
44 changes: 44 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="stylesheet.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap');
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Document</title>
</head>
<body>
<?php
if(isset($_GET["zona-privada"])){
echo "<div class='div-zona-privada'>
<h1>¡Woo! Parece que has intentado entrar en un área restringida</h1>
<p>Para acceder a este espacio debes introducir tus credenciales*</p>
</div>";
}
?>
<div class="div-registration">

<form class="form-registration" action="validate.php" method="POST">
<label>Username</label><br>
<input type="texto" name="user" placeholder="name@example.com" required><br>
<label>Password</label><br>
<input type="password" name="pass" placeholder="******" required><br>
<?php

if(isset($_GET["error"])){
echo "<div class='error'>
<p>*¡Vaya! Parece que el usuario o la contraseña son incorrectos*</p>
</div>";
}

?>
<button type="input">Sign in</button>
</form>
</div>

</body>
</html>
59 changes: 59 additions & 0 deletions panel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php
session_start();
if(!isset($_SESSION["user"]))header("Location: index.php?zona-privada");

?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap');
</style>
<link rel="stylesheet" href="stylesheet1.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="todo">
<div class="sidebar">
<div div="div-real-betis">
<img class="logo-betis" src="assets/betis.png" alt="real-betis">
<h2 class="nombre-equipo">Real Betis</h2>
</div>
<div class="inicio">
<img class="img-sidebar" src="assets/inicio.png" alt="inicio">
<p class="texto-sidebar">Inicio</p>
</div>
<div class="inicio">
<img class="img-sidebar" src="assets/estadisticas.png" alt="estadisticas">
<p class="texto-sidebar">Estadísticas</p>
</div>
<div class="inicio">
<img class="img-sidebar" src="assets/perfil.png" alt="perfil">
<p class="texto-sidebar">Perfil</p>
</div>
</div>
<div class="right-part">
<div class="top-right-part">
<img class="img-notification" src="assets/notification.png" alt="notificacion">
<img class="img-victor"src="assets/victor.jpeg" alt="victor">
<form action="close-session.php" method="POST">
<button class='sign-out'type="input" name="sign-out">Sign out</button>
</form>

</div>
<div class="bottom-right-part">
<div class="box-nothing">
<h1>Todavía no tienes información</h1>
<h2>¿Te gustaría realizar tus primeros pasos?</h2>
<button type="input">Empezar</button>
</div>
</div>
</div>
</div>
</body>
</html>

5 changes: 5 additions & 0 deletions phpinfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

phpinfo();

?>
78 changes: 78 additions & 0 deletions stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
* {
font-family: "Inter", sans-serif;
}

body,
html {
background: url("assets/logo1.jpg");
background-size: 50%;
align-items: center;
width: 100%;
height: 100%;
}

.div-registration {
display: flex;
background: white;
width: 20%;
padding: 30px 0px;
justify-content: center;
border-radius: 10px;
margin: 0 auto;
align-items: center;
margin-top: 180px;
}

.form-registration {
width: 80%;
}

.div-registration input {
display: flex;
width: 100%;
border-radius: 5px;
border: 1px solid grey;
height: 2rem;
margin-top: 5px;
}

.div-registration button {
display: block;
font-weight: bold;
font-size: 15px;
width: 50%;
border-radius: 5px;
color: white;
border: 1px solid black;
background-color: #6366f1;
height: 2.3rem;
margin-top: 5px;
text-align: center;
margin: 0 auto;
margin-top: 10px;
cursor: pointer;
}

.todo {
background-color: red;
}

.error {
border: 1px solid red;
background-color: rgb(252, 177, 177);
padding-left: 10px;
border-radius: 3px;
margin-bottom: 20px;
}

.div-zona-privada {
background-color: white;
width: 35%;
border-radius: 10px;
text-align: center;
margin: 0 auto;
border: 1px solid red;
background-color: rgb(255, 194, 194);
padding: 20px;
margin-top: 100px;
}
141 changes: 141 additions & 0 deletions stylesheet1.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
*{
font-family: 'Inter', sans-serif;
}

html, body {
background-color: white;
display: flex;
width: 100%;
height: 100%;

}

.todo {
display: flex;
width: 100%;
}

.sidebar {
background-color: #031442;
width: 250px;
height: 100%;
color: white;
}

.div-real-betis{
display: block;

}

.nombre-equipo{

margin: 0 auto;
margin-bottom: 40px;
font-size: 30px;
text-align: center;
}

.div-real-betis h2{
background-color: red;
}



.logo-betis{
width: 120px;
height: 100px;
padding-top: 50px;
margin: 0 auto;
display: block;
}

.inicio{
display: flex;
margin-left: 20px;
font-size: 23px;
padding: 0px;
border-radius: 10px;
margin-right: 20px;
}

.inicio:hover {
background-color: #6366F1;
cursor: pointer;
}

.img-sidebar{
width: 40px;
height: 30px;
margin-top: 19px;
margin-right: 20px;
}

.right-part{
width: 100%;
background-color: rgb(232, 232, 232);
}



.top-right-part {
background-color: white;
display: flex;
width: 100%;
height: 80px;
justify-content: end;
}
.img-notification {
width: 25px;
height: 35px;
margin: 15px;
margin-top: 22px;
}

.img-victor {
width: 40px;
border-radius: 1000px;
margin: 15px;
margin-left: 5px ;
}

.sign-out{
font-size: 18px;
margin-right: 20px;
border: 1px solid black;
padding: 10px;
border-radius: 10px;
cursor: pointer;
background-color:black;
margin-top: 18px;
color: white;
}

.box-nothing{

width: 50%;
padding: 20px;
text-align: center;
border-radius: 10px;
margin: 100px auto;
background-color: white;
color: #031442;

}


.box-nothing button{
background-color: #6366F1;
border: 1px solid #6366F1;
width: 15%;
padding: 10px 20px;
color: white;
font-size: 20px;
border-radius: 5px;
margin: 20px 0;
cursor: pointer;

}

a:link, a:visited, a:active {
text-decoration:none;
}
18 changes: 18 additions & 0 deletions validate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

$user = $_REQUEST["user"];
$password = $_REQUEST["pass"];

$correctUser = "victor@hotmail.com";
$correctPassword = "1234";


if($user === $correctUser && $password === $correctPassword){
session_start();
$_SESSION["user"] = $user;
header("Location: panel.php");
} else {
header("Location: index.php?error=incorrect");
}

?>