Add files via upload

This commit is contained in:
Fernando Méndez 2021-05-27 21:08:20 +02:00 committed by GitHub
parent 4addd2c35f
commit 79a9b04421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

View File

@ -276,6 +276,7 @@
$descriptions = array(); $descriptions = array();
$times = array(); $times = array();
$languages = array(); $languages = array();
$images = array();
if(is_array($films_array)){ if(is_array($films_array)){
foreach($films_array as $key => $value){ foreach($films_array as $key => $value){
$ids[$key] = $value->getId(); $ids[$key] = $value->getId();
@ -283,6 +284,7 @@
$descriptions[$key] = $value->getDescription(); $descriptions[$key] = $value->getDescription();
$times[$key] = $value->getDuration(); $times[$key] = $value->getDuration();
$languages[$key] = $value->getLanguage(); $languages[$key] = $value->getLanguage();
$images[$key] = $value->getImg();
} }
} }
switch($this->page){ switch($this->page){
@ -306,7 +308,7 @@
<div class='zoom'> <div class='zoom'>
<a href='".$prefix."purchase?film=".$ids[$i]."'> <a href='".$prefix."purchase?film=".$ids[$i]."'>
<div class='code showtimes'> <div class='code showtimes'>
<div class='image'><img src='".$prefix."img/films/".$tittles[$i].".jpg' alt='".$tittles[$i]."' /></div> <div class='image'><img src='".$prefix."img/films/".$images[$i]."' alt='".$tittles[$i]."' /></div>
<h2>".$tittle."</h2> <h2>".$tittle."</h2>
<hr /> <hr />
<div class='blockquote'> <div class='blockquote'>
@ -344,7 +346,7 @@
$reply .= "<section id='".$tittles[$i]."'> $reply .= "<section id='".$tittles[$i]."'>
<div class='zoom'> <div class='zoom'>
<div class='code showtimes'> <div class='code showtimes'>
<div class='image'><img src='".$prefix."img/films/".$tittles[$i].".jpg' alt='".$tittles[$i]."' /></div> <div class='image'><img src='".$prefix."img/films/".$images[$i]."' alt='".$tittles[$i]."' /></div>
<h2>".$tittle."</h2> <h2>".$tittle."</h2>
<hr /> <hr />
<form method='post' action='./index.php?state=mf'> <form method='post' action='./index.php?state=mf'>
@ -392,7 +394,7 @@
$reply .= "<section id='".$tittles[$i]."'> $reply .= "<section id='".$tittles[$i]."'>
<div class='zoom'> <div class='zoom'>
<div class='code showtimes'> <div class='code showtimes'>
<div class='image'><img src='".$prefix."img/films/".$tittles[$i].".jpg' alt='".$tittles[$i]."' /></div> <div class='image'><img src='".$prefix."img/films/".$images[$i]."' alt='".$tittles[$i]."' /></div>
<h2>".$tittle."</h2> <h2>".$tittle."</h2>
<hr /> <hr />
<li>Duración: ".$times[$i]." minutos</li> <li>Duración: ".$times[$i]." minutos</li>
@ -439,7 +441,7 @@
$reply .= " $reply .= "
<div class='zoom'> <div class='zoom'>
<div class='columna'> <div class='columna'>
<a href='".$prefix."showtimes/#".$tittles[$i]."'><div class='image'><img src='img/films/".$tittles[$i].".jpg' alt='".$tittles[$i]."' /></div></a> <a href='".$prefix."showtimes/#".$tittles[$i]."'><div class='image'><img src='img/films/".$images[$i]."' alt='".$tittles[$i]."' /></div></a>
</div> </div>
</div>"; </div>";
$count++; $count++;

View File

@ -23,6 +23,7 @@
$film = $filmDAO->FilmData($_GET["film"]); $film = $filmDAO->FilmData($_GET["film"]);
if($film){ if($film){
$tittle = $film->getTittle(); $tittle = $film->getTittle();
$image = $film->getImg();
$cinemas = $filmDAO->getCinemas($_GET["film"]); $cinemas = $filmDAO->getCinemas($_GET["film"]);
$cinema_id = $_GET["cinema"]; $cinema_id = $_GET["cinema"];
@ -112,7 +113,7 @@
//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">
<h2>Película seleccionada: '.str_replace('_', ' ', $tittle).'</h2><hr /> <h2>Película seleccionada: '.str_replace('_', ' ', $tittle).'</h2><hr />
<div class="image"><img src="'.$prefix.'img/films/'.$tittle.'.jpg" alt="'.$tittle.'" /></div> <div class="image"><img src="'.$prefix.'img/films/'.$image.'" alt="'.$tittle.'" /></div>
<p>Duración: '.$film->getDuration().' minutos</p> <p>Duración: '.$film->getDuration().' minutos</p>
<p>Idioma: '.$film->getLanguage().'</p> <p>Idioma: '.$film->getLanguage().'</p>
</div> </div>
@ -158,4 +159,6 @@
//General page content: //General page content:
require RAIZ_APP.'/HTMLtemplate.php'; require RAIZ_APP.'/HTMLtemplate.php';
//TO-DO: añadir elegir promocione sy enviar con el POST.
?> ?>