Bienvenido '.$name.' a tu Panel de Manager.
Usuario: '.$name.'
Cine: '.$cinema.'
Espero que estes pasando un buen dia
'."\n";
return $panel;
}
static function success(){
$panel = '
Operacion completada.
'.$_SESSION['msg'].'
'."\n";
$_SESSION['msg'] = "";
return $panel;
}
static function manage_halls(){
$panel = '
';
$listhall = Hall::getListHalls($_SESSION["cinema"]);
if(!$listhall){
$panel .= "
No hay ninguna sala en este cine";
}else{
$panel .= '
Numero
Filas
Columnas
Asientos Disponibles
';
foreach($listhall as $hall){
$panel .='
'. $hall->getNumber().'
'. $hall->getNumRows().'
'. $hall->getNumCol().'
'.$hall->getTotalSeats().'
';
}
$panel.='
';
}
$panel.='
';
return $panel;
}
static function new_hall(){
$formHall = new FormHall("new_hall");
$panel = 'Crear una sala. '
.$formHall->gestiona();
return $panel;
}
static function edit_hall(){
$formHall = new FormHall("edit_hall");
$panel = 'Editar una sala. '
.$formHall->gestiona();
return $panel;
}
static function manage_sessions(){
//Base filtering values
$date = isset($_POST['date']) ? $_POST['date'] : date("Y-m-d");
$hall = isset($_POST['hall']) ? $_POST['hall'] : "1";
//Session filter
$panel='
';
//Session list
$panel .='';
$sessions = Session::getListSessions($hall,$_SESSION["cinema"],$date);
if($sessions) {
$panel .='
';
} else {
$panel.='
No hay ninguna sesion ';
}
$panel.='
';
return $panel;
}
static function new_session(){
$formSession = new FormSession("new_session");
$panel = 'Crear una sesion. '
.$formSession->gestiona();
return $panel;
}
static function edit_session(){
$formSession = new FormSession("edit_session");
$panel = 'Editar una sesion. '
.$formSession->gestiona();
return $panel;
}
static function select_film($template){
if(isset($_GET["option"])){
$_SESSION["option"] = $_GET["option"];
$panel = 'Seleccionar Pelicula. ';
$panel .= $template->print_fimls();
$_SESSION["option"] = "";
} else $panel = self::warning();
return $panel;
}
//Funcion que se envia cuando hay inconsistencia en el panel manager, principalmente por tocar cosas con la ulr
static function warning(){
$panel = '
No deberias poder acceder aqui.
No uses la url para toquitear cosas >.<
'."\n";
return $panel;
}
}
?>