summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-08-21 11:13:10 +0100
committerAndrew Dolgov <[email protected]>2005-08-21 11:13:10 +0100
commit1cd17194a52bb717f0fb42b52a105891e2df9ea8 (patch)
tree288eafdb32e0b4f2e48e15bc1c3cf899b6ea757f /backend.php
initial mockup
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php76
1 files changed, 76 insertions, 0 deletions
diff --git a/backend.php b/backend.php
new file mode 100644
index 000000000..b4ec48c11
--- /dev/null
+++ b/backend.php
@@ -0,0 +1,76 @@
+<?
+ header("Content-Type: application/xml");
+
+ $op = $_GET["op"];
+
+ if ($op == "feeds") {
+
+ $feeds = array("Art.Gnome.Org Releases", "Footnotes", "Freedesktop.org",
+ "Planet Debian", "Planet Gnome");
+
+
+ print "<ul>";
+
+ $lnum = 0;
+
+ foreach ($feeds as $feed) {
+ $class = ($lnum % 2) ? "even" : "odd";
+
+// if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";
+
+ $feed = "<a href=\"javascript:viewfeed('$feed')\">$feed</a>";
+
+ print "<li class=\"$class\">$feed</li>";
+ ++$lnum;
+ }
+
+ print "</ul>";
+
+ }
+
+ if ($op == "view") {
+
+ $post = $_GET["post"];
+ $feed = $_GET["feed"];
+
+ print "<h1>$post</h1>";
+ print "<h2>$feed</h2>";
+
+ print "<p>Blah blah blah blah blah</p>";
+
+ }
+
+ if ($op == "viewfeed") {
+
+ $feed = $_GET["feed"];
+
+ $headlines = array("Linus Torvalds flies to the Moon",
+ "SCO bankrupt at last",
+ "OMG WTF ANOTHER HEADLINE",
+ "Another clever headline from $feed",
+ "I'm really not feeling creative today",
+ "No, seriously");
+
+ $headlines = array_merge($headlines, $headlines);
+
+ print "<ul>";
+
+ $lnum = 0;
+
+ foreach ($headlines as $hl) {
+ $class = ($lnum % 2) ? "even" : "odd";
+
+// if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";
+
+ $hl = "<a href=\"javascript:view('$feed','$hl')\">$hl</a>";
+
+ print "<li class=\"$class\">$hl</li>";
+ ++$lnum;
+ }
+
+ print "</ul>";
+
+ }
+
+
+?>