From 571d28fc19108017867ac79bb06459f7995dd9bb Mon Sep 17 00:00:00 2001 From: marian1010 <79144276+marian1010@users.noreply.github.com> Date: Thu, 27 May 2021 10:00:13 +0200 Subject: [PATCH] update template Comprobaciones por si la base de datos esta vacia --- assets/php/template.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/assets/php/template.php b/assets/php/template.php index 5bbb4c0..352c40a 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -276,7 +276,7 @@ $descriptions = array(); $times = array(); $languages = array(); - + if(is_array($films_array)){ foreach($films_array as $key => $value){ $ids[$key] = $value->getId(); $tittles[$key] = $value->getTittle(); @@ -284,9 +284,10 @@ $times[$key] = $value->getDuration(); $languages[$key] = $value->getLanguage(); } - + } switch($this->page){ case "Cartelera": + if(is_array($films_array)){ for($i = 0; $i < count($films_array); $i++){ $tittle = str_replace('_', ' ', $tittles[$i]); if($i%2 === 0){ @@ -319,11 +320,13 @@ "; } + } $reply .= "\n"; break; case "Panel de Administrador": $reply .= "