SW/panel_manager/panel_manager.php

29 lines
1.0 KiB
PHP
Raw Normal View History

2021-04-26 22:40:34 +02:00
<?php
2021-05-04 22:26:24 +02:00
class Panel {
public $state;
public $login;
2021-04-26 22:40:34 +02:00
function __construct($panel,$log){
$this->state = $panel;
$this->login = $log;
}
2021-05-04 22:26:24 +02:00
function showPanel() {
if($this->login){
switch($this->state) {
case 'us_u': echo "<p> Esta vista no esta implementada </p>"; break;
case 'us_r': echo "<p> Esta vista no esta implementada </p>"; break;
case 'rooms': require_once('manage_halls.php'); break;
case 'sessions': require_once('manage_sessions.php'); break;
case 'edit_session': require_once('edit_sessions.php'); break;
case 'edit_hall': require_once('edit_halls.php'); break;
default: require('hello_panel.php'); break;
}
}
else{
echo "<h1> Error no tienes los permisos necesarios de gerente</h1>";
}
2021-04-26 22:40:34 +02:00
}
}
?>