<?php
header('Content-Type: application/xml; charset=utf-8');
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
$base = $scheme . '://' . $host;
$today = date('Y-m-d');

$urls = [
  ['loc' => '/', 'priority' => '1.0', 'changefreq' => 'daily'],
  ['loc' => '/community/', 'priority' => '0.9', 'changefreq' => 'weekly'],
  ['loc' => '/about/', 'priority' => '0.8', 'changefreq' => 'monthly'],
  ['loc' => '/growth/', 'priority' => '0.9', 'changefreq' => 'weekly'],
  ['loc' => '/member/', 'priority' => '0.8', 'changefreq' => 'weekly'],
  ['loc' => '/content/', 'priority' => '0.9', 'changefreq' => 'daily'],
  ['loc' => '/join/', 'priority' => '0.8', 'changefreq' => 'monthly'],
  ['loc' => '/video/', 'priority' => '0.9', 'changefreq' => 'daily'],
  ['loc' => '/salon/', 'priority' => '0.8', 'changefreq' => 'weekly'],
  ['loc' => '/booklist/', 'priority' => '0.7', 'changefreq' => 'monthly'],
  ['loc' => '/apply/', 'priority' => '0.8', 'changefreq' => 'monthly'],
];
?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<?php foreach ($urls as $url): ?>
  <url>
    <loc><?php echo htmlspecialchars($base . $url['loc']); ?></loc>
    <lastmod><?php echo $today; ?></lastmod>
    <changefreq><?php echo $url['changefreq']; ?></changefreq>
    <priority><?php echo $url['priority']; ?></priority>
  </url>
<?php endforeach; ?>
</urlset>
