<?php
header('Content-Type: application/xml; charset=UTF-8');

$base = 'https://zsozsosoft.hu';
$today = date('Y-m-d');

// Statikus oldalak (mostani menü)
$urls = [
  ['loc' => '/',              'lastmod' => $today, 'changefreq' => 'weekly',  'priority' => '1.0'],
  ['loc' => '/informatika/',  'lastmod' => $today, 'changefreq' => 'monthly', 'priority' => '0.8'],
  ['loc' => '/emost/',        'lastmod' => $today, 'changefreq' => 'monthly', 'priority' => '0.8'],
  ['loc' => '/szolgaltatasok/','lastmod'=> $today, 'changefreq' => 'monthly', 'priority' => '0.8'],
  ['loc' => '/alkotomuhely/', 'lastmod' => $today, 'changefreq' => 'monthly', 'priority' => '0.8'],
  ['loc' => '/hir/',          'lastmod' => $today, 'changefreq' => 'weekly',  'priority' => '0.7'],
  ['loc' => '/kapcsolat/',    'lastmod' => $today, 'changefreq' => 'yearly',  'priority' => '0.6'],
  ['loc' => '/adatkezeles/',  'lastmod' => $today, 'changefreq' => 'yearly',  'priority' => '0.4'],
];

// Ha később lesz DB-s híroldal, ide be tudjuk húzni a /hir/slug/ url-eket is.

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";

foreach ($urls as $u) {
  echo "  <url>\n";
  echo "    <loc>{$base}{$u['loc']}</loc>\n";
  echo "    <lastmod>{$u['lastmod']}</lastmod>\n";
  echo "    <changefreq>{$u['changefreq']}</changefreq>\n";
  echo "    <priority>{$u['priority']}</priority>\n";
  echo "  </url>\n";
}

echo "</urlset>\n";