-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsitemap.php
52 lines (45 loc) · 1.74 KB
/
sitemap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
// any new page must start with the page_header, it will include the correct files
// so that the rezgo parser classes and functions will be available to your templates
require('rezgo/include/page_header.php');
// start a new instance of RezgoSite
$site = new RezgoSite();
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$now = date("c", strtotime('now'));
?>
<!-- generated-on="<?php echo date("F d, Y g:i a", strtotime('now'))?>" -->
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://<?php echo $_SERVER[HTTP_HOST]?>/</loc>
<lastmod><?php echo $now?></lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://<?php echo $_SERVER[HTTP_HOST]?>/about</loc>
<lastmod><?php echo $now?></lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://<?php echo $_SERVER[HTTP_HOST]?>/terms</loc>
<lastmod><?php echo $now?></lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://<?php echo $_SERVER[HTTP_HOST]?>/contact</loc>
<lastmod><?php echo $now?></lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
<?php foreach( $site->getTours() as $item ): ?>
<url>
<loc>https://<?php echo $_SERVER[HTTP_HOST]?>/details/<?php echo $item->uid?>/<?php echo $site->seoEncode($item->item)?></loc>
<lastmod><?php echo date("c", (int) $item->updated)?></lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<?php endforeach; ?>
</urlset>