Add files via upload
This commit is contained in:
parent
df9f8176d4
commit
efa3c6e31d
@ -52,6 +52,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Change state of the seat.
|
//Change state of the seat.
|
||||||
|
/*
|
||||||
public function changeSeatState($hall, $cinema, $row, $col, $state){
|
public function changeSeatState($hall, $cinema, $row, $col, $state){
|
||||||
$id = $this->mysqli->real_escape_string($idHall);
|
$id = $this->mysqli->real_escape_string($idHall);
|
||||||
$state = $this->mysqli->real_escape_string($state);
|
$state = $this->mysqli->real_escape_string($state);
|
||||||
@ -63,6 +64,7 @@
|
|||||||
return $resul;
|
return $resul;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//Create a new Seat Data Transfer Object.
|
//Create a new Seat Data Transfer Object.
|
||||||
public function loadSeat($idhall, $idcinema, $numRow, $numCol, $state){
|
public function loadSeat($idhall, $idcinema, $numRow, $numCol, $state){
|
||||||
|
@ -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"))){
|
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"));
|
$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");
|
$seatDAO = new SeatDAO("complucine");
|
||||||
$seats_list = $seatDAO->getAllSeats($this->session->getIdhall(), $this->cinema->getId());
|
$seats_list = $seatDAO->getAllSeats($this->session->getIdhall(), $this->cinema->getId());
|
||||||
foreach($seats_list as $key=>$value){
|
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());
|
$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["purchase"] = serialize($purchase);
|
||||||
$_SESSION["film_purchase"] = serialize($this->film);
|
$_SESSION["film_purchase"] = serialize($this->film);
|
||||||
@ -231,15 +233,6 @@ class FormPurchase extends Form {
|
|||||||
} else {
|
} 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"));
|
$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["purchase"] = serialize($purchase);
|
||||||
$_SESSION["film_purchase"] = serialize($this->film);
|
$_SESSION["film_purchase"] = serialize($this->film);
|
||||||
|
@ -102,7 +102,7 @@ class FormRegister extends Form {
|
|||||||
$_SESSION["nombre"] = $this->user->getName();
|
$_SESSION["nombre"] = $this->user->getName();
|
||||||
$_SESSION["rol"] = $this->user->getRol();
|
$_SESSION["rol"] = $this->user->getRol();
|
||||||
$_SESSION["login"] = true;
|
$_SESSION["login"] = true;
|
||||||
$img = "../img/users/user.jpg"; //USER_PICS
|
$img = "../img/tmp/user.jpg"; //TMP_DIR
|
||||||
$profile_img = "../img/users/".$nombre.".jpg";
|
$profile_img = "../img/users/".$nombre.".jpg";
|
||||||
copy($img, $profile_img);
|
copy($img, $profile_img);
|
||||||
$result = ROUTE_APP."register/register.php";
|
$result = ROUTE_APP."register/register.php";
|
||||||
|
Loading…
Reference in New Issue
Block a user