Exemplo n.º 1
0
function get_opendb_rss_feeds_links($browser = 'firefox')
{
    $feeds_r = get_opendb_rss_feeds();
    reset($feeds_r);
    $buffer = "\n";
    while (list(, $feed_r) = each($feeds_r)) {
        $buffer .= "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"" . $feed_r['title'] . "\" href=\"./rss.php?feed=" . $feed_r['feed'] . "\">\n";
    }
    return $buffer;
}
Exemplo n.º 2
0
        }
        db_free_result($result);
    }
    return $rssout;
}
// Returns text w/o characters that cause problems for xml
function rss_encoded($inString)
{
    return htmlspecialchars($inString);
}
if (is_site_enabled()) {
    if (is_opendb_valid_session() || is_site_public_access()) {
        if (strlen($HTTP_VARS['feed']) == 0) {
            echo _theme_header(get_opendb_lang_var('rss_feeds'));
            echo "<h2>" . get_opendb_lang_var('rss_feeds') . "</h2>";
            $feeds_r = get_opendb_rss_feeds();
            echo "<ul id=\"rssfeeds\">";
            reset($feeds_r);
            while (list(, $feed_r) = each($feeds_r)) {
                echo '<li><a href="' . $PHP_SELF . '?feed=' . $feed_r['feed'] . '">' . $feed_r['title'] . '</a></dd>';
            }
            echo "</ul>";
            echo _theme_footer();
        } else {
            @set_time_limit(600);
            $feed_config_r = get_opendb_rss_feed_config($HTTP_VARS['feed']);
            if (is_not_empty_array($feed_config_r)) {
                $URL = get_site_url();
                $rssoutput = '';
                // Create the RSS header and channel information tags
                header('Content-type: text/xml');