From d85e933c736e3553244bb53b5a929122c623da04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Sun, 2 May 2021 16:01:05 +0200 Subject: [PATCH] Add files via upload --- assets/css/main.css | 2 +- assets/php/template.php | 143 +++++++++++++++++++++++++++++++++++ index.php | 48 +----------- panel_admin/index.php | 4 +- panel_admin/manage_films.php | 19 +++-- panel_admin/panelAdmin.php | 18 +++-- panel_admin/updateFilm.php | 14 ++-- showtimes/index.php | 48 +----------- 8 files changed, 186 insertions(+), 110 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 56faff1..15cf0f6 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -116,7 +116,7 @@ button:hover, .button:hover { } /* Responsive layout */ @media (max-width: 850px) { - .menu nav li:hover>ul{ + .header.sub .menu nav li:hover>ul{ display: block; position: relative; top: 5px; diff --git a/assets/php/template.php b/assets/php/template.php index da2a8ad..d102294 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -216,6 +216,149 @@ } } + //Print Films Cards: + function print_fimls(){ + //List of the tittles of the movies: + require_once(__DIR__.'/common/film_dao.php'); + + $prefix= $this->get_prefix(); + + $films = new Film_DAO("complucine"); + $films_array = $films->allFilmData(); + $ids = array(); + $tittles = array(); + $descriptions = array(); + $times = array(); + $languages = 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(); + } + + switch($this->page){ + case "Cartelera": + for($i = 0; $i < count($films_array); $i++){ + $tittle = str_replace('_', ' ', $tittles[$i]); + if($i%2 === 0){ + if($i != 0) echo " + "; + echo "
".$descriptions[$i]."
+Duración: ".$times[$i]." minutos
+".$descriptions[$i]."
-Duración: ".$times[$i]." minutos
-