<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
        http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

    <!-- Homepage -->
    <url>
        <loc>https://truckify.co.za/</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>

    <!-- Services Pages -->
    <url>
        <loc>https://truckify.co.za/services.php</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>

    <!-- Service Articles (Dynamic) -->
    <?php
    // This PHP code will generate dynamic service URLs
    // You can run this script to generate the sitemap
    /*
    require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/config.php";
    $result = $conn->query("SELECT slug, updated_at FROM services WHERE status = 'published'");
    while ($row = $result->fetch_assoc()) {
        echo '<url>';
        echo '    <loc>https://truckify.co.za/' . htmlspecialchars($row['slug']) . '.html</loc>';
        echo '    <lastmod>' . date('Y-m-d', strtotime($row['updated_at'])) . '</lastmod>';
        echo '    <changefreq>monthly</changefreq>';
        echo '    <priority>0.8</priority>';
        echo '</url>';
    }
    */
    ?>

    <!-- About Page -->
    <url>
        <loc>https://truckify.co.za/about.php</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>

    <!-- Contact Page -->
    <url>
        <loc>https://truckify.co.za/contact.php</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>

    <!-- Gallery Page -->
    <url>
        <loc>https://truckify.co.za/gallery.php</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.6</priority>
    </url>

    <!-- Testimonials Page -->
    <url>
        <loc>https://truckify.co.za/testimonials.php</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.6</priority>
    </url>

    <!-- Book Truck Page -->
    <url>
        <loc>https://truckify.co.za/book-truck.php</loc>
        <lastmod>2024-01-01</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.8</priority>
    </url>
</urlset>