index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | feed.php (renamed from feeds/feed.php) | 195 | ||||
-rw-r--r-- | feeds/index.php | 194 |
diff --git a/feeds/feed.php b/feed.php index 65fc372..15250f5 100644 --- a/feeds/feed.php +++ b/feed.php @@ -1,6 +1,6 @@ <?php -require_once "../init.php"; +require_once "init.php"; require_once BASE . "/lib/mysql.php"; @@ -291,4 +291,195 @@ if ($uri_parts[0] == 'packages') { } -throw_http_error(501, "Not Implemented"); +if (count($uri_parts) != 0) + throw_http_error(501, "Not Implemented"); + +require_once BASE . "/lib/style.php"; +require_once BASE . "/lib/format.php"; + +print_header("RSS - Feeds"); + +$result = mysql_run_query( + "SELECT DISTINCT `architectures`.`name` FROM `architectures`" . + mysql_join_architectures_repositories() . + " WHERE `repositories`.`is_on_master_mirror`" . + " ORDER BY `name`" +); +$archs = array(); +while ($row = $result -> fetch_assoc()) + $archs[$row['name']] = $row['name'] . '/'; + +$print_archs = array_merge( + array( + '' => '', + 'All Arches' => 'all/' + ), + $archs +); + +$result = mysql_run_query( + "SELECT DISTINCT `repositories`.`name` FROM `repositories` WHERE `repositories`.`is_on_master_mirror` ORDER BY `name`" +); +$repos = array(); +while ($row = $result -> fetch_assoc()) + $repos[$row['name']] = $row['name'] . '/'; + +$print_repos = array_merge( + array( + 'All Repos' => '' + ), + $repos +); + +$bugtracker_projects = array( + 0 => 'All Projects', + 1 => 'Arch Linux 32' +); + +$bugtracker_operations = array( + 'Opened' => '', + 'Edited' => 'topic=edit&', + 'Closed' => 'topic=clo&' +); + +function print_arches_header() { + global $print_archs; + foreach ($print_archs as $arch => $dummy) { + print " <th>\n"; + print " " . $arch . "\n"; + print " </th>\n"; + }; +} + +function print_feeds($prefix) { + global $print_archs; + global $print_repos; + foreach ($print_repos as $repo => $dummy) { + print " <tr>\n"; + print " <td>\n"; + print " <strong>" . $repo . "</strong>\n"; + print " </td>\n"; + foreach ($print_archs as $arch => $dummy) { + if ($arch == '') + continue; + print " <td>\n"; + print " <a href=\"/feeds/packages/" . $prefix . $print_archs[$arch] . $print_repos[$repo] . "\" class=\"rss\">Feed</a>\n"; + print " </td>\n"; + } + print " </tr>\n"; + } +} + +function print_feeds_table($prefix) { + print " <table class=\"pretty2\">\n"; + print " <thead>\n"; + print " <tr>\n"; + print_arches_header(); + print " </tr>\n"; + print " </thead>\n"; + print " <tbody>\n"; + print_feeds($prefix); + print " </tbody>\n"; + print " </table>\n"; +} + +?> + <div id="rss-feeds" class="box"> + <h2> + RSS Feeds + </h2> + <p> + Several RSS feeds are available for consumption from the Arch32 website. + The majority of these are package-related and allow feeds to be customized for the updates you care about. + </p> + <h3> + News Feed + </h3> + <p> + Grab the + <a href="https://news.archlinux32.org/rss.php" class="rss" title="Arch Linux news feed">news item feed</a> + to keep up-to-date with the latest news from the Arch Linux development staff. + </p> + <h3> + Package Feeds + </h3> + <p> + If you are interested in + <a href="/feeds/packages/" class="rss" title="Arch Linux 32 package updates feed">all package updates</a>, + then grab this feed. +<?php + +print_feeds_table(''); + +?> + <p> + <s>Recently added packages.</s> (to be implemented) + </p> +<?php + +// print_feeds_table('added/'); + +?> + <p> + <s>Recently removed packages.</s> (to be implemented) + </p> +<?php + +// print_feeds_table('removed/'); + +?> + <h3> + Release Feed + </h3> + <p> + Grab the + <a href="/feeds/releases/" class="rss" title="Arch Linux release feed">ISO release feed</a> + if you want to help seed the ISO release torrents as they come out. + </p> + <h3> + Development Feeds + </h3> + <p> + Subscribe to any of the following to track bug tickets and feature requests from the + <a href="https://bugs.archlinux32.org/" title="Arch Linux 32 Bugs">Arch Linux 32 Bugtracker</a>: + </p> + <table class="pretty2"> + <thead> + <tr> + <th> + Project + </th> +<?php + +foreach ($bugtracker_operations as $label => $dummy) { + print " <th>\n"; + print " Recently " . $label . " Tasks\n"; + print " </th>\n"; +} + +?> + </tr> + </thead> + <tbody> +<?php + +foreach ($bugtracker_projects as $id => $project) { + print " <tr>\n"; + print " <td>\n"; + print " " . $project . "\n"; + print " </td>\n"; + foreach ($bugtracker_operations as $label => $option) { + print " <td>\n"; + print " <a href=\"https://bugs.archlinux.org/feed.php?feed_type=rss2&" . $option . "project=" . $id . "\" class=\"rss\">Feed</a>\n"; + print " </td>\n"; + } + print " </tr>\n"; +} + +?> + </tbody> + </table> + </div> +<?php + +print_footer(); diff --git a/feeds/index.php b/feeds/index.php deleted file mode 100644 index e74717b..0000000 --- a/feeds/index.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -require_once "../init.php"; - -require_once BASE . "/lib/mysql.php"; -require_once BASE . "/lib/style.php"; -require_once BASE . "/lib/format.php"; - -print_header("RSS - Feeds"); - -$result = mysql_run_query( - "SELECT DISTINCT `architectures`.`name` FROM `architectures`" . - mysql_join_architectures_repositories() . - " WHERE `repositories`.`is_on_master_mirror`" . - " ORDER BY `name`" -); -$archs = array(); -while ($row = $result -> fetch_assoc()) - $archs[$row['name']] = $row['name'] . '/'; - -$print_archs = array_merge( - array( - '' => '', - 'All Arches' => 'all/' - ), - $archs -); - -$result = mysql_run_query( - "SELECT DISTINCT `repositories`.`name` FROM `repositories` WHERE `repositories`.`is_on_master_mirror` ORDER BY `name`" -); -$repos = array(); -while ($row = $result -> fetch_assoc()) - $repos[$row['name']] = $row['name'] . '/'; - -$print_repos = array_merge( - array( - 'All Repos' => '' - ), - $repos -); - -$bugtracker_projects = array( - 0 => 'All Projects', - 1 => 'Arch Linux 32' -); - -$bugtracker_operations = array( - 'Opened' => '', - 'Edited' => 'topic=edit&', - 'Closed' => 'topic=clo&' -); - -function print_arches_header() { - global $print_archs; - foreach ($print_archs as $arch => $dummy) { - print " <th>\n"; - print " " . $arch . "\n"; - print " </th>\n"; - }; -} - -function print_feeds($prefix) { - global $print_archs; - global $print_repos; - foreach ($print_repos as $repo => $dummy) { - print " <tr>\n"; - print " <td>\n"; - print " <strong>" . $repo . "</strong>\n"; - print " </td>\n"; - foreach ($print_archs as $arch => $dummy) { - if ($arch == '') - continue; - print " <td>\n"; - print " <a href=\"/feeds/packages/" . $prefix . $print_archs[$arch] . $print_repos[$repo] . "\" class=\"rss\">Feed</a>\n"; - print " </td>\n"; - } - print " </tr>\n"; - } -} - -function print_feeds_table($prefix) { - print " <table class=\"pretty2\">\n"; - print " <thead>\n"; - print " <tr>\n"; - print_arches_header(); - print " </tr>\n"; - print " </thead>\n"; - print " <tbody>\n"; - print_feeds($prefix); - print " </tbody>\n"; - print " </table>\n"; -} - -?> - <div id="rss-feeds" class="box"> - <h2> - RSS Feeds - </h2> - <p> - Several RSS feeds are available for consumption from the Arch32 website. - The majority of these are package-related and allow feeds to be customized for the updates you care about. - </p> - <h3> - News Feed - </h3> - <p> - Grab the - <a href="https://news.archlinux32.org/rss.php" class="rss" title="Arch Linux news feed">news item feed</a> - to keep up-to-date with the latest news from the Arch Linux development staff. - </p> - <h3> - Package Feeds - </h3> - <p> - If you are interested in - <a href="/feeds/packages/" class="rss" title="Arch Linux 32 package updates feed">all package updates</a>, - then grab this feed. -<?php - -print_feeds_table(''); - -?> - <p> - <s>Recently added packages.</s> (to be implemented) - </p> -<?php - -// print_feeds_table('added/'); - -?> - <p> - <s>Recently removed packages.</s> (to be implemented) - </p> -<?php - -// print_feeds_table('removed/'); - -?> - <h3> - Release Feed - </h3> - <p> - Grab the - <a href="/feeds/releases/" class="rss" title="Arch Linux release feed">ISO release feed</a> - if you want to help seed the ISO release torrents as they come out. - </p> - <h3> - Development Feeds - </h3> - <p> - Subscribe to any of the following to track bug tickets and feature requests from the - <a href="https://bugs.archlinux32.org/" title="Arch Linux 32 Bugs">Arch Linux 32 Bugtracker</a>: - </p> - <table class="pretty2"> - <thead> - <tr> - <th> - Project - </th> -<?php - -foreach ($bugtracker_operations as $label => $dummy) { - print " <th>\n"; - print " Recently " . $label . " Tasks\n"; - print " </th>\n"; -} - -?> - </tr> - </thead> - <tbody> -<?php - -foreach ($bugtracker_projects as $id => $project) { - print " <tr>\n"; - print " <td>\n"; - print " " . $project . "\n"; - print " </td>\n"; - foreach ($bugtracker_operations as $label => $option) { - print " <td>\n"; - print " <a href=\"https://bugs.archlinux.org/feed.php?feed_type=rss2&" . $option . "project=" . $id . "\" class=\"rss\">Feed</a>\n"; - print " </td>\n"; - } - print " </tr>\n"; -} - -?> - </tbody> - </table> - </div> -<?php - -print_footer(); |