array("loc" => "/", "en" => "/en/", "changefreq" => "weekly", "priority" => "1.0"), "tariffs.html" => array("loc" => "/tariffs", "en" => "/en/tariffs", "changefreq" => "weekly", "priority" => "0.9"), "download.html" => array("loc" => "/download", "en" => "/en/download", "changefreq" => "weekly", "priority" => "0.9"), "locations.html" => array("loc" => "/locations", "en" => "/en/locations", "changefreq" => "weekly", "priority" => "0.8"), "referral.html" => array("loc" => "/referral", "en" => "/en/referral", "changefreq" => "monthly", "priority" => "0.8"), "contact.html" => array("loc" => "/contact", "en" => "/en/contact", "changefreq" => "monthly", "priority" => "0.8"), "privacy.html" => array("loc" => "/privacy", "en" => "/en/privacy", "changefreq" => "monthly", "priority" => "0.5"), "offer.html" => array("loc" => "/offer", "en" => "/en/offer", "changefreq" => "monthly", "priority" => "0.5"), "whitelists.html" => array("loc" => "/whitelists", "en" => "/en/whitelists", "changefreq" => "monthly", "priority" => "0.6"), "guide-linux.html" => array("loc" => "/guide-linux", "en" => "/en/guide-linux", "changefreq" => "monthly", "priority" => "0.7"), "guide-router.html" => array("loc" => "/guide-router", "en" => "/en/guide-router", "changefreq" => "monthly", "priority" => "0.7"), "guide-tv-happ.html" => array("loc" => "/guide-tv", "en" => "/en/guide-tv", "changefreq" => "monthly", "priority" => "0.7") ); echo '' . "\n"; echo '' . "\n"; function imba_sitemap_url($origin, $loc, $en, $lastmod, $changefreq, $priority) { $ruAbs = htmlspecialchars($origin . $loc, ENT_QUOTES, "UTF-8"); $enAbs = htmlspecialchars($origin . $en, ENT_QUOTES, "UTF-8"); $changefreq = htmlspecialchars($changefreq, ENT_QUOTES, "UTF-8"); $priority = htmlspecialchars($priority, ENT_QUOTES, "UTF-8"); echo " \n"; echo " " . $ruAbs . "\n"; echo " " . $lastmod . "\n"; echo " " . $changefreq . "\n"; echo " " . $priority . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo " \n"; echo " \n"; echo " " . $enAbs . "\n"; echo " " . $lastmod . "\n"; echo " " . $changefreq . "\n"; echo " " . $priority . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo " \n"; } foreach ($pretty as $name => $meta) { $full = $root . DIRECTORY_SEPARATOR . $name; if (!is_file($full)) { continue; } $enName = basename($name); if ($name === "index.html") { $enFull = $root . DIRECTORY_SEPARATOR . "en" . DIRECTORY_SEPARATOR . "index.html"; } else { $enFull = $root . DIRECTORY_SEPARATOR . "en" . DIRECTORY_SEPARATOR . $enName; } $mtime = filemtime($full); if (is_file($enFull)) { $enMtime = filemtime($enFull); if ($enMtime && $enMtime > $mtime) { $mtime = $enMtime; } } $lastmod = gmdate("Y-m-d", $mtime ? $mtime : time()); imba_sitemap_url($origin, $meta["loc"], $meta["en"], $lastmod, $meta["changefreq"], $meta["priority"]); } echo "\n";