New index and panelAdmin class

This commit is contained in:
Daniel Muñoz Garcia
2021-03-26 15:08:47 +01:00
committed by GitHub
parent 6f4ec68a14
commit e70bfdff7a
2 changed files with 47 additions and 19 deletions

View File

@ -0,0 +1,20 @@
<?php
class Panel {
public $state;
function __construct($panel){
$this->state = $panel;
}
function showPanel() {
switch($this->state) {
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;
}
}
}
?>