$t_rss_enabled = config_get('rss_enabled'); ?> <br /> <div> <table class="width75" cellspacing="0"> <?php $t_column_count = 0; $t_max_column_count = 2; foreach ($t_query_arr as $t_id => $t_name) { if ($t_column_count == 0) { print '<tr>'; } print '<td>'; if (OFF != $t_rss_enabled) { # Use the "new" RSS link style. print_rss(rss_get_issues_feed_url(null, null, $t_id), lang_get('rss')); echo ' '; } $t_query_id = (int) $t_id; print_link('view_all_set.php?type=3&source_query_id=' . $t_query_id, $t_name); if (filter_db_can_delete_filter($t_id)) { echo ' '; print_button('query_delete_page.php?source_query_id=' . $t_query_id, lang_get('delete_query')); } print '</td>'; $t_column_count++; if ($t_column_count == $t_max_column_count) { print '</tr>'; $t_column_count = 0; } }
html_page_top2(); $t_use_query_url = 'view_all_set.php?type=3&source_query_id='; $t_delete_query_url = 'query_delete_page.php?source_query_id='; ?> <br /> <div align="center"> <table class="width75" cellspacing="0"> <?php $t_column_count = 0; $t_max_column_count = 2; foreach ($t_query_arr as $t_id => $t_name) { if ($t_column_count == 0) { print '<tr ' . helper_alternate_class() . '>'; } print '<td>'; print_rss('issues_rss.php?project_id=' . helper_get_current_project() . '&filter_id=' . $t_id, lang_get('rss')); echo ' '; print '<a href="' . $t_use_query_url . db_prepare_int($t_id) . '">' . string_display($t_name) . '</a>'; if (filter_db_can_delete_filter($t_id)) { echo ' '; print_button($t_delete_query_url . db_prepare_int($t_id), lang_get('delete_query')); } print '</td>'; $t_column_count++; if ($t_column_count == $t_max_column_count) { print '</tr>'; $t_column_count = 0; } } # Tidy up this row if ($t_column_count > 0 && $t_column_count < $t_max_column_count) {
$itemURL = filter_var($itemfullURL, FILTER_VALIDATE_URL); /* error checking: is the $itemURL from the SourceForge news feed? */ $isfromSF = strpos($itemURL, $newsprefix) == 0 ? TRUE : FALSE; /* print the news item(s) */ if ($itemURL === FALSE || $isfromSF === FALSE) { print '<!-- filter failed! show the main news feed instead -->'; print_rss($newsfeedURL, $newsfeed_maxcount); } else { /* TODO: this breaks if $itemURL doesn't end properly with '/' */ $itemfeedURL = $itemURL . 'feed/'; print_rss($itemfeedURL, 1); } print '<p><a href="/news/">« Back</a></p>'; } else { /* no item is specified; print the entries from the main news feed */ print_rss($newsfeedURL, $newsfeed_maxcount); print "<p><a href='{$newsprefix}'>News archive »</a></p>"; } ?> <?php // debugging; print the contents of the rss feed /* print '<div style="background-color:#ffc;border:1px solid #fc0;border-radius:2px;padding:1em;margin:1em;font-size:small;"><p><b>debugging:</b></p><pre>'; $rsscopy = file_get_contents($newsfeedURL); print $rsscopy; print '</pre></div>'; */ ?> <!-- <h3>See Also</h3>
function print_folder($item){ ?> <item> <title><?php echo $item['file']?> </title> <description><?echo $item['uri']?></description> <guid isPermaLink="false"><?echo $item['url']?></guid> <link><?echo $item['feed']?></link> <enclosure url="<?echo $item['uri']?>" type="<?=$item['mime']?>" /> <pubDate><?=strftime("%a, %d %b %Y %H:%M:%S GMT",$item['time'])?></pubDate> </item> <? } $dir = "./"; $ignore = array('.', '..', '.index.php.swp', 'index.php'); $sub_dir = array_keys($_GET); $sub_dir = $sub_dir[0]; if($sub_dir) $dir = $sub_dir.'/'; $file_feed = aggregate_folder($dir, $ignore); print_rss($file_feed, $dir); ?>