From 79a9b04421fed386556eed045fa037f4e21898e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Thu, 27 May 2021 21:08:20 +0200 Subject: [PATCH] Add files via upload --- assets/php/template.php | 24 +++++++++++++----------- purchase/index.php | 7 +++++-- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/assets/php/template.php b/assets/php/template.php index 1a23ba3..0b4dd26 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -276,14 +276,16 @@ $descriptions = array(); $times = array(); $languages = array(); + $images = array(); if(is_array($films_array)){ - foreach($films_array as $key => $value){ - $ids[$key] = $value->getId(); - $tittles[$key] = $value->getTittle(); - $descriptions[$key] = $value->getDescription(); - $times[$key] = $value->getDuration(); - $languages[$key] = $value->getLanguage(); - } + foreach($films_array as $key => $value){ + $ids[$key] = $value->getId(); + $tittles[$key] = $value->getTittle(); + $descriptions[$key] = $value->getDescription(); + $times[$key] = $value->getDuration(); + $languages[$key] = $value->getLanguage(); + $images[$key] = $value->getImg(); + } } switch($this->page){ case "Cartelera": @@ -306,7 +308,7 @@
-
".$tittles[$i]."
+
".$tittles[$i]."

".$tittle."


@@ -344,7 +346,7 @@ $reply .= "
-
".$tittles[$i]."
+
".$tittles[$i]."

".$tittle."


@@ -392,7 +394,7 @@ $reply .= "
-
".$tittles[$i]."
+
".$tittles[$i]."

".$tittle."


  • Duración: ".$times[$i]." minutos
  • @@ -439,7 +441,7 @@ $reply .= "
    "; $count++; diff --git a/purchase/index.php b/purchase/index.php index 130002f..dc42e1d 100644 --- a/purchase/index.php +++ b/purchase/index.php @@ -23,6 +23,7 @@ $film = $filmDAO->FilmData($_GET["film"]); if($film){ $tittle = $film->getTittle(); + $image = $film->getImg(); $cinemas = $filmDAO->getCinemas($_GET["film"]); $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 = '

    Película seleccionada: '.str_replace('_', ' ', $tittle).'


    -
    '.$tittle.'
    +
    '.$tittle.'

    Duración: '.$film->getDuration().' minutos

    Idioma: '.$film->getLanguage().'

    @@ -135,7 +136,7 @@ $reply = '

    No se ha encontrado película ni cine.

    '; $pay = false; } - + //Pay button: if($pay){ $pay = ' @@ -158,4 +159,6 @@ //General page content: require RAIZ_APP.'/HTMLtemplate.php'; + + //TO-DO: añadir elegir promocione sy enviar con el POST. ?>