Add files via upload

This commit is contained in:
Fernando Méndez 2021-05-03 16:38:53 +02:00 committed by GitHub
parent 1aa3d0d77a
commit 4c3fccca92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View File

@ -210,7 +210,7 @@ main h1, h2, h3, h4 {
color: #363636; color: #363636;
} }
main img { main img {
width: 50%; width: 40%;
} }
/* Create three unequal columns that floats next to each other */ /* Create three unequal columns that floats next to each other */

View File

@ -24,7 +24,7 @@ class FormLogin extends Form {
if(isset($_SESSION["login"])){ if(isset($_SESSION["login"])){
$name = strtoupper($_SESSION['nombre']); $name = strtoupper($_SESSION['nombre']);
$this->reply = "<h1>Bienvenido {$_SESSION['nombre']}</h1><hr /> $this->reply = "<h1>Bienvenido {$name}</h1><hr />
<p>{$name}, has iniciado sesión correctamente.</p> <p>{$name}, has iniciado sesión correctamente.</p>
<p>Usa los botones para navegar</p> <p>Usa los botones para navegar</p>
<a href='../'><button>Inicio</button></a> <a href='../'><button>Inicio</button></a>
@ -71,7 +71,8 @@ class FormLogin extends Form {
try{ try{
if ($this->user) { if ($this->user) {
//$_SESSION["user"] = $this->user; //¿? No funcionan los getters con el objeto. $this->user->setPass(null);
$_SESSION["user"] = serialize($this->user);
$_SESSION["nombre"] = $this->user->getName(); $_SESSION["nombre"] = $this->user->getName();
$_SESSION["rol"] = $this->user->getRol(); $_SESSION["rol"] = $this->user->getRol();
$_SESSION["login"] = $login; $_SESSION["login"] = $login;

View File

@ -1,4 +1,6 @@
<?php <?php
require_once('../assets/php/common/user_dto.php');
class UserPanel { class UserPanel {
//Atributes: //Atributes:
@ -9,8 +11,12 @@
//Welcome view. //Welcome view.
static function panel(){ static function panel(){
$name = strtoupper($_SESSION['nombre']);
$email = unserialize($_SESSION['user'])->getEmail();
return $reply = '<div class="code info"> return $reply = '<div class="code info">
<h1>Bienvenido al Panel de Usuario.</h1><hr /> <h1>Bienvenido '.$name.' al Panel de Usuario.</h1><hr />
<p>Usuario: '.$name.'</p>
<p>Email: '.$email.'</p>
</div>'."\n"; </div>'."\n";
} }