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


Usuario: '.$name.'

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 = '
'; foreach(Hall::getListHalls($_SESSION["cinema"]) as $hall){ $panel .=' '; } $panel.='
Numero Filas Columnas
'. $hall->getNumber().' '. $hall->getNumRows().' '. $hall->getNumCol().'
'; return $panel; } static function new_hall(){ $data = array("option" => "new_hall", "cols" => $_POST["cols"], "rows" => $_POST["rows"]); $panel = '

Crear una sala.



'. FormHall::generaCampoFormulario($data, null); return $panel; } static function edit_hall(){ $panel = '

Editar una sala.



En desarrollo...

'."\n"; 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 .='
'; foreach($sessions as $session){ $panel .=' '; } $panel.='
Hora Pelicula Formato Precio
'.date("H:i", strtotime( $session->getStartTime())).' '. str_replace('_', ' ', Session::getThisSessionFilm($session->getIdfilm())["tittle"]) .' '.$session->getFormat().' '.$session->getSeatPrice().'
'; } else { $panel.='

No hay ninguna sesion

'; } $panel.='
'; return $panel; } static function new_session(){ $data = array("option" => "new_session","hall" => $_POST['hall'],"cinema" => $_SESSION["cinema"],"date" => $_POST['date']); $panel = '

Crear una sesión.



'.FormSession::generaCampoFormulario($data, null); return $panel; } static function edit_session(){ if(isset($_POST["edit_session"])){ $film = Session::getThisSessionFilm($_POST["film"]); $data = array("option" => "edit_session","hall" => $_POST["hall"],"cinema" => $_SESSION["cinema"],"date" => $_POST['date'],"film" => $film, "start" => $_POST['start'],"price" => $_POST['price'],"format" => $_POST['format']); }else if(isset($_SESSION["session"])){ $session = Session::getThisSessionFromId($_SESSION["session"]); $_SESSION["session"] = ""; $film = array("idfilm" => $_POST["id"],"tittle" => $_POST["tittle"], "description" => $_POST["description"], "duration" => $_POST["duration"]); echo $film["id"] . " y el titulo es: " . $film["tittle"]; $data = array("option" => "edit_session","hall" => $session["idhall"],"cinema" => $_SESSION["cinema"],"date" => $session["date"],"film" => $film, "start" => $session["start_time"],"price" => $session["seat_price"],"format" => $session["format"]); } if($data){ $panel = '

Editar una sesión.



'.FormSession::generaCampoFormulario($data, null); } else $panel = self::warning(); 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; } } ?>