Add files via upload

This commit is contained in:
Fernando Méndez 2021-05-24 13:38:19 +02:00 committed by GitHub
parent 5732adfec9
commit 6625d9787a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,12 +9,14 @@
include_once($prefix.'assets/php/includes/cinema.php'); include_once($prefix.'assets/php/includes/cinema.php');
include_once($prefix.'assets/php/includes/session.php'); include_once($prefix.'assets/php/includes/session.php');
$pay = true;
$film = null; $film = null;
$cinemas = []; $cinemas = [];
$sessions = []; $sessions = [];
if(isset($_GET["film"])){ if(isset($_GET["film"])){
$filmDAO = new Film_DAO("complucine"); $filmDAO = new Film_DAO("complucine");
$film = $filmDAO->FilmData($_GET["film"]); $film = $filmDAO->FilmData($_GET["film"]);
if($film){
$tittle = $film->getTittle(); $tittle = $film->getTittle();
$cinemas = $filmDAO->getCinemas($_GET["film"]); $cinemas = $filmDAO->getCinemas($_GET["film"]);
@ -79,8 +81,6 @@
$session_id = $value["sID"]; $session_id = $value["sID"];
$hall_id = $value["HALL"]; $hall_id = $value["HALL"];
}
//Reply: Depends on whether the purchase is to be made from a selected movie or a cinema. //Reply: Depends on whether the purchase is to be made from a selected movie or a cinema.
$reply = '<div class="column left"> $reply = '<div class="column left">
@ -97,7 +97,22 @@
'.$sessionsListHTML.' '.$sessionsListHTML.'
</div> </div>
'; ';
} else {
$reply = '<h1>No existe la película.</h1>';
$pay = false;
}
}
//Pay button:
if($pay){
$pay = '<form action="confirm.php" method="post">
<input type="hidden" name="film_id" id="film_id" value='.$fiml_id.' />
<input type="hidden" name="cinema_id" id="cinema_id" value='.$cinema_id.' />
<input type="hidden" name="session_id" id="session_id" value='.$session_id.' />
<input type="hidden" name="hall_id" id="hall_id" value='.$hall_id.' />
<input type="submit" id="submit" value="Pagar" />
</form>';
}
//Page-specific content: //Page-specific content:
$section = '<!-- Purchase --> $section = '<!-- Purchase -->
<section id="purchase"> <section id="purchase">
@ -106,13 +121,7 @@
'.$reply.' '.$reply.'
</section> </section>
<section class="code purchase"> <section class="code purchase">
<form action="confirm.php" method="post"> '.$pay.'
<input type="hidden" name="film_id" id="film_id" value='.$fiml_id.' />
<input type="hidden" name="cinema_id" id="cinema_id" value='.$cinema_id.' />
<input type="hidden" name="session_id" id="session_id" value='.$session_id.' />
<input type="hidden" name="hall_id" id="hall_id" value='.$hall_id.' />
<input type="submit" id="submit" value="Pagar" />
</form>
</section> </section>
</div> </div>
</section> </section>