source: trunk/get_rss_feed.php

Last change on this file was 2, checked in by george, 14 years ago
  • Přidáno: Trunk revize 13719.
File size: 1.2 KB
Line 
1<?php
2
3require_once( './inc/header.inc.php' );
4require_once( './inc/db.inc.php' );
5require_once( './inc/profiles.inc.php' );
6
7$aPredefinedRssFeeds = array (
8 'boonex_news' => 'http://www.boonex.com/unity/blog/featured_posts/?rss=1',
9 'boonex_unity_market' => 'http://www.boonex.com/unity/extensions/latest/?rss=1',
10 'boonex_unity_lang_files' => 'http://www.boonex.com/unity/extensions/category/cat_languages.html?rss=1',
11 'boonex_unity_market_templates' => 'http://www.boonex.com/unity/extensions/category/cat_templates.html?rss=1',
12);
13
14if (isset($aPredefinedRssFeeds[$_GET['ID']])) {
15
16 $sCont = $aPredefinedRssFeeds[$_GET['ID']];
17
18} else {
19
20 $sQuery = "SELECT `Content` FROM `sys_page_compose` WHERE `ID` = " . (int)$_GET['ID'];
21 $sCont = db_value( $sQuery );
22
23 if( !$sCont )
24 exit;
25}
26
27list( $sUrl ) = explode( '#', $sCont );
28$sUrl = str_replace( '{SiteUrl}', $site['url'], $sUrl );
29
30$iMemID = (int)$_GET['member'];
31if( $iMemID ) {
32 $aMember = getProfileInfo( $iMemID );
33 $sUrl = str_replace( '{NickName}', $aMember['NickName'], $sUrl );
34}
35
36header( 'Content-Type: text/xml' );
37readfile( $sUrl . (BX_PROFILER && 0 == strncmp($site['url'], $sUrl, strlen($site['url']))? '&bx_profiler_disable=1' : '') );
Note: See TracBrowser for help on using the repository browser.