cinemaData($_SESSION["cinema"]); $c_name = $cinema->getName(); $c_dir = $cinema->getDirection(); } $name = strtoupper($_SESSION["nombre"]); $userPic = USER_PICS.strtolower($name).".jpg"; $panel= '

Bienvenido '.$name.' a tu Panel de Manager.


user_profile_picture

'.strftime("%A %e de %B de %Y | %H:%M").'

Usuario: '.$name.'


Cine: '.$c_name.'

Dirección: '.$c_dir.'

'."\n"; return $panel; } // Admin welcome panel allows to change the cinema linked to the admin-like-manager static function welcomeAdmin() { $cinemaList = new Cinema_DAO('complucine'); $cinemas = $cinemaList->allCinemaData(); $bd = new Cinema_DAO('complucine'); $c_name = "Aun no se ha escogido un cine"; if($bd && $_SESSION["cinema"] ){ $cinema = $bd->cinemaData($_SESSION["cinema"]); $c_name = $cinema->getName(); $cinema = $cinema->getId(); } $name = strtoupper($_SESSION["nombre"]); $userPic = USER_PICS.strtolower($name).".jpg"; $panel= '

Bienvenido '.$name.' a tu Panel de Manager.


user_profile_picture

'.strftime("%A %e de %B de %Y | %H:%M").'

Usuario: '.$name.'


Como administrador puedes escoger el cine que gestionar

Cine: '.$c_name.'

'; return $panel; } //Manage the sessions using full calendar js events and a pop up form which is constantly edited with more js static function calendar(){ if(isset($_SESSION["cinema"])){ $hall = $_POST['hall'] ?? $_GET['hall'] ?? "1"; $halls = Hall::getListHalls($_SESSION["cinema"]); if($halls){ $panel ='

'; }else{ $panel ='

No hay ninguna sala en este cine

Añadir Sala
'; } }else{ $panel = '

Aun no se ha seleccionado un cine.


>.<

Selecciona un cine en el panel principal

'."\n"; } return $panel; } static function manage_halls(){ if(isset($_SESSION["cinema"])){ $panel = '
'; $listhall = Hall::getListHalls($_SESSION["cinema"]); if(!$listhall){ $panel .= "

No hay ninguna sala en este cine"; }else{ $panel .= ' '; } $panel.='

'; }else{ $panel = '

Aun no se ha seleccionado un cine.


>.<

Selecciona un cine en el panel principal

'."\n"; } return $panel; } static function new_hall(){ $formHall = new FormHall("new_hall",$_SESSION["cinema"],new Hall(null, null, null, null, null, null)); $panel = '

Crear una sala.



'.$formHall->gestiona(); return $panel; } static function edit_hall(){ $hall = Hall::search_hall($_GET["number"], $_SESSION["cinema"]); if($hall || isset($_POST["restart"]) || isset($_POST["filter"]) || isset($_POST["sumbit"]) ){ $formHall = new FormHall("edit_hall",$_SESSION["cinema"], $hall); $panel = '

Editar una sala.



'.$formHall->gestiona(); return $panel; } else{ return Manager_panel::warning(); } } //this function is used as an answer to wrong url parameters accesing a formhall edit. The formsession version has been replaced by other js error replys static function warning(){ $panel = '

Ha habido un error.


>.<

'."\n"; return $panel; } } ?>