From f8393623c2f28c206e114a4a39d3359e3f1b8093 Mon Sep 17 00:00:00 2001 From: Francisco Pessano Date: Sun, 18 Jul 2021 21:09:43 -0300 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20aspecto=20de=20background=20depe?= =?UTF-8?q?ndiente=20de=20la=20cantidad=20de=20cartas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 11 +++++++++-- pages/pages-1.php | 6 ++++++ pages/pages-2.php | 6 ++++++ pages/print_page_data.php | 6 ++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 784a379..3443a65 100755 --- a/index.php +++ b/index.php @@ -34,9 +34,15 @@ $news_per_page = 10; check_news($news_per_page, 'mySQLconnect.php'); - + $result = bring_the_news_back_home($actual_page, $news_per_page, 'mySQLconnect.php'); - + + if (count($result) <= 4) { + echo ''; + } + foreach ($result as $news ) { $id = $news[0]; $title = $news[1]; @@ -66,6 +72,7 @@ $pages = glob('./pages/pages-*.php'); $c = 0; + foreach($pages as $page) { $c++; diff --git a/pages/pages-1.php b/pages/pages-1.php index a9f1cd8..7652036 100755 --- a/pages/pages-1.php +++ b/pages/pages-1.php @@ -32,6 +32,12 @@ $news_per_page = 10; $result = bring_the_news_back_home($actual_page, $news_per_page, "../mySQLconnect.php"); + + if (count($result) <= 3) { + echo ""; + } diff --git a/pages/pages-2.php b/pages/pages-2.php index 16ce4d4..e939b52 100755 --- a/pages/pages-2.php +++ b/pages/pages-2.php @@ -32,6 +32,12 @@ $news_per_page = 10; $result = bring_the_news_back_home($actual_page, $news_per_page, "../mySQLconnect.php"); + + if (count($result) <= 3) { + echo ""; + } diff --git a/pages/print_page_data.php b/pages/print_page_data.php index 3aa32ed..f67557d 100755 --- a/pages/print_page_data.php +++ b/pages/print_page_data.php @@ -16,6 +16,12 @@ function php_code($num_page, $news_per_page){ ' $result = bring_the_news_back_home($actual_page, $news_per_page, "../mySQLconnect.php"); + + if (count($result) <= 3) { + echo ""; + } ',