]> git.wh0rd.org - tt-rss.git/blame - backend.php
initial mockup
[tt-rss.git] / backend.php
CommitLineData
1cd17194
AD
1<?
2 header("Content-Type: application/xml");
3
4 $op = $_GET["op"];
5
6 if ($op == "feeds") {
7
8 $feeds = array("Art.Gnome.Org Releases", "Footnotes", "Freedesktop.org",
9 "Planet Debian", "Planet Gnome");
10
11
12 print "<ul>";
13
14 $lnum = 0;
15
16 foreach ($feeds as $feed) {
17 $class = ($lnum % 2) ? "even" : "odd";
18
19// if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";
20
21 $feed = "<a href=\"javascript:viewfeed('$feed')\">$feed</a>";
22
23 print "<li class=\"$class\">$feed</li>";
24 ++$lnum;
25 }
26
27 print "</ul>";
28
29 }
30
31 if ($op == "view") {
32
33 $post = $_GET["post"];
34 $feed = $_GET["feed"];
35
36 print "<h1>$post</h1>";
37 print "<h2>$feed</h2>";
38
39 print "<p>Blah blah blah blah blah</p>";
40
41 }
42
43 if ($op == "viewfeed") {
44
45 $feed = $_GET["feed"];
46
47 $headlines = array("Linus Torvalds flies to the Moon",
48 "SCO bankrupt at last",
49 "OMG WTF ANOTHER HEADLINE",
50 "Another clever headline from $feed",
51 "I'm really not feeling creative today",
52 "No, seriously");
53
54 $headlines = array_merge($headlines, $headlines);
55
56 print "<ul>";
57
58 $lnum = 0;
59
60 foreach ($headlines as $hl) {
61 $class = ($lnum % 2) ? "even" : "odd";
62
63// if ($lnum == 2 || $lnum == 0) $feed = "<b>$feed</b>";
64
65 $hl = "<a href=\"javascript:view('$feed','$hl')\">$hl</a>";
66
67 print "<li class=\"$class\">$hl</li>";
68 ++$lnum;
69 }
70
71 print "</ul>";
72
73 }
74
75
76?>