Add files via upload

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

View File

@ -1,5 +1,5 @@
<?php <?php
include_once($prefix.'assets/php/includes/session_dao.php'); include_once('session_dao.php');
class Session{ class Session{

View File

@ -92,6 +92,8 @@
require_once('../assets/php/includes/purchase_dao.php'); require_once('../assets/php/includes/purchase_dao.php');
include_once('../assets/php/includes/cinema_dao.php'); include_once('../assets/php/includes/cinema_dao.php');
include_once('../assets/php/includes/hall_dao.php'); include_once('../assets/php/includes/hall_dao.php');
include_once('../assets/php/includes/session_dao.php');
include_once('../assets/php/includes/film_dao.php');
$purchasesHTML = ''; $purchasesHTML = '';
@ -119,6 +121,10 @@
$cinema = $cinemaDAO->cinemaData($cinemas[$i]); $cinema = $cinemaDAO->cinemaData($cinemas[$i]);
$hallDAO = new HallDAO("complucine"); $hallDAO = new HallDAO("complucine");
$hall = $hallDAO->HallData($halls[$i]); $hall = $hallDAO->HallData($halls[$i]);
$sessionDAO = new SessionDAO("complucine");
$session = $sessionDAO->sessionData($sessions[$i]);
$filmDAO = new Film_DAO("complucine");
$film = $filmDAO->FilmData($session->getIdfilm());
if($i%2 === 0){ if($i%2 === 0){
if($i != 0) $purchasesHTML .= '</div> if($i != 0) $purchasesHTML .= '</div>
@ -132,19 +138,25 @@
'; ';
} }
$purchasesHTML .= '<h1>Compara realizada el: '.$dates[$i].'</h1><hr /> $purchasesHTML .= '<h1>Compara realizada el: '.$dates[$i].'</h1><hr />
<div class="column left">
<p>Película: '.str_replace('_', ' ', strtoupper($film->getTittle())).'</p>
<p>Idioma: '.$film->getLanguage().'</p>
<p>Cine: '.$cinema->getName().'</p> <p>Cine: '.$cinema->getName().'</p>
<p>Dirección: '.$cinema->getDirection().'</p> <p>Dirección: '.$cinema->getDirection().'</p>
</div>
<div class="column right">
<p>Sala: '.$hall->getNumber().'</p> <p>Sala: '.$hall->getNumber().'</p>
<p>Sesión: '.$sessions[$i].'</p> <p>Sesión: '.$sessions[$i].'</p>
<p>Asiento(Fila): '.$rows[$i].'</p> <p>Asiento(Fila): '.$rows[$i].'</p>
<p>Asiento(Columna): '.$columns[$i].'</p>'; <p>Asiento(Columna): '.$columns[$i].'</p>
</div>';
} }
} }
return $reply = '<div class="code info"> return $reply = '<div class="code">
<h2>Historial de compras</h2><hr /> <h2>Historial de compras</h2><hr />
'.$purchasesHTML.' '.$purchasesHTML.'
</div>'."\n"; </div>';
} }
//User payment details //User payment details