<?php
header('Content-Type: application/xml; charset=utf-8');
$base = 'https://www.pikselanalitik.com';

$pages = [
    ['url' => '/', 'priority' => '1.0', 'changefreq' => 'weekly'],
    ['url' => '/hakkimizda', 'priority' => '0.8', 'changefreq' => 'monthly'],
    ['url' => '/cozumler', 'priority' => '0.9', 'changefreq' => 'monthly'],
    ['url' => '/sektorler', 'priority' => '0.8', 'changefreq' => 'monthly'],
    ['url' => '/projeler', 'priority' => '0.8', 'changefreq' => 'monthly'],
    ['url' => '/teknolojiler', 'priority' => '0.7', 'changefreq' => 'monthly'],
    ['url' => '/blog', 'priority' => '0.7', 'changefreq' => 'weekly'],
    ['url' => '/sik-sorulan-sorular', 'priority' => '0.8', 'changefreq' => 'monthly'],
    ['url' => '/iletisim', 'priority' => '0.8', 'changefreq' => 'monthly'],
    ['url' => '/teklif-al', 'priority' => '0.9', 'changefreq' => 'monthly'],
    ['url' => '/gizlilik-politikasi', 'priority' => '0.3', 'changefreq' => 'yearly'],
    ['url' => '/cerez-politikasi', 'priority' => '0.3', 'changefreq' => 'yearly'],
    ['url' => '/kvkk', 'priority' => '0.3', 'changefreq' => 'yearly'],
];

$services = [
    'endustriyel-goruntu-isleme', 'yapay-zeka-nesne-tespiti', 'kamera-tabanli-kalite-kontrol',
    'uretim-takip-sistemleri', 'dijital-ikiz', 'plc-iot-entegrasyonu', 'erp-web-otomasyon',
    'mobil-web-uygulama', 'veri-analizi-kpi',
];
foreach ($services as $s) {
    $pages[] = ['url' => '/cozumler/' . $s, 'priority' => '0.8', 'changefreq' => 'monthly'];
}

$sectors = [
    'gida-un-sanayi', 'tarim', 'ambalaj-paketleme', 'geri-donusum', 'savunma',
    'lojistik', 'uretim-imalat', 'depo-stok',
];
foreach ($sectors as $s) {
    $pages[] = ['url' => '/sektorler/' . $s, 'priority' => '0.7', 'changefreq' => 'monthly'];
}

$projects = [
    'pxl-core', 'lineguard', 'ozbal-un-uretim-yonetim', 'canli-uretim-kantar',
    'silo-yonetim', 'piksel-vcard', 'piksel-menu', 'piksel-takip',
    'is-akisi-takip', 'drone-tespit', 'plaka-tanima', 'geri-donusum-ayrisma',
    'personel-takip', 'tarimsal-urun-tespit', 'nesne-sayim', 'temizciburada',
];
foreach ($projects as $p) {
    $pages[] = ['url' => '/projeler/' . $p, 'priority' => '0.7', 'changefreq' => 'monthly'];
}

echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
foreach ($pages as $p) {
    echo '<url>';
    echo '<loc>' . $base . $p['url'] . '</loc>';
    echo '<lastmod>' . date('Y-m-d') . '</lastmod>';
    echo '<changefreq>' . $p['changefreq'] . '</changefreq>';
    echo '<priority>' . $p['priority'] . '</priority>';
    echo '</url>';
}
echo '</urlset>';
