From 7e18620bd8a98f9d17dcd3d84e4acb4267e05c5e Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Thu, 2 Nov 2023 00:23:59 +0530 Subject: [PATCH] (feature): implemented dynamic socials section for mobile navbar --- htdocs/assets/_footer.php | 10 +++++----- htdocs/assets/_header.php | 20 ++++++++++++++------ htdocs/assets/_integrate.php | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/htdocs/assets/_footer.php b/htdocs/assets/_footer.php index 53ac8dd..86b234d 100644 --- a/htdocs/assets/_footer.php +++ b/htdocs/assets/_footer.php @@ -34,13 +34,13 @@
Follow Me On
num_rows > 0) { + $footer_socials = fetch_all_records($conn, "socials"); + + if($footer_socials -> num_rows > 0) { //show all social links - while($social = $socials -> fetch_assoc()) { + while($footer_social = $footer_socials -> fetch_assoc()) { echo " - ".$social['platform']." + ".$footer_social['platform']." "; } } diff --git a/htdocs/assets/_header.php b/htdocs/assets/_header.php index 74c8783..665d7de 100644 --- a/htdocs/assets/_header.php +++ b/htdocs/assets/_header.php @@ -58,12 +58,20 @@ function isPageActive($pageName) {
- - - - - - + num_rows > 0) { + //show all social links + while($header_social = $header_socials -> fetch_assoc()) { + echo " + + "; + } + } + + ?>
diff --git a/htdocs/assets/_integrate.php b/htdocs/assets/_integrate.php index 65fad7c..6a86198 100644 --- a/htdocs/assets/_integrate.php +++ b/htdocs/assets/_integrate.php @@ -3,5 +3,5 @@ - + \ No newline at end of file