Add files via upload

This commit is contained in:
Fernando Méndez 2021-06-01 16:50:28 +02:00 committed by GitHub
parent 687e7b4672
commit 629cad58e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ class FormPurchase extends Form {
$purchaseDAO = new PurchaseDAO("complucine"); $purchaseDAO = new PurchaseDAO("complucine");
$purchaseDAO->createPurchase(unserialize($_SESSION["user"])->getId(), $this->session->getId(), $this->session->getIdhall(), $this->cinema->getId(), rand(1, $this->hall->getNumRows()), rand(1, $this->hall->getNumCol()), date("Y-m-d H:i:s")); $purchaseDAO->createPurchase(unserialize($_SESSION["user"])->getId(), $this->session->getId(), $this->session->getIdhall(), $this->cinema->getId(), rand(1, $this->hall->getNumRows()), rand(1, $this->hall->getNumCol()), date("Y-m-d H:i:s"));
$purchase = new Purchase(unserialize($_SESSION["user"])->getId(), $this->session->getId(), $this->session->getIdhall(), $this->cinema->getId(), rand(1, $this->hall->getNumRows()), rand(1, $this->hall->getNumCol()), 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(), rand(1, $this->hall->getNumRows()), rand(1, $this->hall->getNumCol()), strftime("%A %e de %B de %Y a las %H:%M"));
$_SESSION["purchase"] = serialize($purchase); $_SESSION["purchase"] = serialize($purchase);
$_SESSION["film_purchase"] = serialize($this->film); $_SESSION["film_purchase"] = serialize($this->film);
$result = "resume.php"; $result = "resume.php";

View File

@ -104,7 +104,7 @@ class FormSelectCinemaSession extends Form {
$count = 0; $count = 0;
$sessionsListHTML = '<select name="sessions" id="sessions"><pre>'.$errorSession.'</pre>'; $sessionsListHTML = '<select name="sessions" id="sessions"><pre>'.$errorSession.'</pre>';
foreach ($sessionsIT as $value) { foreach ($sessionsIT as $value) {
if($this->_TODAY <= $value["DATE"]){ if(strtotime($this->_TODAY) <= strtotime($value["DATE"])){
if($value === reset($sessionsIT)){ if($value === reset($sessionsIT)){
$sessionsListHTML .= '<option value="'.$value["sID"].'" >Fecha: '.$value["DATE"].' | Hora: '.$value["HOUR"].' | Sala: '.$value["HALL"].'</option>'; $sessionsListHTML .= '<option value="'.$value["sID"].'" >Fecha: '.$value["DATE"].' | Hora: '.$value["HOUR"].' | Sala: '.$value["HALL"].'</option>';
} else { } else {