mirror of
https://github.com/FranP-code/Allnews.com.git
synced 2025-10-13 00:32:45 +00:00
Añadido aspecto de background dependiente de la cantidad de cartas
This commit is contained in:
11
index.php
11
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 '<style>html {
|
||||
background: red;
|
||||
}</style>';
|
||||
}
|
||||
|
||||
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++;
|
||||
|
||||
|
||||
@@ -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 "<style>html {
|
||||
background: rgb(157,211,255);
|
||||
}</style>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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 "<style>html {
|
||||
background: rgb(157,211,255);
|
||||
}</style>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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 "<style>html {
|
||||
background: rgb(157,211,255);
|
||||
}</style>";
|
||||
}
|
||||
|
||||
',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user