index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-08 10:07:56 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-08 10:07:56 +0100 |
commit | e5e4f6a85ccf94e35306f5007d6a7e957c054bb6 (patch) | |
tree | d2d54b2bd644bbfa277bcd000ee9eb4aa07d23ec /feeds | |
parent | bb46bd3f756f4e9901ab68a919d2641b681dd147 (diff) |
-rw-r--r-- | feeds/feed.php | 3 | ||||
-rw-r--r-- | feeds/index.php | 191 |
diff --git a/feeds/feed.php b/feeds/feed.php new file mode 100644 index 0000000..040c36d --- /dev/null +++ b/feeds/feed.php @@ -0,0 +1,3 @@ +<?php + +echo "sry, this is not yet implemented: " . $_SERVER['REQUEST_URI']; diff --git a/feeds/index.php b/feeds/index.php new file mode 100644 index 0000000..809c8a9 --- /dev/null +++ b/feeds/index.php @@ -0,0 +1,191 @@ +<?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 `architectures`.`name` FROM `architectures` ORDER BY `name`" +); +$archs = array(); +while ($row = $result -> fetch_assoc()) + $archs[$row['name']] = $row['name'] . '/'; + +$print_archs = array_merge( + array( + '' => '', + 'All Arches' => '' + ), + $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/" 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> + Recently added packages. + </p> +<?php + +print_feeds_table('added/'); + +?> + <p> + Recently removed packages. + </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(); |