'."\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.
'.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(){
$hall = $_POST['hall'] ?? $_GET['hall'] ?? "1";
$halls = Hall::getListHalls($_SESSION["cinema"]);
if($halls){
$panel ='
'.$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 = '