-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsitemap.php
More file actions
62 lines (55 loc) · 1.89 KB
/
sitemap.php
File metadata and controls
62 lines (55 loc) · 1.89 KB
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
53
54
55
56
57
58
59
60
61
<?php
/**
* Allomani E-Store v1.0
*
* @package Allomani.E-Store
* @version 1.0
* @copyright (c) 2006-2018 Allomani , All rights reserved.
* @author Ali Allomani <info@allomani.com>
* @link http://allomani.com
* @license GNU General Public License version 3.0 (GPLv3)
*
*/
require("global.php");
print "<?xml version=\"1.0\" encoding=\"$settings[site_pages_encoding]\" ?> \n";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<?
//---------- cats -------------
$qr=db_query("select id,name from store_products_cats where active=1 order by id desc");
while($data = db_fetch($qr)){
print "<url>
<loc>$scripturl/".str_replace('{id}',$data['id'],$links['links_browse_products'])."</loc>
<changefreq>daily</changefreq>
<priority>0.50</priority>
</url>";
}
//---------- Products -------------
$qr=db_query("select id,name from store_products_data where active=1 order by id desc");
while($data = db_fetch($qr)){
print "<url>
<loc>$scripturl/".str_replace('{id}',$data['id'],$links['links_product_details'])."</loc>
<changefreq>daily</changefreq>
<priority>0.50</priority>
</url>";
}
//---------- Pages -------------
$qr=db_query("select id from store_pages where active=1 order by id desc");
while($data = db_fetch($qr)){
print "<url>
<loc>$scripturl/".str_replace('{id}',$data['id'],$links['links_pages'])."</loc>
<changefreq>daily</changefreq>
<priority>0.50</priority>
</url>";
}
//---------- News -------------
$qr=db_query("select id from store_news order by id desc");
while($data = db_fetch($qr)){
print "<url>
<loc>$scripturl/".str_replace('{id}',$data['id'],$links['links_browse_news'])."</loc>
<changefreq>daily</changefreq>
<priority>0.50</priority>
</url>";
}
//--------------------------
print "</urlset>";