Funcional y ademas sin notices
This commit is contained in:
parent
a6636ca786
commit
fdf0a17edd
@ -33,15 +33,23 @@ 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){
|
||||
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
|
||||
else{
|
||||
$alltoone = $_POST["alltoone"] ?? 0;
|
||||
@ -64,7 +72,7 @@ class FormHall extends Form {
|
||||
$errorSeats = self::createMensajeError($errores, 'seats', 'span', array('class' => 'error'));
|
||||
|
||||
$html = '
|
||||
<div class="column left">'.$htmlErroresGlobales.' '.$errorSeats.' '. $errorManager.'
|
||||
<div class="column left">'.$htmlErroresGlobales.' '.$errorSeats.'
|
||||
<fieldset>
|
||||
<legend>Mapa de Asientos</legend>
|
||||
<label> Filas: </label> <input type="number" name="rows" min="1" id="rows" value="'.$rows.'" required/> <br>
|
||||
|
@ -46,8 +46,9 @@ class FormSession extends Form {
|
||||
|
||||
$htmlErroresGlobales = self::generaListaErroresGlobales($errores);
|
||||
$errorPrice = self::createMensajeError($errores, 'price', 'span', array('class' => 'error'));
|
||||
$errorFormat = self::createMensajeError($errores, 'format', 'span', array('class' => 'error'));
|
||||
|
||||
$html .= '
|
||||
$html = '
|
||||
<div class="column left">'.$htmlErroresGlobales.' '.$errorPrice.'
|
||||
<fieldset>
|
||||
<legend>Datos</legend>
|
||||
|
@ -18,12 +18,12 @@
|
||||
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 = '<div class="column side"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user