Add files via upload
This commit is contained in:
parent
fd587dcf22
commit
a41f1a86ab
@ -12,6 +12,7 @@
|
||||
private $session_route; //"login/" (if user isn´t logged in), "logout/" (otherwise).
|
||||
private $panel; //Button to access the user's dashboard (only displayed if logged in).
|
||||
private $user_route; //Route of the panel (depends on the type of user).
|
||||
private $sessionButtonClass; //Type of button to login or logout.
|
||||
|
||||
//Constructor:
|
||||
function __construct(){
|
||||
@ -24,6 +25,7 @@
|
||||
$this->session_route = 'login/'; //Default, the session has not started.
|
||||
$this->panel = ''; //Default, the session has not started.
|
||||
$this->user_route = 'panel_user/'; //Default, the type of client is user.
|
||||
$this->sessionButtonClass = ''; //Default, normal button.
|
||||
}
|
||||
|
||||
//Methods:
|
||||
@ -80,6 +82,7 @@
|
||||
$page = $this->page;
|
||||
$prefix = $this->prefix;
|
||||
$session = $this->session;
|
||||
$sessionButtonClass = $this->sessionButtonClass;
|
||||
$session_route = $this->session_route;
|
||||
$user_route = $this->user_route;
|
||||
$panel =$this->panel;
|
||||
@ -89,6 +92,7 @@
|
||||
else if($_SESSION["rol"] === "manager") $user_route = 'panel_manager/';
|
||||
$panel = "<a href='{$prefix}{$user_route}'><li>Mi Panel</li></a>";
|
||||
$session = 'Cerrar Sesión';
|
||||
$sessionButtonClass = 'danger';
|
||||
$session_route = 'logout/';
|
||||
}
|
||||
|
||||
@ -102,7 +106,7 @@
|
||||
<a href='{$prefix}'><img src='{$prefix}img/favicon2.png' alt='favicon' /> CompluCine</a> | {$page}
|
||||
<div class='menu'>
|
||||
<nav>{$changeRol}
|
||||
<a href='{$prefix}{$session_route}'><li>{$session}</li></a>
|
||||
<a href='{$prefix}{$session_route}'><li class={$sessionButtonClass}>{$session}</li></a>
|
||||
{$panel}
|
||||
<li>Menú
|
||||
<ul>
|
||||
|
@ -80,6 +80,7 @@ class FormDeleteAccount extends Form {
|
||||
session_destroy();
|
||||
|
||||
$result = ROUTE_APP;
|
||||
|
||||
} else {
|
||||
$result[] = "Los datos introducidos\nno son válidos.";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user