Add files via upload
This commit is contained in:
parent
019872acfb
commit
10e060d4c8
@ -126,13 +126,13 @@
|
||||
$filmDAO = new Film_DAO("complucine");
|
||||
$film = $filmDAO->FilmData($session->getIdfilm());
|
||||
|
||||
if($i%2 === 0){
|
||||
if($i != 0) $purchasesHTML .= '</div>
|
||||
if($i%3 === 0){
|
||||
if($i !== 0) $purchasesHTML .= '</div>
|
||||
';
|
||||
$purchasesHTML .= '<div class="column left">
|
||||
$purchasesHTML .= '<div class="column right">
|
||||
';
|
||||
} else {
|
||||
if($i != 0) $purchasesHTML .= '</div>
|
||||
if($i !== 0) $purchasesHTML .= '</div>
|
||||
';
|
||||
$purchasesHTML .= '<div class="column left">
|
||||
';
|
||||
@ -149,7 +149,8 @@
|
||||
<p>Sesión: '.$sessions[$i].'</p>
|
||||
<p>Asiento(Fila): '.$rows[$i].'</p>
|
||||
<p>Asiento(Columna): '.$columns[$i].'</p>
|
||||
</div>';
|
||||
</div>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,12 +152,15 @@ class FormPurchase extends Form {
|
||||
if (count($result) === 0) {
|
||||
if(isset($_SESSION["login"]) && $_SESSION["login"] == true){
|
||||
$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"));
|
||||
$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["film_purchase"] = serialize($this->film);
|
||||
$result = "resume.php";
|
||||
if($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"));
|
||||
|
||||
$_SESSION["purchase"] = serialize($purchase);
|
||||
$_SESSION["film_purchase"] = serialize($this->film);
|
||||
$result = "resume.php";
|
||||
} else {
|
||||
$result[] = "Error al realizar la compra.";
|
||||
}
|
||||
} else {
|
||||
$purchase = new Purchase("null", $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);
|
||||
|
Loading…
Reference in New Issue
Block a user