Add files via upload

This commit is contained in:
Fernando Méndez
2021-06-02 09:36:59 +02:00
committed by GitHub
parent 51032e2630
commit 3087940f70
5 changed files with 20 additions and 4 deletions

View File

@ -7,7 +7,7 @@
require_once('../assets/php/includes/manager.php');
require_once('../assets/php/includes/user.php');
if($_SESSION["login"] && $_SESSION["lastRol"] === "admin" && $_SESSION["rol"] === "manager") {
if($_SESSION["login"] && isset($_SESSION["lastRol"]) && ($_SESSION["lastRol"] === "admin" || $_SESSION["rol"] === "manager")) {
$manager = new Manager(null, null, null, null, null);
if(isset($_POST['changecinema']))$_SESSION['cinema'] = $_POST['cinema'];
if(!is_null($_SESSION['cinema'])) $manager->setIdcinema($_SESSION['cinema']);

View File

@ -20,11 +20,13 @@
$c_tel = $cinema->getPhone();
}
$name = strtoupper($_SESSION["nombre"]);
$userPic = USER_PICS.strtolower($name).".jpg";
$cinema = strtoupper( $manager->getIdcinema());
$panel = '<div class="code info">
<h1>Bienvenido '.$name.' a tu Panel de Manager.</h1>
<hr />
<img src='.$userPic.' alt="user_profile_picture"/>
<p>Usuario: '.$name.'</p> <br>
<p>Cine: '.$c_name.'</p>
<p>Dirección: '.$c_dir.'</p>