-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrss.php
More file actions
59 lines (45 loc) · 1.82 KB
/
rss.php
File metadata and controls
59 lines (45 loc) · 1.82 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
<?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)
*
*/
header('Content-type: text/xml');
include "global.php" ;
print "<?xml version=\"1.0\" encoding=\"$settings[site_pages_encoding]\" ?> \n";
?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:av="http://www.searchvideo.com/schemas/av/1.0">
<channel>
<? print "<title><![CDATA[$sitename]]></title>\n
<description><![CDATA[$settings[header_description]]]></description>";?>
<?print "<link>http://".$_SERVER['HTTP_HOST']."</link>\n";
print "<copyright><![CDATA[$settings[copyrights_sitename]]]></copyright>";
$cat = (int) $cat ;
$sql_query = "select * from store_products_data " ;
if($cat){
$cats_arr = get_products_cats($cat);
$sql_query .= " where cat IN (".implode(',',$cats_arr).") ";
}
$sql_query .= " order by id desc limit 200";
$qr=db_query($sql_query) ;
while($data = db_fetch($qr)){
$data_cat = db_qr_fetch("select name,id from store_products_cats where id='$data[cat]'");
print " <item>
<title><![CDATA[".$data["name"]."]]></title>
<description><![CDATA[<img src=\"$scripturl/".get_image($data['thumb'])."\" width=80 height=80><br>".$data["content"]."\n\n <br><br>
<b>$phrases[the_price] : <b> $data[price] $settings[currency] ]]></description>";
print "
<link>".htmlentities($scripturl."/".str_replace(array('{cat}','{id}'),array('1',$data['id']),$links['links_product_details']))."</link>
<pubDate>$data[date]</pubDate>
<category><![CDATA[$data_cat[name]]]></category>
</item>\n";
}
print "</channel>
</rss>";