diff --git a/panel_manager/includes/formHall.php b/panel_manager/includes/formHall.php index 5100e1c..9b9f591 100644 --- a/panel_manager/includes/formHall.php +++ b/panel_manager/includes/formHall.php @@ -33,13 +33,21 @@ class FormHall extends Form { //Seats_map $seats = 0; $seats_map = array(); - + for($i = 1;$i <= $rows; $i++){ + for($j = 1; $j <= $cols; $j++){ + $seats_map[$i][$j] = "-1"; + } + } + //Show the original seats_map once u click restart or the first time u enter this form from manage_halls's form - if($data["restart"] || $_POST["edit_hall"] ){ - foreach(Seat::getSeatsMap($og_number, $this->cinema) as $seat){ - $seats_map[$seat->getNumRows()][$seat->getNumCol()] = $seat->getState(); - if($seat->getState()>=0){ - $seats++; + if(isset($data["restart"]) || isset($_POST["edit_hall"]) ){ + $seat_list = Seat::getSeatsMap($og_number, $this->cinema); + if($seat_list){ + foreach($seat_list as $seat){ + $seats_map[$seat->getNumRows()][$seat->getNumCol()] = $seat->getState(); + if($seat->getState()>=0){ + $seats++; + } } } }//Show the checkbox seats_map updated and everything to selected if alltoone was pressed @@ -64,7 +72,7 @@ class FormHall extends Form { $errorSeats = self::createMensajeError($errores, 'seats', 'span', array('class' => 'error')); $html = ' -
'.$htmlErroresGlobales.' '.$errorSeats.' '. $errorManager.' +
'.$htmlErroresGlobales.' '.$errorSeats.'
Mapa de Asientos
diff --git a/panel_manager/includes/formSession.php b/panel_manager/includes/formSession.php index c40ecf2..d8586ae 100644 --- a/panel_manager/includes/formSession.php +++ b/panel_manager/includes/formSession.php @@ -46,8 +46,9 @@ class FormSession extends Form { $htmlErroresGlobales = self::generaListaErroresGlobales($errores); $errorPrice = self::createMensajeError($errores, 'price', 'span', array('class' => 'error')); - - $html .= ' + $errorFormat = self::createMensajeError($errores, 'format', 'span', array('class' => 'error')); + + $html = '
'.$htmlErroresGlobales.' '.$errorPrice.'
Datos diff --git a/panel_manager/index.php b/panel_manager/index.php index 292a46e..0973a06 100644 --- a/panel_manager/index.php +++ b/panel_manager/index.php @@ -18,50 +18,50 @@ if($manager){ if($manager->num_rows == 1){ $fila = $manager->fetch_assoc(); - $manager = new Manager($fila["id"], $fila["idcinema"], $fila["username"], $fila["email"], $fila["rol"]); + $manager = new Manager($fila["id"], $fila["idcinema"], null, null, null); } } } - - switch($_GET["state"]){ + $state = isset($_GET['state']) ? $_GET['state'] : ''; + switch($state){ case "view_ruser": case "view_user": - $panel = '
-
+ $panel = '
+
-

Esta vista aun no esta implementada.


+

Esta vista aun no esta implementada.


-
'."\n"; - break; +
'."\n"; + break; case "manage_halls": - $panel = Manager_panel::manage_halls($manager); - break; + $panel = Manager_panel::manage_halls($manager); + break; case "new_hall": - $panel = Manager_panel::new_hall($manager); - break; + $panel = Manager_panel::new_hall($manager); + break; case "edit_hall": - $panel = Manager_panel::edit_hall($manager); - break; - case "manage_sessions": - $panel = Manager_panel::manage_sessions($manager); - break; + $panel = Manager_panel::edit_hall($manager); + break; + case "manage_sessions": + $panel = Manager_panel::manage_sessions($manager); + break; case "new_session": - $panel = Manager_panel::new_session($manager); - break; + $panel = Manager_panel::new_session($manager); + break; case "edit_session": - $panel = Manager_panel::edit_session($manager); - break; + $panel = Manager_panel::edit_session($manager); + break; case "select_film": - $panel = Manager_panel::select_film($template,$manager); - break; + $panel = Manager_panel::select_film($template,$manager); + break; case "success": - $panel = Manager_panel::success(); - break; - default: - $panel = Manager_panel::welcome($manager); - break; - } + $panel = Manager_panel::success(); + break; + default: + $panel = Manager_panel::welcome($manager); + break; + } } else{ $panel = '