From efa3c6e31d65583ba567684ae36f76f334d2ff09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Mon, 7 Jun 2021 09:37:40 +0200 Subject: [PATCH] Add files via upload --- assets/php/includes/seat_dao.php | 2 ++ purchase/includes/formPurchase.php | 11 ++--------- register/includes/formRegister.php | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/assets/php/includes/seat_dao.php b/assets/php/includes/seat_dao.php index 2dc1c0e..2ec1460 100644 --- a/assets/php/includes/seat_dao.php +++ b/assets/php/includes/seat_dao.php @@ -52,6 +52,7 @@ } //Change state of the seat. + /* public function changeSeatState($hall, $cinema, $row, $col, $state){ $id = $this->mysqli->real_escape_string($idHall); $state = $this->mysqli->real_escape_string($state); @@ -63,6 +64,7 @@ return $resul; } + */ //Create a new Seat Data Transfer Object. public function loadSeat($idhall, $idcinema, $numRow, $numCol, $state){ diff --git a/purchase/includes/formPurchase.php b/purchase/includes/formPurchase.php index 7d9fbae..94dfe72 100644 --- a/purchase/includes/formPurchase.php +++ b/purchase/includes/formPurchase.php @@ -211,6 +211,7 @@ class FormPurchase extends Form { if($purchaseDAO->createPurchase(unserialize($_SESSION["user"])->getId(), $this->session->getId(), $this->session->getIdhall(), $this->cinema->getId(), $rows[$i], $cols[$i], date("Y-m-d H:i:s"))){ $purchase = new Purchase(unserialize($_SESSION["user"])->getId(), $this->session->getId(), $this->session->getIdhall(), $this->cinema->getId(), $datos["row"], $datos["col"], strftime("%A %e de %B de %Y a las %H:%M")); + /* $seatDAO = new SeatDAO("complucine"); $seats_list = $seatDAO->getAllSeats($this->session->getIdhall(), $this->cinema->getId()); foreach($seats_list as $key=>$value){ @@ -220,6 +221,7 @@ class FormPurchase extends Form { $seatDAO->changeSeatState( $seats_list[$key]->getNumber(), $seats_list[$key]->getIdcinema(), $seats_list[$key]->getNumRows(), $seats_list[$key]->getNumCol(), $seats_list[$key]->getState()); } } + */ $_SESSION["purchase"] = serialize($purchase); $_SESSION["film_purchase"] = serialize($this->film); @@ -231,15 +233,6 @@ class FormPurchase extends Form { } else { $purchase = new Purchase("null", $this->session->getId(), $this->session->getIdhall(), $this->cinema->getId(), $datos["row"], $datos["col"], strftime("%A %e de %B de %Y a las %H:%M")); - $seatDAO = new SeatDAO("complucine"); - $seats_list = $seatDAO->getAllSeats($this->session->getIdhall(), $this->cinema->getId()); - foreach($seats_list as $key=>$value){ - if( $seats_list[$key]->getNumRows() === $datos["row"][11] && - $seats_list[$key]->getNumCol() === $datos["col"][11] ){ - $seats_list[$key]->setState(intval(-1)); - $seatDAO->changeSeatState( $seats_list[$key]->getNumber(), $seats_list[$key]->getIdcinema(), $seats_list[$key]->getNumRows(), $seats_list[$key]->getNumCol(), $seats_list[$key]->getState()); - } - } $_SESSION["purchase"] = serialize($purchase); $_SESSION["film_purchase"] = serialize($this->film); diff --git a/register/includes/formRegister.php b/register/includes/formRegister.php index 698f988..9981f7e 100644 --- a/register/includes/formRegister.php +++ b/register/includes/formRegister.php @@ -102,7 +102,7 @@ class FormRegister extends Form { $_SESSION["nombre"] = $this->user->getName(); $_SESSION["rol"] = $this->user->getRol(); $_SESSION["login"] = true; - $img = "../img/users/user.jpg"; //USER_PICS + $img = "../img/tmp/user.jpg"; //TMP_DIR $profile_img = "../img/users/".$nombre.".jpg"; copy($img, $profile_img); $result = ROUTE_APP."register/register.php";