Add files via upload
This commit is contained in:
parent
1aa3d0d77a
commit
4c3fccca92
@ -210,7 +210,7 @@ main h1, h2, h3, h4 {
|
||||
color: #363636;
|
||||
}
|
||||
main img {
|
||||
width: 50%;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
/* Create three unequal columns that floats next to each other */
|
||||
|
@ -24,7 +24,7 @@ class FormLogin extends Form {
|
||||
|
||||
if(isset($_SESSION["login"])){
|
||||
$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>Usa los botones para navegar</p>
|
||||
<a href='../'><button>Inicio</button></a>
|
||||
@ -71,7 +71,8 @@ class FormLogin extends Form {
|
||||
|
||||
try{
|
||||
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["rol"] = $this->user->getRol();
|
||||
$_SESSION["login"] = $login;
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
require_once('../assets/php/common/user_dto.php');
|
||||
|
||||
class UserPanel {
|
||||
//Atributes:
|
||||
|
||||
@ -9,8 +11,12 @@
|
||||
|
||||
//Welcome view.
|
||||
static function panel(){
|
||||
$name = strtoupper($_SESSION['nombre']);
|
||||
$email = unserialize($_SESSION['user'])->getEmail();
|
||||
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";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user