]> git.wh0rd.org - tt-rss.git/blob - mobile/tt-rss.php
f5a184271786f8e1c955c91395f81089890c810e
[tt-rss.git] / mobile / tt-rss.php
1 <?
2 require_once "../functions.php";
3 require_once "functions.php";
4
5 basic_nosid_redirect_check();
6
7 require_once "../sessions.php";
8
9 require_once "../version.php";
10 require_once "../config.php";
11 require_once "../db-prefs.php";
12
13 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
14
15 login_sequence($link);
16
17 /* perform various redirect-needing subops */
18
19 $subop = db_escape_string($_GET["subop"]);
20 $go = $_GET["go"];
21
22 if ($subop == "tc" && !$go) {
23
24 $cat_id = db_escape_string($_GET["id"]);
25
26 if ($cat_id != 0) {
27 db_query($link, "UPDATE ttrss_feed_categories SET
28 collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
29 $_SESSION["uid"]);
30 header("Location: tt-rss.php");
31 return;
32 }
33 }
34
35 ?>
36 <html>
37 <head>
38 <title>Tiny Tiny RSS - Mobile</title>
39 <link rel="stylesheet" type="text/css" href="mobile.css">
40 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
41 </head>
42 <body>
43
44 <div id="content">
45 <?
46 if (!$go) {
47 render_feeds_list($link);
48 } else if ($go == "vf") {
49 render_headlines($link);
50 } else if ($go == "view") {
51 render_article($link);
52 } else {
53 print "Function not implemented";
54 }
55
56 ?>
57 </div>
58
59 <div id="footer">
60 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
61 </div>
62
63 </body>
64 </html>