<?php require_once __DIR__.'/includes/functions.php'; header('Content-Type: application/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc><?=e(base_url('/'))?></loc><priority>1.0</priority></url>
<url><loc><?=e(base_url('browse.php'))?></loc><priority>0.9</priority></url>
<url><loc><?=e(base_url('companies.php'))?></loc><priority>0.9</priority></url>
<?php foreach(all_rows('SELECT slug FROM mj_countries WHERE is_active=1') as $c): ?><url><loc><?=e(base_url($c['slug'].'/'))?></loc><priority>0.9</priority></url><?php endforeach; ?>
<?php foreach(all_rows("SELECT id,updated_at FROM mj_listings WHERE status IN ('active','pending','approved','published') ORDER BY id DESC LIMIT 50000") as $l): ?><url><loc><?=e(base_url('listing.php?id='.$l['id']))?></loc><lastmod><?=e(substr($l['updated_at'],0,10))?></lastmod><priority>0.7</priority></url><?php endforeach; ?>
<?php foreach(all_rows("SELECT id,updated_at FROM mj_companies WHERE status IN ('active','pending','approved','published') ORDER BY id DESC LIMIT 50000") as $c): ?><url><loc><?=e(base_url('company.php?id='.$c['id']))?></loc><lastmod><?=e(substr($c['updated_at'],0,10))?></lastmod><priority>0.7</priority></url><?php endforeach; ?>
</urlset>
