]>
git.wh0rd.org - tt-rss.git/blob - backend.php
2 header("Content-Type: application/xml");
6 $link = pg_connect(DB_CONN
);
12 $result = pg_query("SELECT * FROM ttrss_feeds ORDER BY title");
18 while ($line = pg_fetch_assoc($result)) {
20 $feed = $line["title"];
21 $feed_id = $line["id"];
23 $class = ($lnum %
2) ?
"even" : "odd";
25 // if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";
27 $feed = "<a href=\"javascript:viewfeed($feed_id);\">$feed</a>";
29 print "<li class=\"$class\">$feed</li>";
39 $post = $_GET["post"];
40 $feed = $_GET["feed"];
42 print "<h1>$post</h1>";
43 print "<h2>$feed</h2>";
45 print "<p>Blah blah blah blah blah</p>";
49 if ($op == "viewfeed") {
51 $feed = $_GET["feed"];
53 $headlines = array("Linus Torvalds flies to the Moon",
54 "SCO bankrupt at last",
55 "OMG WTF ANOTHER HEADLINE",
56 "Another clever headline from $feed",
57 "I'm really not feeling creative today",
60 $headlines = array_merge($headlines, $headlines);
66 foreach ($headlines as $hl) {
67 $class = ($lnum %
2) ?
"even" : "odd";
69 // if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";
71 $hl = "<a href=\"javascript:view('$feed','$hl')\">$hl</a>";
73 print "<li class=\"$class\">$hl</li>";