/**
  * flush - flush the RSS output
  */
 function flush()
 {
     $searchQuery =& $this->searchQuery;
     header('Content-Type: text/plain');
     if ($searchQuery->isError() || $this->isError()) {
         echo '<channel></channel>';
     } else {
         $searchQuery->executeQuery();
         include_once $GLOBALS['gfwww'] . 'export/rss_utils.inc';
         rss_dump_project_result_set($searchQuery->getResult(), 'GForge Search Results', 'GForge Search Results for "' . $this->query['words'] . '"', $this->callbackFunction);
     }
     exit;
 }
Exemplo n.º 2
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: rss_sfprojects.php,v 1.2 2003/11/13 11:29:22 helix Exp $
// ## export SourceForge project list in RSS
include "pre.php";
include "rss_utils.inc";
header("Content-Type: text/plain");
print '<?xml version="1.0"?>
<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
';
$res = db_query('SELECT group_id,group_name,unix_group_name,homepage,short_description ' . 'FROM groups ' . 'WHERE is_public=1 AND status=\'A\' ' . 'ORDER BY group_id', $limit);
rss_dump_project_result_set($res, $GLOBALS[sys_default_name] . ' Full Project Listing');
?>
</rss>
Exemplo n.º 3
0
 /*
  *  Dump RSS rendering of search results, date registered, 
  *  include trove categories, license.
  */
 if ($rss) {
     include "../export/rss_utils.inc";
     function callback($data_row)
     {
         $sql = "SELECT trove_cat.fullpath " . "FROM trove_group_link,trove_cat " . "WHERE trove_group_link.trove_cat_root=18 " . "AND trove_group_link.trove_cat_id=trove_cat.trove_cat_id " . "AND group_id={$data_row['group_id']}";
         $result = db_query($sql);
         $ret = ' | date registered: ' . date('M jS Y', $data_row['register_time']);
         $ret .= ' | category: ' . str_replace(' ', '', implode(util_result_column_to_array($result), ','));
         return $ret . ' | license: ' . $data_row['license'];
     }
     header("Content-Type: text/plain");
     rss_dump_project_result_set($result, $GLOBALS['sys_default_name'] . ' Search Results', $GLOBALS['sys_default_name'] . ' Search Results for "' . htmlspecialchars($words) . '"', 'callback');
     exit;
 }
 /*
  *  Else, render HTML
  */
 if (!$result || $rows < 1) {
     $no_rows = 1;
     echo "<H2>No matches found for {$words}</H2>";
     echo db_error();
     //		echo $sql;
 } else {
     if ($rows_returned > 25) {
         $rows = 25;
     }
     echo "<H3>Search results for {$words}</H3><P>\n\n";
Exemplo n.º 4
0
<?php

/**
 *
 * SourceForge Exports: Export project list in RSS
 *
 *
 * SourceForge: Breaking Down the Barriers to Open Source Development
 * Copyright 1999-2001 (c) VA Linux Systems
 * http://sourceforge.net
 *
 * @version   $Id$
 *
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'export/rss_utils.inc';
$limit = getIntFromRequest('limit', 10);
if ($limit > 100) {
    $limit = 100;
}
header("Content-Type: text/plain");
print '<?xml version="1.0"?>
<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
';
$res = db_query("\n\tSELECT \n\t\tgroup_id,\n\t\tgroup_name,\n\t\tunix_group_name,\n\t\thomepage,\n\t\tshort_description \n\tFROM \n\t\tgroups \n\tWHERE \n\t\tis_public=1 \n\tAND \n\t\tstatus='A' \n    ORDER BY \n\t\tgroup_id DESC", $limit);
rss_dump_project_result_set($res, $GLOBALS['sys_name'] . ' Full Project Listing');
?>
</rss>