Boarding Pass

Current Path : /home/u869455702/domains/steelblue-goldfinch-156491.hostingersite.com/public_html/
Upload File :
Current File : /home/u869455702/domains/steelblue-goldfinch-156491.hostingersite.com/public_html/index.php

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Petra Tissue - Premium Hygiene Solutions Since 1985</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="assets/styles.css">
    <link rel="icon" type="image/png" href="assets/images/favicon.ico">

</head>

<body>
    <!-- Floating Background Elements -->
    <div class="floating-element"></div>
    <div class="floating-element"></div>

    <!-- Header -->
    <?php include 'includes/header.php'; ?>
    <?php
    include 'includes/db.php';

    // Fetch about section from company_story
    $aboutQuery = $conn->query("SELECT title, content, image FROM company_story ORDER BY id DESC LIMIT 1");
    $about = $aboutQuery->fetch_assoc();

    // Fetch products
    $products = [];
    $productQuery = $conn->query("SELECT id, name, description, image FROM products ORDER BY id ASC LIMIT 3");
    while ($row = $productQuery->fetch_assoc()) {
        $products[] = $row;
    }
    ?>

    <?php
    include 'includes/db.php';

    // Fetch all statistics
    $stats = [];
    $statQuery = $conn->query("SELECT label, value FROM stats ORDER BY id ASC");
    while ($row = $statQuery->fetch_assoc()) {
        $stats[] = $row;
    }
    ?>

    <?php
    include 'includes/db.php';

    // Fetch highlights from database
    $highlights = [];
    $result = $conn->query("SELECT icon, title, description FROM highlights ORDER BY id ASC");
    while ($row = $result->fetch_assoc()) {
        $highlights[] = $row;
    }
    ?>
    <?php
    include 'includes/db.php';

    $testimonials = [];
    $query = $conn->query("SELECT author_name, author_title, quote, rating FROM testimonials ORDER BY created_at DESC LIMIT 5");
    while ($row = $query->fetch_assoc()) {
        $testimonials[] = $row;
    }
    ?>


    <!-- Hero Section -->
    <section class="hero">
        <div class="container">
            <h1>Premium Hygiene Solutions <span>Since 1985</span></h1>
            <p>Petra Tissue Company delivers exceptional quality tissue products with a perfect balance of softness, strength, and sustainability for homes and businesses worldwide.</p>
            <div>
                <a href="products.php" class="btn">Explore Products</a>
                <a href="contact.php" class="btn btn-outline">Contact Us</a>
            </div>
        </div>
    </section>

    <!-- About Section -->
    <!-- About Section -->
    <section class="about">
        <div class="container">
            <div class="section-title reveal fade-bottom">
                <h2>About Us</h2>
            </div>
            <div class="about-content reveal fade-bottom">
                <div class="about-text">
                    <h3><?= htmlspecialchars($about['title']) ?></h3>
                    <p><?= nl2br(htmlspecialchars($about['content'])) ?></p>
                    <a href="about.php" class="btn">Our Story</a>
                </div>
                <div class="about-image">
                    <img src="uploads/<?= htmlspecialchars($about['image']) ?>" alt="<?= htmlspecialchars($about['title']) ?>">
                </div>
            </div>
        </div>
    </section>


    <section class="features">
        <div class="container">
            <div class="section-title reveal fade-bottom">
                <h2>Why Choose Petra Tissue?</h2>
            </div>
            <div class="features-grid reveal fade-bottom">
                <?php foreach ($highlights as $highlight): ?>
                    <div class="feature-card">
                        <div class="feature-icon">
                            <i class="<?= htmlspecialchars($highlight['icon']) ?>"></i>
                        </div>
                        <h3><?= htmlspecialchars($highlight['title']) ?></h3>
                        <p><?= htmlspecialchars($highlight['description']) ?></p>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>

    <!-- Stats Section -->
    <section class="stats">
        <div class="container">
            <div class="stats-grid reveal fade-bottom">
                <?php foreach ($stats as $index => $stat): ?>
                    <div class="stat-item">
                        <div class="stat-number" id="statCounter<?= $index ?>">0</div>
                        <div class="stat-label"><?= htmlspecialchars($stat['label']) ?></div>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>


    <!-- Products Section -->
    <section class="products">
        <div class="container">
            <div class="section-title reveal fade-bottom">
                <h2>Our Product Range</h2>
            </div>
            <div class="products-grid reveal fade-bottom">
                <?php foreach ($products as $product): ?>
                    <div class="product-card">
                        <div class="product-image">
                            <img src="uploads/<?php echo htmlspecialchars($product['image']); ?>" alt="<?php echo htmlspecialchars($product['name']); ?>">
                        </div>
                        <div class="product-info">
                            <h3><?php echo htmlspecialchars($product['name']); ?></h3>
                            <p><?php echo htmlspecialchars($product['description']); ?></p>
                            <a href="product-detail.php?id=<?php echo $product['id']; ?>" class="btn">View Details</a>
                        </div>
                    </div>
                <?php endforeach; ?>

            </div>
        </div>
    </section>



    <!-- Testimonials Section -->
    <section class="testimonials">
        <div class="container">
            <div class="section-title reveal fade-bottom">
                <h2>Trusted By Industry Leaders</h2>
            </div>
            <div class="testimonials-slider reveal fade-bottom">
                <?php foreach ($testimonials as $i => $testimonial): ?>
                    <div class="testimonial" style="<?= $i === 0 ? '' : 'display: none;' ?>">
                        <div class="stars">
                            <?php for ($j = 0; $j < 5; $j++): ?>
                                <i class="fas fa-star" style="color:<?= $j < $testimonial['rating'] ? '#A4D65E' : '#ddd' ?>"></i>
                            <?php endfor; ?>
                        </div>
                        <p>"<?= htmlspecialchars($testimonial['quote']) ?>"</p>
                        <div class="author">
                            <?= htmlspecialchars($testimonial['author_name']) ?>
                            <?php if (!empty($testimonial['author_title'])): ?>,
                            <?= htmlspecialchars($testimonial['author_title']) ?>
                        <?php endif; ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

        </div>
    </section>


    <!-- CTA Section -->
    <section class="cta">
        <div class="container">
            <h2 class="reveal fade-bottom">Ready to Experience Petra Quality?</h2>
            <p class="reveal fade-bottom">Join thousands of satisfied customers who trust Petra Tissue for their hygiene needs. Contact our sales team today to discuss your requirements.</p>
            <a href="contact.php" class="btn reveal fade-bottom">Get in Touch</a>
        </div>
    </section>

    <!-- Footer -->
    <?php include 'includes/footer.php' ?>

    <script>
        // Mobile Menu Toggle
        const mobileMenuBtn = document.getElementById('mobileMenuBtn');
        const mainNav = document.getElementById('mainNav');
        const mainHeader = document.getElementById('mainHeader');

        mobileMenuBtn.addEventListener('click', () => {
            mainNav.classList.toggle('active');
            mobileMenuBtn.innerHTML = mainNav.classList.contains('active') ?
                '<i class="fas fa-times"></i>' :
                '<i class="fas fa-bars"></i>';
        });

        // Header scroll effect
        window.addEventListener('scroll', () => {
            if (window.scrollY > 100) {
                mainHeader.classList.add('scrolled');
            } else {
                mainHeader.classList.remove('scrolled');
            }
        });

        // Scroll reveal animation
        function reveal() {
            const reveals = document.querySelectorAll('.reveal');

            for (let i = 0; i < reveals.length; i++) {
                const windowHeight = window.innerHeight;
                const revealTop = reveals[i].getBoundingClientRect().top;
                const revealPoint = 150;

                if (revealTop < windowHeight - revealPoint) {
                    reveals[i].classList.add('active');
                }
            }
        }

        window.addEventListener('scroll', reveal);

        // Initialize animation on page load


        // Smooth scrolling for anchor links
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function(e) {
                e.preventDefault();

                const targetId = this.getAttribute('href');
                if (targetId === '#') return;

                const targetElement = document.querySelector(targetId);
                if (targetElement) {
                    window.scrollTo({
                        top: targetElement.offsetTop - 100,
                        behavior: 'smooth'
                    });

                    // Close mobile menu if open
                    if (mainNav.classList.contains('active')) {
                        mainNav.classList.remove('active');
                        mobileMenuBtn.innerHTML = '<i class="fas fa-bars"></i>';
                    }
                }
            });
        });



        document.addEventListener("DOMContentLoaded", function() {
            const testimonials = document.querySelectorAll(".testimonial");
            let current = 0;

            function showNextTestimonial() {
                testimonials[current].style.display = "none";
                current = (current + 1) % testimonials.length;
                testimonials[current].style.display = "block";
            }

            // Initially show the first
            testimonials.forEach((t, i) => {
                t.style.display = i === 0 ? "block" : "none";
            });

            // Cycle every 6 seconds
            setInterval(showNextTestimonial, 6000);
        });
    </script>

    <!-- Newsletter Popup -->
    <div id="newsletterPopup" class="popup-overlay" style="display: none;">
        <div class="popup-box">
            <button class="popup-close" onclick="closePopup()">×</button>
            <img src="assets/images/logo.png" alt="Newsletter Icon" class="popup-image">
            <h2>Subscribe to our <strong>Newsletter!</strong></h2>
            <p>Subscribe to our newsletter and stay updated.</p>
            <form id="subscribeForm">
                <div class="input-group">
                    <i class="fas fa-envelope"></i>
                    <input type="email" name="email" id="subscriberEmail" placeholder="Your email" required>
                </div>
                <button type="submit" class="subscribe-btn">Subscribe</button>
            </form>
            <div id="subscribeMessage" style="margin-top: 10px;"></div>
        </div>
    </div>

    <script>
        function getCookie(name) {
            const parts = `; ${document.cookie}`.split(`; ${name}=`);
            if (parts.length === 2) return parts.pop().split(';')[0];
        }

        function setCookie(name, value, days = 365) {
            const expires = new Date(Date.now() + days * 864e5).toUTCString();
            document.cookie = `${name}=${value}; expires=${expires}; path=/`;
        }

        function closePopup() {
            document.getElementById("newsletterPopup").style.display = "none";
        }

        document.addEventListener("DOMContentLoaded", function() {
            if (getCookie("is-subscribed") !== "true") {
                setTimeout(() => {
                    document.getElementById("newsletterPopup").style.display = "flex";
                }, 2000);
            }

            document.getElementById("subscribeForm").addEventListener("submit", function(e) {
                e.preventDefault();
                const email = document.getElementById("subscriberEmail").value.trim();
                const msg = document.getElementById("subscribeMessage");

                if (!email) {
                    msg.textContent = "Please enter a valid email.";
                    msg.style.color = "red";
                    return;
                }

                fetch("subscribe.php", {
                        method: "POST",
                        headers: {
                            "Content-Type": "application/x-www-form-urlencoded"
                        },
                        body: new URLSearchParams({
                            email
                        })
                    })
                    .then(res => res.json())
                    .then(data => {
                        msg.textContent = data.message;
                        msg.style.color = data.success ? "green" : "red";
                        if (data.success) {
                            setCookie("is-subscribed", "true");
                            setTimeout(() => closePopup(), 1500);
                        }
                    })
                    .catch(() => {
                        msg.textContent = "Something went wrong.";
                        msg.style.color = "red";
                    });
            });
        });
    </script>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            // Get values from PHP array
            const values = <?= json_encode(array_column($stats, 'value')) ?>;
            const counters = document.querySelectorAll(".stat-number");

            counters.forEach((counter, index) => {
                const target = parseInt(values[index]);
                let count = 0;
                const step = Math.ceil(target / 100);

                function updateCounter() {
                    count += step;
                    if (count >= target) {
                        counter.textContent = target;
                    } else {
                        counter.textContent = count;
                        requestAnimationFrame(updateCounter);
                    }
                }

                updateCounter();
            });
        });
    </script>


</body>

</html>

Sindabad File Uploader 1.0, Coded By Sindbad EG ~ The Terrorists Not Found
404
Not Found