Add files via upload

This commit is contained in:
Fernando Méndez
2021-05-18 09:20:24 +02:00
committed by GitHub
parent a9e866ac88
commit 1b39920abd
13 changed files with 155 additions and 58 deletions

View File

@@ -85,11 +85,19 @@
color :#dadada;
position: relative;
}
.menu nav li.danger{
background-color: #791515;
}
.menu nav li:hover{
background-color:#dadada;
color:#1f2c3d;
border-color: #1f2c3d;
}
}
.menu nav li.danger:hover{
color: #d3ebff;
background-color: #00020f;
border-color: #d3ebff;
}
.menu nav li>ul{
display: none;
}

View File

@@ -29,7 +29,7 @@ h4 {
}
/* Buttons */
button, .button.large {
button, .button.large{
display: inline-block;
margin: 10px;
width: 150px;
@@ -50,7 +50,7 @@ button:hover, .button:hover {
background-color:#d3ebff;
color:#1f2c3d;
border-color: #1f2c3d;
}
}
/* Header */
.header {
@@ -69,11 +69,11 @@ button:hover, .button:hover {
text-align: right;
font-size: 15px;
}
.menu nav a{
.menu nav a {
text-decoration: none;
color: inherit;
font-size: 15px;
}
}
.menu nav li{
display: inline-block;
width: 150px;
@@ -84,12 +84,20 @@ button:hover, .button:hover {
text-align: center;
color :#d3ebff;
position: relative;
}
}
.menu nav li.danger{
background-color: #791515;
}
.menu nav li:hover{
background-color:#d3ebff;
color:#1f2c3d;
border-color: #1f2c3d;
}
.menu nav li.danger:hover{
color: #d3ebff;
background-color: #00020f;
border-color: #d3ebff;
}
.menu nav li>ul{
display: none;
}

View File

@@ -0,0 +1 @@
CREATE DATABASE IF NOT EXISTS complucine DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

View File

@@ -0,0 +1,11 @@
<?php
include('../config.php');
function reRol(){
if(isset($_SESSION["lastRol"])){
$_SESSION["rol"] = $_SESSION["lastRol"];
unset($_SESSION["lastRol"]);
}
}
reRol();
header("Location: /");
?>

View File

@@ -83,18 +83,24 @@
$user_route = $this->user_route;
$panel =$this->panel;
if(isset($_SESSION["nombre"])){
if($_SESSION["rol"] == "admin") $user_route = 'panel_admin/';
else if($_SESSION["rol"] == "manager") $user_route = 'panel_manager/';
if(isset($_SESSION["rol"])){
if($_SESSION["rol"] === "admin") $user_route = 'panel_admin/';
else if($_SESSION["rol"] === "manager") $user_route = 'panel_manager/';
$panel = "<a href='{$prefix}{$user_route}'><li>Mi Panel</li></a>";
$session = 'Cerrar Sesión';
$session_route = 'logout/';
}
if(isset($_SESSION["lastRol"]) && ($_SESSION["lastRol"] === "admin" || $_SESSION["lastRol"] === "manager" )){
$changeRol = "<a href='{$prefix}assets/php/common/reRol.php'><li class='danger'>Volver a {$_SESSION["lastRol"]}</li></a>";
} else {
$changeRol = null;
}
echo"<div class='header'>
<a href='{$prefix}'><img src='{$prefix}img/favicon2.png' alt='favicon' /> CompluCine</a> | {$page}
<div class='menu'>
<nav>
<nav>{$changeRol}
<a href='{$prefix}{$session_route}'><li>{$session}</li></a>
{$panel}
<li>Menú
@@ -500,7 +506,7 @@
<div class='footer'>
<p>© Práctica Final | Sistemas Web 2021 </p>
</div>
<a href='#'>▲Volver arriba</a> |
<a href='#'>▲Volver arriba</a> |
<a href='{$prefix}fdicines/about_us/'>Sobre FDI-Cines</a> |
<a href='{$prefix}fdicines/terms_conditions/'>Términos de uso</a> |
<a href='{$prefix}cinemas/'>Nuestros cines</a> |
@@ -514,4 +520,4 @@
}
}
?>
?>