getMessage()); } // Initialize variables $address = null; $phone1 = null; $phone2 = null; $email = null; $working_hours = null; $footer_logo = null; $facebook_url = null; $twitter_url = null; $instagram_url = null; $youtube_url = null; $footer_content = null; // Fetch site configuration from site_config if ($db instanceof PDO) { try { $stmt = $db->prepare("SELECT address, phone1, phone2, email, working_hours, footer_logo, facebook_url, twitter_url, instagram_url, youtube_url FROM site_config WHERE id = 1 LIMIT 1"); $stmt->execute(); $site_config = $stmt->fetch(PDO::FETCH_ASSOC); if ($site_config) { $address = $site_config['address']; $phone1 = $site_config['phone1']; $phone2 = $site_config['phone2']; $email = $site_config['email']; $working_hours = $site_config['working_hours']; $footer_logo = !empty($site_config['footer_logo']) ? SITE_URL . '/img/site_config/' . $site_config['footer_logo'] : null; $facebook_url = $site_config['facebook_url']; $twitter_url = $site_config['twitter_url']; $instagram_url = $site_config['instagram_url']; $youtube_url = $site_config['youtube_url']; } } catch (Exception $e) { logError("Error fetching site_config in footer: " . $e->getMessage()); } } // Fetch footer content from footer_settings for about_ndf if ($db instanceof PDO) { try { $stmt = $db->prepare("SELECT content FROM footer_settings WHERE section_name = 'about_ndf' AND status = 'active' LIMIT 1"); $stmt->execute(); $footer_text = $stmt->fetch(PDO::FETCH_ASSOC); if ($footer_text) { $footer_content = htmlspecialchars_decode($footer_text['content'], ENT_QUOTES); } } catch (Exception $e) { logError("Error fetching footer text from footer_settings: " . $e->getMessage()); } } ?>