4 * SourceForge Exports: Export new releases info in RSS
7 * SourceForge: Breaking Down the Barriers to Open Source Development
8 * Copyright 1999-2001 (c) VA Linux Systems
9 * http://sourceforge.net
13 require_once('../env.inc.php');
14 require_once $gfwww.'include/pre.php';
15 require_once $gfwww.'export/rss_utils.inc';
17 $limit = getIntFromRequest('limit', 10);
18 if ($limit > 100) $limit = 100;
20 header("Content-Type: text/xml; charset=utf-8");
21 print '<?xml version="1.0" encoding="UTF-8"?>
22 <!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd">
26 $res=db_query_params ('SELECT
29 groups.unix_group_name,
39 news_bytes.group_id=groups.group_id
41 AND groups.is_public = 1
51 print " <copyright>Copyright ".date("Y")." ".forge_get_config ('forge_name')."</copyright>\n";
52 print " <pubDate>".rss_date(time())."</pubDate>\n";
53 print " <description>".forge_get_config ('forge_name')." New Releases</description>\n";
54 print " <link>http://".forge_get_config('web_host')."</link>\n";
55 print " <title>".forge_get_config ('forge_name')." New Releases</title>\n";
56 print " <webMaster>".forge_get_config('admin_email')."</webMaster>\n";
57 print " <language>en-us</language>\n";
61 while ($row = db_fetch_array($res)) {
62 if (!isset ($seen[$row['group_id']])) {
64 print " <title>".htmlspecialchars($row['group_name'])."</title>\n";
65 print " <link>http://forge_get_config('web_host')/project/showfiles.php?group_id=$row[group_id]</link>\n";
66 print " <description>".rss_description($row['summary'])."</description>\n";
70 // eliminate dupes, only do $limit of these
71 $seen[$row['group_id']] = 1;
72 if ($outputtotal >= $limit) break;
75 print " </channel>\n";