📁 File Manager
Editing:
/home/wvl7mof7402e/www/chem/footer.php
<?php /** * Pure Chemical - Frontend Footer * File: /footer.php * * Dynamic footer * - Site settings * - Social links * - Footer menus * - Contact information * - Newsletter UI * - Responsive premium design */ declare(strict_types=1); /* |-------------------------------------------------------------------------- | DATABASE |-------------------------------------------------------------------------- */ if (!isset($pdo)) { require_once __DIR__ . '/admin/includes/db.php'; } /* |-------------------------------------------------------------------------- | HELPERS |-------------------------------------------------------------------------- */ if (!function_exists('footer_e')) { function footer_e(?string $value): string { return htmlspecialchars( (string) ($value ?? ''), ENT_QUOTES, 'UTF-8' ); } } if (!function_exists('footer_url')) { function footer_url(?string $url): string { $url = trim((string) $url); if ($url === '') { return '#'; } if ( str_starts_with($url, 'http://') || str_starts_with($url, 'https://') || str_starts_with($url, '//') || str_starts_with($url, '#') || str_starts_with($url, 'mailto:') || str_starts_with($url, 'tel:') ) { return $url; } return '/' . ltrim($url, '/'); } } if (!function_exists('footer_query')) { function footer_query(PDO $pdo, string $sql, array $params = []): array { try { $stmt = $pdo->prepare($sql); $stmt->execute($params); return $stmt->fetchAll(); } catch (Throwable $e) { error_log('[Footer] ' . $e->getMessage()); return []; } } } /* |-------------------------------------------------------------------------- | SITE SETTINGS & DEFAULT VALUES |-------------------------------------------------------------------------- */ $footerSettings = []; if (isset($pdo) && $pdo instanceof PDO) { try { $stmt = $pdo->query("SELECT setting_key, setting_value FROM site_settings WHERE status = 1"); foreach ($stmt->fetchAll() as $row) { $footerSettings[$row['setting_key']] = $row['setting_value']; } } catch (Throwable $e) {} } // Updated Values $companyName = 'OPPULENT CHEMICALLS EXCELLENCE INNOVATION'; $companyDescription = 'Leading the way in chemical innovation and excellence globally.'; $phone = '+91 7428 465 992'; $email = 'V.Kumar1087@gmail.com'; $address = 'PLOT NUMBER K-132, SECOND FLOOR, SITE-5, UPSIDA, KASNA, GREATER NOIDA 201308'; $logo = 'image_2f5ebb.jpg'; // Setting your provided logo $copyright = '© ' . date('Y') . ' ' . $companyName . '. All rights reserved.'; $newsletterTitle = 'Stay Connected'; $newsletterDescription = 'Get the latest updates, insights and company news directly in your inbox.'; /* |-------------------------------------------------------------------------- | SOCIAL LINKS |-------------------------------------------------------------------------- */ $socialLinks = []; if (isset($pdo) && $pdo instanceof PDO) { $socialLinks = footer_query($pdo, "SELECT * FROM social_links WHERE status = 1 ORDER BY sort_order ASC, id ASC"); } /* |-------------------------------------------------------------------------- | FOOTER MENUS |-------------------------------------------------------------------------- */ $footerMenus = []; if (isset($pdo) && $pdo instanceof PDO) { try { $footerMenus = footer_query( $pdo, "SELECT m.id, m.name, m.slug, m.location FROM menus m WHERE m.status = 1 AND (LOWER(m.location) LIKE '%footer%' OR LOWER(m.slug) LIKE '%footer%' OR LOWER(m.name) LIKE '%footer%') ORDER BY m.sort_order ASC, m.id ASC" ); } catch (Throwable $e) { $footerMenus = []; } } if (empty($footerMenus)) { $footerMenus = [ ['id' => 0, 'name' => 'Company', 'slug' => 'company', 'location' => 'footer'], ['id' => 0, 'name' => 'Products', 'slug' => 'products', 'location' => 'footer'], ['id' => 0, 'name' => 'Resources', 'slug' => 'resources', 'location' => 'footer'] ]; } $footerMenuItems = []; if (isset($pdo) && $pdo instanceof PDO) { foreach ($footerMenus as $menu) { if ((int) $menu['id'] === 0) continue; $items = footer_query($pdo, "SELECT * FROM menu_items WHERE menu_id = ? AND status = 1 ORDER BY sort_order ASC, id ASC", [$menu['id']]); $footerMenuItems[(int) $menu['id']] = $items; } } // Fallback items if DB is empty if(empty($footerMenuItems[0])) { $footerMenuItems[0] = [ ['title' => 'About Us', 'url' => 'about-us.php'], ['title' => 'Our Legacy', 'url' => 'our-legacy.php'], ['title' => 'CSR', 'url' => 'social-responsibilities.php'] ]; $footerMenuItems[1] = [ ['title' => 'Basic Chemicals', 'url' => 'basic-chemicals.php'], ['title' => 'Performance Chemicals', 'url' => 'performance-chemicals.php'], ['title' => 'Lab Chemicals', 'url' => 'lab-chemicals.php'] ]; $footerMenuItems[2] = [ ['title' => 'Contact Us', 'url' => 'contact-us.php'], ['title' => 'Privacy Policy', 'url' => 'privacy-policy.php'] ]; } $phoneHref = 'tel:' . preg_replace('/[^0-9+]/', '', $phone); $emailHref = 'mailto:' . $email; ?> <footer class="pc-footer"> <!-- ===================================================== FOOTER MAIN ===================================================== --> <div class="pc-footer-main"> <div class="pc-footer-container"> <div class="pc-footer-grid"> <!-- ========================================= COMPANY & LOGO ========================================= --> <div class="pc-footer-company"> <h3 class="pc-footer-about-title"> <span>Oppulent Chemicals</span> </h3> <p class="pc-footer-description"> Oppulent Chemicals is committed to delivering quality chemical products and dependable solutions for diverse industrial applications. We strive for excellence through a strong focus on product quality, innovation, reliability, and customer satisfaction. Our goal is to build lasting partnerships and contribute to the evolving needs of industries. </p> <style> .pc-footer-company { max-width: 390px; color: #d5dfed; } .pc-footer-about-title { margin: 0 0 14px; color: #ffffff; font-size: 23px; font-weight: 800; line-height: 1.5; } .pc-footer-about-title span { color: #50d3df; } .pc-footer-about-line { width: 55px; height: 3px; margin-bottom: 18px; border-radius: 10px; background: linear-gradient(90deg, #16b8c9, #50d3df); } .pc-footer-description { margin: 0 0 20px; color: #bdcadd; font-size: 14px; line-height: 1.9; font-weight: 400; } .pc-footer-about-points { display: flex; flex-direction: column; gap: 11px; } .pc-footer-about-points span { display: flex; align-items: center; gap: 10px; color: #e0e9f4; font-size: 13px; font-weight: 500; } .pc-footer-about-points i { color: #50d3c5; font-size: 15px; } @media (max-width: 576px) { .pc-footer-about-title { font-size: 21px; } .pc-footer-description { font-size: 13px; line-height: 1.8; } } </style> <div class="pc-footer-social mt-4"> <!-- Default Social Links fallback --> <a href="#" target="_blank"><i class="fab fa-facebook-f"></i></a> <a href="#" target="_blank"><i class="fab fa-twitter"></i></a> <a href="#" target="_blank"><i class="fab fa-linkedin-in"></i></a> <a href="#" target="_blank"><i class="fab fa-instagram"></i></a> </div> </div> <!-- ========================================= FOOTER MENUS ========================================= --> <?php $displayedMenuColumns = 0; foreach ($footerMenus as $index => $menu): if ($displayedMenuColumns >= 3) break; $menuName = $menu['name'] ?? ''; $items = $footerMenuItems[$index] ?? []; if (empty($items)) continue; $displayedMenuColumns++; ?> <div class="pc-footer-column"> <h3><?= footer_e($menuName) ?></h3> <ul> <?php foreach ($items as $item): $itemTitle = $item['title'] ?? ''; $itemUrl = $item['url'] ?? '#'; ?> <li> <a href="<?= footer_e($itemUrl) ?>"> <span><?= footer_e($itemTitle) ?></span> <i class="fa-solid fa-arrow-right"></i> </a> </li> <?php endforeach; ?> </ul> </div> <?php endforeach; ?> <!-- ========================================= CONTACT ========================================= --> <div class="pc-footer-column pc-footer-contact"> <h3>Contact Info</h3> <div class="pc-footer-contact-item"> <span class="pc-contact-icon"><i class="fa-solid fa-location-dot"></i></span> <div> <small>Office Address</small> <p><?= nl2br(footer_e($address)) ?></p> </div> </div> <div class="pc-footer-contact-item"> <span class="pc-contact-icon"><i class="fa-solid fa-phone"></i></span> <div> <small>Call Us</small> <a href="<?= footer_e($phoneHref) ?>"><?= footer_e($phone) ?></a> </div> </div> <div class="pc-footer-contact-item"> <span class="pc-contact-icon"><i class="fa-regular fa-envelope"></i></span> <div> <small>Email Us</small> <a href="<?= footer_e($emailHref) ?>"><?= footer_e($email) ?></a> </div> </div> </div> </div> </div> </div> <style> /* ========================================= PURE CHEMICAL — PREMIUM FOOTER HEADINGS ========================================= */ .pc-footer-column h3 { position: relative; display: inline-block; margin: 0 0 27px; padding-bottom: 13px; font-family: "Manrope", sans-serif; font-size: 19px; font-weight: 800; line-height: 1.4; letter-spacing: 0.3px; color: #ffffff; background: linear-gradient( 90deg, #ffffff 0%, #70e1ed 55%, #29b6d2 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } /* Colorful underline */ .pc-footer-column h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; border-radius: 10px; background: linear-gradient( 90deg, #00c9d8, #398bff ); transition: width 0.3s ease; -webkit-text-fill-color: initial; } /* Heading hover animation */ .pc-footer-column:hover h3::after { width: 78px; } /* Menu links */ .pc-footer-column ul { list-style: none; margin: 0; padding: 0; } .pc-footer-column ul li { margin-bottom: 13px; } .pc-footer-column ul li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #c1cede; text-decoration: none; font-size: 13.5px; line-height: 1.7; transition: color 0.25s ease, padding-left 0.25s ease; } .pc-footer-column ul li a i { flex-shrink: 0; color: #36c9dc; font-size: 11px; opacity: 0; transform: translateX(-5px); transition: all 0.25s ease; } .pc-footer-column ul li a:hover { color: #63e0ec; padding-left: 5px; } .pc-footer-column ul li a:hover i { opacity: 1; transform: translateX(0); } /* Contact details */ .pc-footer-contact-item { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 21px; } .pc-footer-contact-item .pc-contact-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 39px; width: 39px; height: 39px; border: 1px solid rgba(65, 207, 225, 0.28); border-radius: 12px; color: #65dce8; background: rgba(25, 170, 196, 0.10); transition: all 0.25s ease; } .pc-footer-contact-item:hover .pc-contact-icon { color: #ffffff; background: linear-gradient(135deg, #087ea4, #16b8c9); border-color: transparent; transform: translateY(-2px); } .pc-footer-contact-item small { display: block; margin-bottom: 5px; color: #65dce8; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; } .pc-footer-contact-item p, .pc-footer-contact-item a { margin: 0; color: #d0d9e7; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; text-decoration: none; transition: color 0.25s ease; } .pc-footer-contact-item a:hover { color: #65dce8; } /* Mobile responsive */ @media (max-width: 576px) { .pc-footer-column h3 { font-size: 18px; margin-bottom: 22px; } .pc-footer-column ul li a { font-size: 13px; } .pc-footer-contact-item { gap: 11px; } } </style> <!-- ===================================================== FOOTER BOTTOM ===================================================== --> <div class="pc-footer-bottom"> <div class="pc-footer-container"> <div class="pc-footer-bottom-inner"> <div class="pc-footer-copyright"> <?= footer_e($copyright) ?> </div> <div class="pc-footer-credit"> <span>Designed & Developed by</span> <a href="https://capapp.in/" target="_blank" rel="noopener noreferrer"> <strong>CAPAPP IT SOLUTION</strong></a> </div> <div class="pc-footer-legal"> <a href="privacy-policy.php">Privacy Policy</a> <span></span> <a href="terms.php">Terms & Conditions</a> <span></span> <a href="#">Sitemap</a> </div> </div> </div> </div> </footer> <!-- BACK TO TOP --> <button type="button" class="pc-back-top" id="pcBackTop" aria-label="Back to top"> <i class="fa-solid fa-arrow-up"></i> </button> <style> /* PREMIUM PURE CHEMICAL FOOTER — responsive, newsletter removed */ .pc-footer, .pc-footer * { box-sizing: border-box; } .pc-footer { position: relative; width: 100%; overflow: hidden; color: #f7f9fc; background: #071522; font-family: "Manrope", "Inter", Arial, sans-serif; } .pc-footer-main { position: relative; padding: 76px 0 58px; background: radial-gradient(circle at 82% 8%, rgba(21, 135, 181, .15), transparent 30%), radial-gradient(circle at 5% 100%, rgba(207, 34, 41, .09), transparent 27%), #071522; } .pc-footer-container { width: min(1320px, calc(100% - 48px)); max-width: 100%; margin: 0 auto; } .pc-footer-grid { display: grid; grid-template-columns: minmax(210px, 1.3fr) repeat(3, minmax(125px, .78fr)) minmax(220px, 1.12fr); gap: 32px; } .pc-footer-company, .pc-footer-column { min-width: 0; } .pc-footer-logo { display: inline-flex; align-items: center; max-width: 100%; margin-bottom: 19px !important; text-decoration: none; } .pc-footer-logo img { display: block; width: auto; max-width: 220px; max-height: 78px; object-fit: contain; border-radius: 8px; } .pc-footer-description { max-width: 310px; margin: 0; color: #aab8c6; font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; } .pc-footer-social { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; } .pc-footer-social a { display: inline-flex; width: 39px; height: 39px; align-items: center; justify-content: center; color: #d2dce5; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.035); text-decoration: none; transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease; } .pc-footer-social a:hover { color: #fff; background: #cf2229; border-color: #cf2229; transform: translateY(-3px); } .pc-footer-column h3 { margin: 5px 0 22px; color: #fff; font-size: 15px; font-weight: 750; letter-spacing: .2px; } .pc-footer-column h3::after { content: ""; display: block; width: 32px; height: 2px; margin-top: 12px; border-radius: 5px; background: #cf2229; } .pc-footer-column ul { list-style: none; padding: 0; margin: 0; } .pc-footer-column li { margin: 0 0 12px; } .pc-footer-column li a { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #aab8c6; font-size: 13px; line-height: 1.7; text-decoration: none; overflow-wrap: anywhere; transition: color .2s ease, transform .2s ease; } .pc-footer-column li a:hover { color: #fff; transform: translateX(3px); } .pc-footer-column li a i { flex: 0 0 auto; color: #ff7379; opacity: 0; transition: opacity .2s ease; } .pc-footer-column li a:hover i { opacity: 1; } .pc-footer-contact-item { display: flex; min-width: 0; align-items: flex-start; gap: 12px; margin: 0 0 17px; } .pc-contact-icon { display: flex; flex: 0 0 38px; width: 38px; height: 38px; align-items: center; justify-content: center; color: #ff7379; font-size: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.045); } .pc-footer-contact-item > div { min-width: 0; } .pc-footer-contact-item small { display: block; margin: 1px 0 5px; color: #8294a5; font-size: 10px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; } .pc-footer-contact-item p, .pc-footer-contact-item a { display: block; margin: 0; color: #e3eaf0; font-size: 12px; line-height: 1.75; text-decoration: none; overflow-wrap: anywhere; } .pc-footer-contact-item a:hover { color: #ff7379; } .pc-footer-bottom { padding: 22px 0; background: #040c14; border-top: 1px solid rgba(255,255,255,.09); } .pc-footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; } .pc-footer-copyright { margin: 0; color: #8b9aa8; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; } .pc-footer-credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px 9px; color: #9aa9b6; font-size: 11px; } .pc-footer-credit strong { color: #fff; font-size: 11px; letter-spacing: .35px; } .pc-footer-credit a { color: #ff858a; text-decoration: none; transition: color .2s ease; } .pc-footer-credit a:hover { color: #fff; text-decoration: underline; } .pc-footer-credit-separator { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: #6d7c89; } .pc-footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .pc-footer-legal a { color: #8b9aa8; font-size: 11px; text-decoration: none; transition: color .2s ease; } .pc-footer-legal a:hover { color: #ff858a; } .pc-footer-legal span { width: 3px; height: 3px; border-radius: 50%; background: #53616e; } .pc-back-top { position: fixed; z-index: 999; right: 24px; bottom: 24px; display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: #fff; background: #cf2229; border: 0; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .25s ease; } .pc-back-top.show { opacity: 1; visibility: visible; transform: translateY(0); } .pc-back-top:hover { background: #a81c22; } @media (max-width: 1100px) { .pc-footer-main { padding: 62px 0 46px; } .pc-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 28px; } } @media (max-width: 768px) { .pc-footer-container { width: calc(100% - 36px); } .pc-footer-main { padding: 48px 0 38px; } .pc-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 22px; } .pc-footer-company { grid-column: 1 / -1; } .pc-footer-logo img { max-height: 68px; max-width: 200px; } .pc-footer-description { max-width: 500px; } .pc-footer-bottom-inner { align-items: flex-start; flex-direction: column; gap: 13px; } .pc-footer-credit { justify-content: flex-start; } .pc-back-top { right: 15px; bottom: 15px; width: 41px; height: 41px; } } @media (max-width: 480px) { .pc-footer-container { width: calc(100% - 30px); } .pc-footer-main { padding: 38px 0 30px; } .pc-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; } .pc-footer-company { grid-column: auto; } .pc-footer-column h3 { margin-bottom: 16px; font-size: 15px; } .pc-footer-column li { margin-bottom: 10px; } .pc-footer-contact-item { gap: 11px; } .pc-footer-contact-item p, .pc-footer-contact-item a { font-size: 12px; } .pc-footer-bottom { padding: 19px 0; } .pc-footer-credit { align-items: flex-start; justify-content: flex-start; } .pc-footer-legal { gap: 8px; } .pc-footer-legal a { font-size: 11px; } } @media (max-width: 360px) { .pc-footer-container { width: calc(100% - 24px); } .pc-footer-description { font-size: 12px; } .pc-footer-credit { font-size: 10px; } } @media (prefers-reduced-motion: reduce) { .pc-footer *, .pc-back-top { transition-duration: .01ms !important; scroll-behavior: auto !important; } } </style> <script> (function () { const button = document.getElementById('pcBackTop'); if (!button) return; function toggleBackTop() { if (window.scrollY > 300) { button.classList.add('show'); } else { button.classList.remove('show'); } } window.addEventListener('scroll', toggleBackTop, { passive: true }); button.addEventListener('click', function () { window.scrollTo({ top: 0, behavior: 'smooth' }); }); toggleBackTop(); })(); </script>
Save
Cancel