summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-08-21 11:56:27 +0100
committerAndrew Dolgov <[email protected]>2005-08-21 11:56:27 +0100
commit6f428bc5048a30bb406ab0e896e54d3d81a83e06 (patch)
tree3a143fc582f030cf902076f13a3b5606e693d638 /backend.php
parent28a80fbf7a6b8d8420b0ad66424dd63fe1da0d33 (diff)
db schema updated, psql feed fetch
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/backend.php b/backend.php
index b4ec48c11..7d072fc86 100644
--- a/backend.php
+++ b/backend.php
@@ -1,19 +1,24 @@
<?
header("Content-Type: application/xml");
- $op = $_GET["op"];
+ include "config.php";
+ $link = pg_connect(DB_CONN);
+
+ $op = $_GET["op"];
+
if ($op == "feeds") {
- $feeds = array("Art.Gnome.Org Releases", "Footnotes", "Freedesktop.org",
- "Planet Debian", "Planet Gnome");
-
+ $result = pg_query("SELECT * FROM ttrss_feeds ORDER BY title");
print "<ul>";
$lnum = 0;
- foreach ($feeds as $feed) {
+ while ($line = pg_fetch_assoc($result)) {
+
+ $feed = $line["title"];
+
$class = ($lnum % 2) ? "even" : "odd";
// if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";