Add files via upload

This commit is contained in:
Daniel Muñoz Garcia
2021-04-15 10:18:50 +02:00
committed by GitHub
parent 3e7378d9d9
commit 79ae1b24db
6 changed files with 44 additions and 36 deletions

View File

@ -1,19 +1,28 @@
<?php
class Panel {
public $state;
function __construct($panel){
public $login;
function __construct($panel, $login){
$this->state = $panel;
$this->login= $login;
}
function showPanel() {
switch($this->state) {
case 'uf': require('updateFilm.php');break;
case 'mc': require('manage_cinemas.php'); break;
case 'mf': require('manage_films.php'); break;
case 'md': require('manage_discounts.php'); break;
case 'mm': require('manage_managers.php'); break;
default: echo "<h1>BIENVENIDO AL PANEL DE ADMINISTRADOR</h1>"; break;
if($this->login){
switch($this->state) {
case 'uf': require_once('updateFilm.php');break;
case 'mc': /*require_once('manage_cinemas.php')*/;echo"<h1>En construcción</h1>"; break;
case 'mf': require_once('manage_films.php'); break;
case 'md': /*require_once('manage_discounts.php')*/;echo"<h1>En construcción</h1>"; break;
case 'mm': /*require_once('manage_managers.php')*/;echo"<h1>En construcción</h1>"; break;
case 'un': echo"<h1>En construcción</h1>"; break;
case 'ur': echo"<h1>En construcción</h1>";; break;
case 'ag': echo"<h1>En construcción</h1>";; break;
default: echo "<h1>BIENVENIDO AL PANEL DE ADMINISTRADOR</h1>"; break;
}
}
else {
echo "<h1>NO TIENES PERMISOS DE ADMINISTRADOR</h1>";
}
}
}