2021-03-26 15:45:16 +01:00
|
|
|
<?php
|
|
|
|
class Panel {
|
|
|
|
public $state;
|
2021-04-10 20:54:56 +02:00
|
|
|
public $login;
|
2021-03-26 15:45:16 +01:00
|
|
|
|
2021-04-10 20:54:56 +02:00
|
|
|
function __construct($panel,$log){
|
2021-03-26 15:45:16 +01:00
|
|
|
$this->state = $panel;
|
2021-04-10 20:54:56 +02:00
|
|
|
$this->login = $log;
|
2021-04-14 19:59:52 +02:00
|
|
|
|
2021-03-26 15:45:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function showPanel() {
|
2021-04-10 20:54:56 +02:00
|
|
|
if($this->login){
|
|
|
|
switch($this->state) {
|
2021-04-15 20:53:01 +02:00
|
|
|
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_rooms.php'); break;
|
|
|
|
case 'sessions': require_once('manage_sessions.php'); break;
|
|
|
|
case 'edit_session': require_once('edit_sessions.php'); break;
|
2021-04-13 21:16:07 +02:00
|
|
|
default: require('hello_panel.php'); break;
|
2021-04-10 20:54:56 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
2021-04-15 20:53:01 +02:00
|
|
|
echo "<h1> Error no tienes los permisos necesarios de gerente</h1>";
|
2021-03-26 15:45:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|