Add files via upload

This commit is contained in:
Fernando Méndez 2021-06-07 09:37:40 +02:00 committed by GitHub
parent df9f8176d4
commit efa3c6e31d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 10 deletions

View File

@ -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){

View File

@ -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);

View File

@ -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";